#include #include #include #include using namespace std; void printShortestPath(int n, int is, int js, int ie, int je) { vector a1; int c=0; char s[6][3]={"LL","LR","UL","UR","R","L"}; int i=ie-is; int j=je-js; if(i%2!=0) { cout<<"Impossible"; return ; } else{ while(i!=0||j!=0) { if(i>=2) { if(j<0) { a1.push_back(0); c++; i=i-2; j=j+1; } else{ a1.push_back(1); i=i-2; j=j-1; c++; } } if(i<=-2) { if(j<0) { a1.push_back(2); i=i+2; j=j+1; c++; } else{ a1.push_back(3); i=i+2; j=j+1; c++; } } if(i==0) { if(j==1||j==-1) cout<<"impossible"; else if(j>=2) { a1.push_back(4); j=j-2; c++; } else if(j<=-2) { a1.push_back(5); j=j+2; c++; } } } } 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; }