/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:22:18: error: reference to 'hash' is ambiguous
        int pre = hash( a, b, c, d, e );
                  ^~~~
/in/foo.cc:4:5: note: candidates are: int hash(int, int, int, int, int)
 int hash( int a, int b, int c, int d, int e ){
     ^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6385:0,
                 from /usr/include/c++/7/string:52,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:23:18: error: reference to 'hash' is ambiguous
        int now = hash( a-w[i][1], b-w[i][2], c-w[i][3], d-w[i][4], e-w[i][5] );
                  ^~~~
/in/foo.cc:4:5: note: candidates are: int hash(int, int, int, int, int)
 int hash( int a, int b, int c, int d, int e ){
     ^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6385:0,
                 from /usr/include/c++/7/string:52,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~

信息

递交者
类型
递交
题目
P1426 兴奋剂检查
语言
C++
递交时间
2017-09-19 15:08:32
评测时间
2017-09-19 15:08:32
评测机
分数
0
总耗时
1458ms
峰值内存
133.672 MiB