记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:29:5: error: reference to 'hash' is ambiguous
     hash[a[i][j]].push_back({i,j});
     ^~~~
/in/foo.cc:14:14: note: candidates are: std::vector<Node> hash [1000010]
 vector<Node> hash[MAXM];
              ^~~~
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:49:22: error: reference to 'hash' is ambiguous
    for(int i = 0;i < hash[p.x * p.y].size();i++)
                      ^~~~
/in/foo.cc:14:14: note: candidates are: std::vector<Node> hash [1000010]
 vector<Node> hash[MAXM];
              ^~~~
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:51:12: error: reference to 'hash' is ambiguous
     q.push(hash[p.x * p.y][i]);
            ^~~~
/in/foo.cc:14:14: note: candidates are: std::vector<Node> hash [1000010]
 vector<Node> hash[MAXM];
              ^~~~
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;
            ^~~~

信息

递交者
类型
自测
题目
P1515 Problem C. 金字塔探险II
语言
C++
递交时间
2023-10-12 20:54:33
评测时间
2023-10-12 20:54:33
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes