#include using namespace std; int sur(int i_start,int j_start,int i_end,int j_end) { if(i_start-1==i_end && j_start==j_end) { return 1; } else if(i_start-1==i_end && j_start+1==j_end) { return 1; } else if(i_start-1==i_end && j_start-1==j_end) { return 1; } else if(i_start==i_end && j_start+1==j_end) { return 1; } else if(i_start==i_end && j_start-1==j_end) { return 1; } else if(i_start+1==i_end && j_start==j_end) { return 1; } else if(i_start+1==i_end && j_start+1==j_end) { return 1; } else if(i_start+1==i_end && j_start-1==j_end) { return 1; } else { return 0; } } void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { // Print the distance along with the sequence of moves. vector a; while(1) { if(i_start>i_end && j_start>=j_end && i_start-2>=0) { // cout<<"a"; if(sur(i_start, j_start,i_end, j_end)) { cout<<"Impossible"; exit(0); } else { i_start-=2; j_start-=1; a.push_back("UL"); } } else if(i_start>i_end && j_startj_end) { // cout<<"f"; if(sur(i_start, j_start,i_end, j_end)) { cout<<"Impossible"; exit(0); } else { j_start-=2; a.push_back("L"); } } else if(i_start==i_end && j_start==j_end) { 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; }