摘要:
这个问题的难处,对我而言在于计步数,开始时想在for(i = 0; i #include #include using namespace std; typedef struct Tdata //定义结点数据类型
{ int x; int y;
}data; int s[8][8]; //结点表:a1 对应 s[0][0],a8 对应 s[0][7]
int vis[8][8]; //状态标记,0为未访问过,1为访问过
int cnt; //步数计数器 int dx[] = {-1, -2, -2, -1, 1,... 阅读全文