DFS专题 Fire Net
摘要:
这道题暴力秒过,以前在ZOJ上见过,当时不会,还以为不剪枝铁定超呢,结果纯暴力就过了。# include <cstdio># include <cstring># define N 4 + 3int n, ans;char g[N][N];bool check(int x, int y){ int i = x; if (g[x][y] != '.') return false; while (i <= n) { if (g[i][y] == 'X') break; else if (g[i][y] == (i-1)*n+y) ret 阅读全文
posted @ 2012-07-19 19:57 getgoing 阅读(245) 评论(0) 推荐(0) 编辑