摘要: http://ac.jobdu.com/problem.php?id=1140 DFS,深度搜索时,从第一行到第8行,用col[i]记录第i行的皇后放的位置(也就是第几列)。View Code 1 #include<iostream> 2 #include<cstring> 3 #include<cmath> 4 #include<algorithm> 5 #include<vector> 6 #define N 8 7 using namespace std; 8 bool mat[N+1][N+1]; 9 int col[N+1] 阅读全文
posted @ 2012-04-06 15:26 keepmoving89 阅读(206) 评论(0) 推荐(0) 编辑