#include #include #include #include #include #include #include void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { if(i_start == i_end){ if(j_start < j_end){ // Right int sub = j_end - j_start; if(sub%2==0){ //right printf("%d\n",sub/2); int i; for(i=0;i i_end){ int sub = i_start - i_end; if(sub%2==0){ //upper printf("%d\n",sub/2); int i; for(i=0;i i_end){ int sub = i_start - i_end,count=0,i; if(sub % 2 == 0){ count += sub / 2; if(j_start < j_end){ sub = j_end - (j_start+count); if(sub % 2 == 0){ int temp=count; count += sub / 2; printf("%d\n",count); for(i=0;i