摘要: #include #include structpos{ int x,y;};pos path[50];int p,q,visit[50][50],step,a[8][2]={{-2,1},{-2,-1},{-1,-2},{-1,2},{1,-2},{1,2},{2,-1},{2,1}}; //一定要保证是字典顺序int DFS (int r,int c){ path[step].x=r; path[step++].y=c; if (step>p*q) return 1; int R,C; for (int i=0;i0 && C0 && ... 阅读全文
posted @ 2013-11-17 15:41 单调的幸福 阅读(177) 评论(0) 推荐(0) 编辑