记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:29:33: error: reference to 'hash' is ambiguous
   29 |                                 hash[a[i][j]].push_back({i,j});
      |                                 ^~~~
In file included from /nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/bits/basic_string.h:4232,
                 from /nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/string:53,
                 from /nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/bits/locale_classes.h:40,
                 from /nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/bits/ios_base.h:41,
                 from /nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/ios:42,
                 from /nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/ostream:38,
                 from iostream:39:
/nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
foo.cc:14:14: note:                 'std::vector<Node> hash [1000010]'
   14 | vector<Node> hash[MAXM];
      |              ^~~~
foo.cc:49:43: error: reference to 'hash' is ambiguous
   49 |                         for(int i = 0;i < hash[p.x * p.y].size();i++)
      |                                           ^~~~
/nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
foo.cc:14:14: note:                 'std::vector<Node> hash [1000010]'
   14 | vector<Node> hash[MAXM];
      |              ^~~~
foo.cc:51:40: error: reference to 'hash' is ambiguous
   51 |                                 q.push(hash[p.x * p.y][i]);
      |                                        ^~~~
/nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
foo.cc:14:14: note:                 'std::vector<Node> hash [1000010]'
   14 | vector<Node> hash[MAXM];
      |              ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1515 Problem C. 金字塔探险II
比赛
2023秋 苏州青少年科技馆(吴江计算机协会)CSP-J/S模拟赛(3)
语言
C++
递交时间
2023-10-11 20:07:52
评测时间
2023-10-11 20:07:52
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes