摘要: 在移除房间北墙的时候忘了移除该房间北邻的南墙,wa了一次,注意移墙时的搜索顺序:自底向上,自左向右。/* ID:chenjiong PROG:castle LANG:C++*/#include <stdio.h>#include <string.h>const int MAXN = 55;typedef struct { int dir[4][3]; //西北东南}POS;typedef struct { int x; int y; char d; int size;}WALL;int M,N;POS map[MAXN][MAXN];bo... 阅读全文
posted @ 2012-10-27 22:54 Sinker 阅读(156) 评论(0) 推荐(0) 编辑
摘要: /* ID:chenjiong PROG:checker LANG:C++*/#include <stdio.h>#include <string.h>const int MAXN = 15;int N;bool column[MAXN];bool diagonal1[2 * MAXN - 1];bool diagonal2[2 * MAXN - 1];int ans[MAXN];int p;int cnt;int print_times;void dfs(int cur){ if ( cur == N + 1 ) { if ( print_time... 阅读全文
posted @ 2012-10-27 00:51 Sinker 阅读(177) 评论(0) 推荐(0) 编辑