Submission #00015
ソースコード
ステータス
項目 |
データ |
問題 |
0001 - 宝探し |
ユーザー名 |
r1825
|
投稿日時 |
2019-12-25 09:18:48 |
言語 |
C++14 |
状態 |
Compile Error |
得点 |
0
|
ソースコード長 |
813 Byte |
最大実行時間 |
-
|
最大メモリ使用量 |
|
コンパイルメッセージ
./Main.cpp: In function ‘int main()’:
./Main.cpp:26:11: warning: use of an operand of type ‘bool’ in ‘operator++’ is deprecated [-Wdeprecated]
if(f[y][x]++)continue;
^~
./Main.cpp:30:22: error: ‘nx’ was not declared in this scope
if ( 0<=ny&&ny<h&&0<=nx&&nx<w ){
^~
./Main.cpp:30:22: note: suggested alternative: ‘nz’
if ( 0<=ny&&ny<h&&0<=nx&&nx<w ){
^~
nz
./Main.cpp:31:15: error: no matching function for call to ‘std::queue<std::pair<int, int> >::push(<brace-enclosed initializer list>)’
q.push({ny,nx});
^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/queue:64,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:86,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_queue.h:251:7: note: candidate: ‘void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::queue<_Tp, _Sequence>::value_type = std::pair<int, int>]’
push(const value_type& __x)
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_queue.h:251:7: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const value_type&’ {aka ‘const std::pair<int, int>&’}
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_queue.h:256:7: note: candidate: ‘void std::queue<_Tp, _Sequence>::push(std::queue<_Tp, _Sequence>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::queue<_Tp, _Sequence>::value_type = std::pair<int, int>]’
push(value_type&& __x)
^~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_queue.h:256:7: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::queue<std::pair<int, int> >::value_type&&’ {aka ‘std::pair<int, int>&&’}
セット
テストケース