2009年8月3日

hdu 1429 priority_queue+bfs

摘要: #include <iostream>#include <queue>using namespace std;int n, m, t;char map[20][20];int dir[4][2] = {{0,1},{0,-1},{1,0},{-1,0}};bool hash[20][20][1100];int keybin[10] = {1,2,4,8,16,32,64,1... 阅读全文

posted @ 2009-08-03 15:02 ZAFU_VA 阅读(335) 评论(0) 推荐(0) 编辑

hdu 1732 推箱子 三个箱子

摘要: #include <iostream>#include <queue>using namespace std;struct Point{ int x, y;};struct Node{ Point you, box[3]; int step;};int n, m;char map[8][8];Node first, next;bool hash[8][8][8][8][8]... 阅读全文

posted @ 2009-08-03 13:14 ZAFU_VA 阅读(505) 评论(0) 推荐(0) 编辑

hdu 1254 推箱子

摘要: #include <iostream>#include <queue>using namespace std;int map[7][7];bool hash[7][7];int dir[4][2] = {{0,1},{0,-1},{1,0},{-1,0}};int fuck[7][7][7][7];//记录该状态下的最短步数int n, m;struct Point{ ch... 阅读全文

posted @ 2009-08-03 10:01 ZAFU_VA 阅读(412) 评论(0) 推荐(0) 编辑

导航