#include #include using namespace std; 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. string s[6] = {"UL","UR","R","LR","LL","L"}; int i1,j1,i2,j2; i1 = i_start; j1 = j_start; i2 = i_end; j2 = j_end; while(i1!=i2 && j1!=j2) { cout<<"cone"<i2) { // i1=i1-2; if(j1i2) { i1 = i1-2; j1 = j1+1; cout<j2) { while(i1>i2) { i1 = i1-2; j1 = j1-1; cout<i2) { i1 = i1-2; j1 = j1-1; cout<i2) { i1 = i1-2; j1 = j1-1; cout<j1) { while(j2>j1) { j1=j1+2; cout<j2) { while(j1>j2) { j1=j1-2; 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; }