#include #define lld long long int #define ld long double #define pb push_back #define fastread ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define PI (atan(1)*4) #define mp make_pair #define Mlog 21 using namespace std; const int maxn=1e6+2; int pos_x[]={-2,-2,0,2,2,0}; int pos_y[]={-1,1,2,1,-1,-2}; int n; struct node { int level; int x,y; string path; }obj,u; bool inrange(int x,int y) { if(x>=0&&x=0&&y>n; cin>>sx>>sy; cin>>ex>>ey; queue q; obj.level=0; obj.x=sx; obj.y=sy; q.push(obj); while(!q.empty()) { u=q.front(); q.pop(); found[u.x][u.y]=true; if(u.x==ex&&u.y==ey) { flag=true; break; } for(i=0;i<6;++i) { if(inrange(u.x+pos_x[i],u.y+pos_y[i])) { if(!found[u.x+pos_x[i]][u.y+pos_y[i]]) { found[u.x+pos_x[i]][u.y+pos_y[i]]=true; node obj; obj.level=u.level+1; obj.x=u.x+pos_x[i]; obj.y=u.y+pos_y[i]; obj.path=u.path+path[i]; q.push(obj); } } } } if(flag) { cout<