#include using namespace std; vector > cs; vector > fs; int n; int a[250][250]; pair sn; pair en; int circle[12]={-2,-1,-2,1,0,2,2,1,2,-1,0,-2}; bool insqr(pair node){ if(node.first<0 || node.first>=n || node.second<0 || node.second >=n) return false; return true; } void func(pair node,int path_val){ // cout << node.first << " " << node.second << endl; // cout << path_val << endl; if(path_val >= a[node.first][node.second]) return; if(!insqr(node)) return; cs.push_back(node); a[node.first][node.second] = path_val; if(node == en){ // cout << "in"< tmp; tmp.first = node.first + circle[i]; tmp.second = node.second + circle[i+1]; func(tmp,path_val+1); } cs.pop_back(); return ; } void print(){ for(int i=0;i>n; int x,y; cin >>x>>y; sn = make_pair(x,y); cin >>x>>y; en = make_pair(x,y); for(int i=0;i tmp1; pairtmp2; tmp1=fs[i]; tmp2=fs[i+1]; for(int j=0;j<12;j=j+2){ if(tmp1.first + circle[j] == tmp2.first and tmp1.second + circle[j+1] == tmp2.second){ if(j==0) s+="UL"; if(j==2) s+="UR"; if(j==4) s+="R"; if(j==6) s+="LR"; if(j==8) s+="LL"; if(j==10) s+="L"; break; } } if(i