#include using namespace std; void printShortestPath(int n, int i_s, int j_s, int i_e, int j_e) { //if(i_s < i_e) swap(i_s,i_e); //if(j_s < j_e) swap(j_s,j_e); int count=0;string a=""; if((i_s-i_e)%2!=0){ cout<<"Impossible"; return ; } int temp; while(i_s!=i_e) { if(i_s >i_e) { i_s-=2; if(j_s>=j_e) { j_s-=1; a=a+"UL "; } else { j_s+=1; a=a+"UR "; } } else { temp=i_e-i_s; while((j_e-j_s)>temp/2) { count++; a=a+"R "; j_s+=2; } i_s+=2; if(j_s>j_e) { j_s-=1; a=a+"LL "; } else { j_s+=1; a=a+"LR "; } } count++; } if((j_s-j_e)%2!=0) { cout<<"Impossbile"; return; } while(j_s!=j_e) { if(j_s>j_e) { j_s-=2;a=a+"L "; } else{ j_s+=2; a=a+"R "; } count++; } 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; }