실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘void bfs(int, int, int)’: Main.cpp:66:22: error: ‘x’ was not declared in this scope; did you mean ‘nx’? 66 | int nx = x+dx[i]; | ^ | nx Main.cpp:67:22: error: ‘y’ was not declared in this scope; did you mean ‘ny’? 67 | int ny = y+dy[i]; | ^ | ny Main.cpp:73:37: warning: pointer to a function used in arithmetic [-Wpointer-arith] 73 | q.push({nx, ny, time+1}); | ~~~~^~ Main.cpp:73:23: error: no matching function for call to ‘std::queue<sharkWay>::push(<brace-enclosed initializer list>)’ 73 | q.push({nx, ny, time+1}); | ~~~~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/11/queue:64, from Main.cpp:3: /usr/include/c++/11/bits/stl_queue.h:265:7: note: candidate: ‘void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = sharkWay; _Sequence = std::deque<sharkWay, std::allocator<sharkWay> >; std::queue<_Tp, _Sequence>::value_type = sharkWay]’ 265 | push(const value_type& __x) | ^~~~ /usr/include/c++/11/bits/stl_queue.h:265:30: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const value_type&’ {aka ‘const sharkWay&’} 265 | push(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/11/bits/stl_queue.h:270:7: note: candidate: ‘void std::queue<_Tp, _Sequence>::push(std::queue<_Tp, _Sequence>::value_type&&) [with _Tp = sharkWay; _Sequence = std::deque<sharkWay, std::allocator<sharkWay> >; std::queue<_Tp, _Sequence>::value_type = sharkWay]’ 270 | push(value_type&& __x) | ^~~~ /usr/include/c++/11/bits/stl_queue.h:270:25: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::queue<sharkWay>::value_type&&’ {aka ‘sharkWay&&’} 270 | push(value_type&& __x) | ~~~~~~~~~~~~~^~~ Main.cpp: At global scope: Main.cpp:77:1: error: expected declaration before ‘}’ token 77 | } | ^
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.