//red knight's shortest path world code sprll hackerrank #include using namespace std; typedef long long int ll; #define PII pair #define mp make_pair(make_pair(ll(-1),ll(-1)),ll(-1)) ll n; ll dy[] = {-1,1,2,1,-1,-2}; ll dx[] = {-2,-2,0,2,2,0}; bool visited[202][202]={0}; ll level[202][202]={0}; pair parent[202][202]; bool bfs(PII p1, PII p2) { visited[p1.first][p1.second]=true; queue q; q.push(p1); PII p; while(!q.empty()) { PII p; p=q.front(); q.pop(); for(ll i=0;i<6;i++) { ll x,y; x=p.first+dx[i]; y=p.second+dy[i]; //cout<=0&&x=0&&y>n; ll istart,jstart,iend,jend; cin>>istart>>jstart>>iend>>jend; for(ll i=0;i<202;i++) { for(ll j=0;j<202;j++) { visited[i][j]=0; level[i][j]=0; parent[i][j]=mp; } } if(bfs(make_pair(istart,jstart),make_pair(iend,jend))==true) { cout<