#include #define MAX 201 using namespace std; int a[MAX][MAX]; int b[MAX][MAX]; int yy[]={-1,1,2,1,-1,-2}; int xx[]={-2,-2,0,2,2,0}; string s[]={"UL","UR","R","LR","LL","L"}; struct grid { int x,y,dist; grid(int a, int b, int w) : x(a), y(b), dist(w) { } }; int path(int x,int y,int x_end,int y_end,int n) { queue q; grid source(x,y,0); q.push(source); a[x][y]=1; while (!q.empty()) { grid p = q.front(); q.pop(); // Destination found; if (p.x==x_end && p.y==y_end) return p.dist; for(int i=0;i<6;i++) { if(p.x+xx[i]>=0 && p.x+xx[i]=0 && p.y+yy[i] v; int x=i_end; int y=j_end; //cout<=0;x--) cout<> n; int i_start; int j_start; int i_end; int j_end; cin >> i_start >> j_start >> i_end >> j_end; printShortestPath(n, i_start, j_start, i_end, j_end); return 0; }