摘要:
#include <cstdio>#include <iostream>#include <queue>using namespace std;int dir[8][2]={{1,2},{1,-2},{-1,2},{-1,-2},{2,1},{-2,1},{2,-1},{-2,-1}};int vis[9][9];int sx,sy,ex,ey;struct node{ int x,y,step;};int num;queue<node> q; void bfs(int x1,int y1) { int i; while(!q.empty()) 阅读全文