Problem knightmoves
User Dan64091
Submission Time 2026-10-23 11:40:48
Score 0
Max Time N/A
Max Memory N/A

Compile Error

knightmoves.cpp: In function ‘int32_t main()’:
knightmoves.cpp:4:13: error: expected ‘,’ or ‘;’ before ‘pair’
4 | #define pii pair<int,int>
| ^~~~
knightmoves.cpp:55:2: note: in expansion of macro ‘pii’
55 | pii start(r, c);
| ^~~
knightmoves.cpp:66:10: error: ‘start’ was not declared in this scope
66 | q.push({start, 0});
| ^~~~~
knightmoves.cpp:66:19: error: no matching function for call to ‘std::queue<std::pair<std::pair<long long int, long long int>, long long int> >::push(<brace-enclosed initializer list>)’
66 | q.push({start, 0});
| ^
In file included from /usr/include/c++/9/queue:64,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from knightmoves.cpp:1:
/usr/include/c++/9/bits/stl_queue.h:259:7: note: candidate: ‘void std::queue<_Tp, _Sequence>::push(const value_type&) [wi