#include using namespace std; int n; struct Point { int x; int y; }; struct queueNode { Point pt; int dist; vector r; }; bool isValid(int row, int col) { return (row >= 0) && (row < n) && (col >= 0) && (col < n); } int colNum[] = {-1, 1, 2, 1,-1,-2}; int rowNum[] = {-2, -2, 0, 2,2,0}; int BFS(Point src, Point dest){ bool visited[n][n]; memset(visited, false, sizeof visited); visited[src.x][src.y] = true; queue q; queueNode s = {src, 0}; q.push(s); while (!q.empty()) { queueNode curr = q.front(); Point pt = curr.pt; if (pt.x == dest.x && pt.y == dest.y){ cout<< curr.dist<>n; int x1,y1,x2,y2; cin>>x1>>y1>>x2>>y2; Point source = {x1, y1}; Point dest = {x2, y2}; int dist = BFS(source, dest); if (dist == INT_MAX) cout << "Impossible"; }