#include using namespace std; struct cell { int x,y,dis; string path; cell() {} cell(int x,int y,int dis,string path): x(x),y(y),dis(dis),path(path) {} }; bool isIn(int x,int y,int n) { if(x>=0 && x=0 && y q; string pos=""; q.push(cell(knight[0],knight[1],0,pos)); cell t; int x,y; bool visit[n][n]; for(int i=0;i>n; int sx,sy,ex,ey; int knight[2],target[2]; cin>>knight[0]>>knight[1]>>target[0]>>target[1]; minStep(knight,target,n); }