摘要:
#include <cstdio>#include <queue>using namespace std ;int dir[8][2] = { -2 ,-1 ,-2 ,1 ,-1 ,2 ,1 ,2 ,2 ,1 ,2 ,-1 ,1 ,-2 ,-1 ,-2} ;int obstacle[4][2] = { -1 ,0 ,0 ,1 ,1 ,0 ,0 ,-1} ;typedef struct coord{ int x ,y ,step;}coord ;bool map[100][100] ,visit[100][100] ;int p ,q ;int bfs(coord sta 阅读全文