记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:21:19: error: no matching function for call to 'std::queue<pos>::push(int&, int&, int)'
     q.push(i, j, 0), vis[i][j] = 1;
                   ^
In file included from /usr/include/c++/6/queue:64:0,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/stl_queue.h:242:7: note: candidate: void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = pos; _Sequence = std::deque<pos, std::allocator<pos> >; std::queue<_Tp, _Sequence>::value_type = pos]
       push(const value_type& __x)
       ^~~~
/usr/include/c++/6/bits/stl_queue.h:242:7: note:   candidate expects 1 argument, 3 provided
/usr/include/c++/6/bits/stl_queue.h:247:7: note: candidate: void std::queue<_Tp, _Sequence>::push(std::queue<_Tp, _Sequence>::value_type&&) [with _Tp = pos; _Sequence = std::deque<pos, std::allocator<pos> >; std::queue<_Tp, _Sequence>::value_type = pos]
       push(value_type&& __x)
       ^~~~
/usr/include/c++/6/bits/stl_queue.h:247:7: note:   candidate expects 1 argument, 3 provided
/in/foo.cc:37:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
    if(tmp2.x < 0 || tmp2.y < 0 || tmp2.x >= n || tmp2.y >= m || vis[tmp2.x][tmp2.y])
    ^~
/in/foo.cc:40:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
     vis[tmp2.x][tmp2.y] = 1;
     ^~~

信息

递交者
类型
递交
题目
P1008 小羊吃草
语言
C++
递交时间
2021-05-06 17:40:50
评测时间
2021-05-06 17:40:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes