#include #include #include #include #include #include using namespace std; struct pos { int x; int y; int m; }; int main() { int n; cin >> n; for (int i=1; i >(n, vector(n, -1)); board[0][0]=0; deque places = {pos{i,j,1}, pos{j,i,1}}; while (!places.empty()) { auto p = places.front(); if (p.x>=0 && p.x=0 && p.y