#include using namespace std; void printShortestPath(int n, int si, int sj, int di, int dj) { // Print the distance along with the sequence of moves. int flag=0, count=0; string s; while(flag==0) { if(si==di && sj==dj) { break; } if(abs(di-si)==1 && abs(dj-sj)==1) { flag = 1; break; } else if(disj)//up right { si-=2; sj+=1; //cout<<"UR"<<" "; s+="UR "; count++; } else//above { if((si-di)%4 !=0) { flag = 1; break; } else { int x = (si-di)/4; for(int i=0; isi)//dest is down { if(dj>sj)//down right { si = si+2; sj = sj+1; //cout<<"LR"<<" "; s+="LR "; count++; } else if(djsj)//right { if((dj-sj)%2 !=0) { flag = 1; break; } else { int x = (dj-sj)/2; for(int i=0; i> 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; }