poj2688

摘要: #include using namespace std; #include int m,n; char map[25][25]; int vis[25][25]; typedef struct node { int x; int y; }node; node queue[500];//放需要清理的点 int total; int dx[4]={-1,0,1,0}; int d... 阅读全文
posted @ 2017-05-17 16:55 bbcai 阅读(133) 评论(0) 推荐(0) 编辑

poj2362

摘要: #include using namespace std; int data[20]; int total; int rec; int n; int vis[20]; int flag; int flag1; void dfs(int step,int sum,int k) { if(step==3) //step为3时就可以退出了,因为前面三步都已经成功了,剩下的肯... 阅读全文
posted @ 2017-05-10 09:01 bbcai 阅读(123) 评论(0) 推荐(0) 编辑

poj1979

摘要: #include using namespace std; char map[25][25]; int n,m; int sx,sy; int vis[25][25]; typedef struct node { int x; int y; }node; node queue[10000]; int sum; int dx[4]={-1,0,1,0}; int dy[4]={0,... 阅读全文
posted @ 2017-05-08 16:17 bbcai 阅读(109) 评论(0) 推荐(0) 编辑

poj1699

摘要: #include #include using namespace std; char map[11][33]; int case_num,N,vis[11],len[11],addlen[11][11]; int mintotal; void add(int m, int n) { int maxcomlen=0; for(int i=1;i=mintotal) ... 阅读全文
posted @ 2017-05-08 15:27 bbcai 阅读(166) 评论(0) 推荐(0) 编辑

poj1416

摘要: #include using namespace std; int target,datanum; int road[100],temproad[100]; int N,flag,maxsum; int data[100],datatemp[100]; int tail; void cun(int n) { tail=0; while(n/10) { ... 阅读全文
posted @ 2017-05-05 09:04 bbcai 阅读(98) 评论(0) 推荐(0) 编辑

poj1915

摘要: #include using namespace std; #define SIZE 305 int vis[SIZE][SIZE]; int sx,sy,ex,ey; int dx[8]={-1,-2,-2,-1,1,2,2,1}; int dy[8]={-2,-1,1,2,2,1,-1,-2}; int n,case_num; typedef struct node { int x... 阅读全文
posted @ 2017-05-04 09:20 bbcai 阅读(102) 评论(0) 推荐(0) 编辑

poj1008

摘要: #include #include using namespace std; int n; int day,year; char month[10]; char haab[19][7]={"pop", "no", "zip", "zotz", "tzec", "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh" 阅读全文
posted @ 2017-05-03 15:30 bbcai 阅读(86) 评论(0) 推荐(0) 编辑

poj3009

摘要: #include using namespace std; int data[20][20]; int sx,sy; int m,n;//m行n列 int minstep; int dx[4]={-1,0,1,0}; int dy[4]={0,1,0,-1}; void dfs(int x, int y, int step) { if(step==11) retur... 阅读全文
posted @ 2017-05-03 09:26 bbcai 阅读(85) 评论(0) 推荐(0) 编辑

poj1164

摘要: #include using namespace std; int data[51][51]; int vis[51][51]; int roomnum; int maxroom; int m,n; typedef struct node { int x; int y; }node; node queue[1000]; int sum; void bfs(int x, int y... 阅读全文
posted @ 2017-05-02 14:30 bbcai 阅读(83) 评论(0) 推荐(0) 编辑

poj2386

摘要: #include char map[101][101]; int vis[101][101]; typedef struct node { int x; int y; }node; node queue[10000]; int n,m; int dx[8]={-1,-1,-1,0,1,1,1,0}; int dy[8]={-1,0,1,1,1,0,-1,-1}; int ... 阅读全文
posted @ 2017-04-28 15:10 bbcai 阅读(96) 评论(0) 推荐(0) 编辑