/ Vijos /

记录详情

Compile Error

foo.cc: In function ‘int ok(int, int, int)’:
foo.cc:30:13: warning: unused variable ‘new_x’ [-Wunused-variable]
   30 |         int new_x = x + dx[i];
      |             ^~~~~
foo.cc:31:13: warning: unused variable ‘new_y’ [-Wunused-variable]
   31 |         int new_y = y + dy[i];
      |             ^~~~~
foo.cc: In function ‘void add(int, int, int, int, int, int)’:
foo.cc:67:13: error: reference to ‘hash’ is ambiguous
   67 |         if (hash[x1][y1][x2][y2][t]) return;
      |             ^~~~
In file included from /nix/gcc/include/c++/13.2.0/bits/basic_string.h:4379,
                 from /nix/gcc/include/c++/13.2.0/string:54,
                 from /nix/gcc/include/c++/13.2.0/bits/locale_classes.h:40,
                 from /nix/gcc/include/c++/13.2.0/bits/ios_base.h:41,
                 from /nix/gcc/include/c++/13.2.0/ios:44,
                 from /nix/gcc/include/c++/13.2.0/ostream:40,
                 from /nix/gcc/include/c++/13.2.0/iostream:41,
                 from foo.cc:2:
/nix/gcc/include/c++/13.2.0/bits/functional_hash.h:59:12: note: candidates are: ‘template<class _Tp> struct std::hash’
   59 |     struct hash;
      |            ^~~~
foo.cc:9:6: note:                 ‘bool hash [20][20][20][20][4]’
    9 | bool hash[20][20][20][20][4];
      |      ^~~~
foo.cc:68:9: error: reference to ‘hash’ is ambiguous
   68 |         hash[x1][y1][x2][y2][t] = 1;
      |         ^~~~
/nix/gcc/include/c++/13.2.0/bits/functional_hash.h:59:12: note: candidates are: ‘template<class _Tp> struct std::hash’
   59 |     struct hash;
      |            ^~~~
foo.cc:9:6: note:                 ‘bool hash [20][20][20][20][4]’
    9 | bool hash[20][20][20][20][4];
      |      ^~~~
foo.cc: In function ‘int main()’:
foo.cc:89:16: error: reference to ‘hash’ is ambiguous
   89 |         memset(hash,0,sizeof(hash));
      |                ^~~~
/nix/gcc/include/c++/13.2.0/bits/functional_hash.h:59:12: note: candidates are: ‘template<class _Tp> struct std::hash’
   59 |     struct hash;
      |            ^~~~
foo.cc:9:6: note:                 ‘bool hash [20][20][20][20][4]’
    9 | bool hash[20][20][20][20][4];
      |      ^~~~
foo.cc:89:30: error: reference to ‘hash’ is ambiguous
   89 |         memset(hash,0,sizeof(hash));
      |                              ^~~~
/nix/gcc/include/c++/13.2.0/bits/functional_hash.h:59:12: note: candidates are: ‘template<class _Tp> struct std::hash’
   59 |     struct hash;
      |            ^~~~
foo.cc:9:6: note:                 ‘bool hash [20][20][20][20][4]’
    9 | bool hash[20][20][20][20][4];
      |      ^~~~

信息

递交者
类型
递交
题目
P1044 Wappo
语言
C++
递交时间
2024-05-09 11:59:37
评测时间
2024-05-09 11:59:37
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes