pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …
#include <bits/stdc++.h>
using namespace std;
int tx,ty;
int visited[10][10];
struct node
{int x,y,s;
};
int dx[8]={-1,-2,1,2,1,2,-1,-2};//
int dy[8]={2,1,2,1,-2,-1,-2,-1};//
int bfs(int sx,int s…