记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:26:32: error: reference to 'hash' is ambiguous
   26 |                         memset(hash,0,sizeof(hash));
      |                                ^~~~
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:7:6: note:                 'bool hash [200010]'
    7 | bool hash[MAXN];
      |      ^~~~
foo.cc:26:46: error: reference to 'hash' is ambiguous
   26 |                         memset(hash,0,sizeof(hash));
      |                                              ^~~~
/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:7:6: note:                 'bool hash [200010]'
    7 | bool hash[MAXN];
      |      ^~~~
foo.cc:29:37: error: reference to 'hash' is ambiguous
   29 |                                 if(!hash[a[j]])
      |                                     ^~~~
/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:7:6: note:                 'bool hash [200010]'
    7 | bool hash[MAXN];
      |      ^~~~
foo.cc:31:41: error: reference to 'hash' is ambiguous
   31 |                                         hash[a[j]] = true;
      |                                         ^~~~
/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:7:6: note:                 'bool hash [200010]'
    7 | bool hash[MAXN];
      |      ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1508 4. Different sequence
比赛
2023秋 苏州青少年科技馆(吴江计算机协会)CSP-J/S模拟赛(1)
语言
C++
递交时间
2023-10-07 20:23:44
评测时间
2023-10-07 20:23:44
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes