/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void push(int, int, int, int)':
/in/foo.cc:44:8: error: reference to 'hash' is ambiguous
 if(vis[hash(x,y)])return;
        ^~~~
/in/foo.cc:34:12: note: candidates are: int hash(int, int)
 inline int hash(int x,int y){
            ^~~~
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;
            ^~~~
/in/foo.cc:45:5: error: reference to 'hash' is ambiguous
 vis[hash(x,y)]=1;
     ^~~~
/in/foo.cc:34:12: note: candidates are: int hash(int, int)
 inline int hash(int x,int y){
            ^~~~
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;
            ^~~~
/in/foo.cc:46:3: error: reference to 'hash' is ambiguous
 d[hash(x,y)]=d[hash(a,b)]+1;
   ^~~~
/in/foo.cc:34:12: note: candidates are: int hash(int, int)
 inline int hash(int x,int y){
            ^~~~
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;
            ^~~~
/in/foo.cc:46:16: error: reference to 'hash' is ambiguous
 d[hash(x,y)]=d[hash(a,b)]+1;
                ^~~~
/in/foo.cc:34:12: note: candidates are: int hash(int, int)
 inline int hash(int x,int y){
            ^~~~
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;
            ^~~~
/in/foo.cc: In function 'void bfs()':
/in/foo.cc:52:19: error: reference to 'hash' is ambiguous
 int x=c.x,y=c.y,u=hash(x,y);
                   ^~~~
/in/foo.cc:34:12: note: candidates are: int hash(int, int)
 inline int hash(int x,int y){
            ^~~~
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;
            ^~~~
/in/foo.cc:82:7: error: reference to 'hash' is ambiguous
 int v=hash(e1[i].x,e1[i].y);
       ^~~~
/in/foo.cc:34:12: note: candidates are: int hash(int, int)
 inline int hash(int x,int y){
            ^~~~
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;
            ^~~~
/in/foo.cc:89:7: error: reference to 'hash' is ambiguous
 int v=hash(e1[i].x,e1[i].y);
       ^~~~
/in/foo.cc:34:12: note: candidates are: int hash(int, int)
 inline int hash(int x,int y){
            ^~~~
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;
            ^~~~
/in/foo.cc:98:7: error: reference to 'hash' is ambiguous
 int v=hash(e2[i].x,e2[i].y);
       ^~~~
/in/foo.cc:34:12: note: candidates are: int hash(int, int)
 inline int hash(int x,int y){
            ^~~~
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;
            ^~~~
/in/foo.cc:106:7: error: reference to 'hash' is ambiguous
 int v=hash(e2[i].x,e2[i].y);
       ^~~~
/in/foo.cc:34:12: note: candidates are: int hash(int, int)
 inline int hash(int x,int y){
            ^~~~
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;
            ^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:119:3: error: reference to 'hash' is ambiguous
 d[hash(sx,sy)]=0;
   ^~~~
/in/foo.cc:34:12: note: candidates are: int hash(int, int)
 inline int hash(int x,int y){
            ^~~~
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;
            ^~~~
/in/foo.cc:120:5: error: reference to 'hash' is ambiguous
 vis[hash(sx,sy)]=1;
     ^~~~
/in/foo.cc:34:12: note: candidates are: int hash(int, int)

信息

递交者
类型
递交
题目
P1452 逃脱
语言
C++
递交时间
2019-03-14 17:02:59
评测时间
2019-03-14 17:02:59
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes