#include using namespace std; int col[] = { 2, 2, -2, -2, 0, 0 }; int row[] = { -1, 1, 1, -1, 2, -2 }; bool valid(int x, int y,int N) { if (x < 0 || y < 0 || x >= N || y >= N) return false; return true; } struct Node { int x, y, dist; bool const operator==(const Node& o) const { return x == o.x && y == o.y; } bool operator<(const Node& o) const { return x < o.x || (x == o.x && y < o.y); } }; void BFS(Node src, Node dest,int N) { vector list; map visited; queue q; q.push(src); while (!q.empty()) { Node node = q.front(); q.pop(); int x = node.x; int y = node.y; int dist = node.dist; if (x == dest.x && y == dest.y) { for(int j=0;j> N; int i_start; int j_start; int i_end; int j_end; cin >> i_start >> j_start >> i_end >> j_end; Node src = { j_start,i_start}; Node dest = { j_end,i_end}; BFS(src, dest,N); return 0; }