Problem knightmoves
User j0ashhh
Submission Time 2026-02-20 16:59:02
Score 0
Max Time N/A
Max Memory N/A

Compile Error

knightmoves.cpp: In function ‘int main()’:
knightmoves.cpp:30:9: error: expected ‘;’ before ‘}’ token
30 | break
| ^
| ;
31 | }
| ~
knightmoves.cpp:33:21: error: invalid types ‘int[int]’ for array subscript
33 | int dx = x + dx[i];
| ^
knightmoves.cpp:34:21: error: invalid types ‘int[std::tuple_element<0, std::tuple<int, int> >::type {aka int}]’ for array subscript
34 | int dy = y + dy[y];
| ^
knightmoves.cpp:37:23: error: no matching function for call to ‘std::queue<std::tuple<int, int, int> >::push(int&, int&, std::tuple_element<0, std::tuple<int> >::type)’
37 | q.push(dx, dy, w+1);
| ^
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.c