/ Vijos /

记录详情

Compile Error

foo.cc: In function 'bool islegal(int, int, int)':
foo.cc:15:39: error: reference to 'map' is ambiguous
   15 |     if (x<1||y<1||z<1||x>a||y>b||z>c||map[x][y][z]==1)return 0;
      |                                       ^~~
In file included from /usr/include/c++/9/map:61,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
                 from foo.cc:1:
/usr/include/c++/9/bits/stl_map.h:100:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  100 |     class map
      |           ^~~
foo.cc:4:5: note:                 'int map [55][55][55]'
    4 | int map[maxn][maxn][maxn],a,b,c,t;
      |     ^~~
foo.cc: In function 'int main()':
foo.cc:61:25: error: reference to 'map' is ambiguous
   61 |             scanf("%d",&map[i][j][k]);
      |                         ^~~
In file included from /usr/include/c++/9/map:61,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
                 from foo.cc:1:
/usr/include/c++/9/bits/stl_map.h:100:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  100 |     class map
      |           ^~~
foo.cc:4:5: note:                 'int map [55][55][55]'
    4 | int map[maxn][maxn][maxn],a,b,c,t;
      |     ^~~
foo.cc:54:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   54 |     scanf("%d",&k);
      |     ~~~~~^~~~~~~~~
foo.cc:57:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   57 |         scanf("%d %d %d %d",&a,&b,&c,&t);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1175 胜利大逃亡
语言
C++
递交时间
2022-07-05 18:27:53
评测时间
2022-07-05 18:27:53
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes