#include using namespace std; void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { vector kg; int count=0; while(i_start>=0&&j_start>=0&&i_startj_end) { i_start=i_start+2; j_start=j_start-1; count++; kg.push_back("LL"); } else if(i_start>i_end&&j_start>j_end) { i_start=i_start-2; j_start=j_start-1; count++; kg.push_back("UL"); } else if(i_start>i_end&&j_startj_end) { if(j_start-j_end==1) { printf("Impossible"); return; } i_start=i_start; j_start=j_start-2; count++; kg.push_back("L"); } else if(i_start==i_end&&j_starti_end&&j_start==j_end) { if(i_start-i_end==1) { printf("Impossible"); return; } i_start=i_start-2; j_start=j_start-1; count++; kg.push_back("UL"); } else if(i_start==i_end&&j_start==j_end) { cout << count<> 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; }