#include using namespace std; bool prio(string s1, string s2){ map priority = {{"UL", 0}, {"UR", 1}, {"R", 2}, {"LR", 3}, {"LL", 4}, {"L", 5}}; return priority[s1] < priority[s2]; } void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { string lr[4] = {"LR", "UR", "UL", "LL"}; string r[4] = {"R", "R", "L", "L"}; string ll[4] = {"LL", "UL", "UR", "LR"}; int ori; if(i_start<=i_end){ if(j_start<=j_end) ori = 0; else ori = 3; } else{ if(j_start<=j_end) ori = 1; else ori = 2; } if((i_end-i_start)%2!=0){ cout<<"Impossible"< path; 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; }