#include #include #include using namespace std; void printShortestPath(int n, int is, int js, int ie, int je) { // Print the distance along with the sequence of moves. int flag=1; int no=0; std::vector move; std::vector:: iterator it ; if((ie-is)%2!=0) flag=0; else { while(is!= ie) { if(isje) { is+=2; js-=1; move.push_back("LL"); } else if(isie && js>je) { is-=2; js-=1; move.push_back("UL"); } else if(is>ie && jsie && js==je) { is-=2; js-=1; move.push_back("UL"); } else if(is> 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; }