bfs 广搜------马的遍历
#include<bits/stdc++.h>
using namespace std;
int dirx[8]={2,2,1,1,-1,-1,-2,-2};
int diry[8]={1,-1,2,-2,2,-2,1,-1};
const int N=405;
int dp[N][N];
int n,m,x,y;
int new_x,new_y;
bool vst[N][N];//访...
翻译
2019-07-11 10:44:54 ·
127 阅读 ·
0 评论