#include using namespace std; int xmoves[] = { -2 , -2 , 0 , 2 , 2 , 0 }; int ymoves[] = {-1,1,2,1,-1,-2} ; struct cell { int x,y; int dis; vector< pair > path; }; bool isValid(int x, int y, int N) { if(x>=0 && x=0 && y > &path) { mapm; m[-3]="UL", m[-1] = "UR", m[2]="R", m[3]="LR", m[1] = "LL", m[-2] = "L"; /*for(int i = 0 ;i > path; path.push_back(make_pair(knightPos[0],knightPos[1])); bool visited[N][N]; for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) visited[i][j] = false; cell t,c; int x,y,dis; t.x = knightPos[0]; t.y = knightPos[1]; t.dis = 0; t.path = path; queueq; q.push(t); while(!q.empty()) { t = q.front(); q.pop(); path = t.path; visited[t.x][t.y] = true; if(t.x == targetPos[0] && t.y == targetPos[1]) { cout<>n>>a>>b>>c>>d; int knightPos[] = {a,b}; int targetPos[] = {c,d}; find_path(knightPos,targetPos,n); return 0; }