摘要: 首先要清楚棋盘行列表示方法。注意要求按字典序输出,我的搜索方向是 dx[ ],dy[ ].dfs初步,具体看代码。 1 #include 2 #include 3 #include 4 using namespace std; 5 int visit[10][10]; 6 7 struct Step 8 { 9 int x,y;10 };11 Step step[100];12 int p,q; //p是行(数字),q是列(字母)13 int dx[8]={-1,1,-2,2,-2,2,-1,1}; //要满足字典序,顺序不能改14 int dy[8]={-2,-2,-1,-1... 阅读全文
posted @ 2013-10-03 17:44 小の泽 阅读(118) 评论(0) 推荐(0) 编辑