#include using namespace std; void pass(int t) { if(t==1) cout<<"R "; else if(t==2) cout<<"L "; else if(t==3) cout<<"UR "; else if(t==4) cout<<"LR "; else if(t==5) cout<<"UL "; else if(t==6) cout<<"LL "; } void printShortestPath(int n, int is, int js, int ie, int je) { // Print the distance along with the sequence of moves. int dis[n][n],pi[n][n]; //keeps min distance of every vertex(x,y) from (is,js) int i,j; for(i=0;i> q; q.push(make_pair(js,is)); while(!q.empty()) { pair p=q.front(); q.pop(); int x=p.first; int y=p.second; //cout<<"pop "<=0 && x+2=0 && y=0 && x-2=0 && y=0 && x+1=0 && y+2=0 && x+1=0 && y-2=0 && x-1=0 && y+2=0 && x-1=0 && y-2> 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; }