记录详情

Compile Error

/in/foo.cc: In function 'bool hashs(int)':
/in/foo.cc:16:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  if(p==x%mod) return false; return true;
  ^~
/in/foo.cc:16:29: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
  if(p==x%mod) return false; return true;
                             ^~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:22:25: error: reference to 'hash' is ambiguous
   for(int j=1;j<=i;j++) hash(a[i]+a[j]+add);
                         ^~~~
/in/foo.cc:6:6: note: candidates are: void hash(int)
 void hash(int x){
      ^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~

信息

递交者
类型
递交
题目
好元素
题目数据
下载
语言
C++
递交时间
2017-10-31 20:18:13
评测时间
2017-10-31 20:18:13
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes