A maze of rectangular rooms is represented on a two dimensional grid as illustrated in figure 1a.
Each point of the grid is represented by a character....
分类:
其他好文 时间:
2014-11-20 18:46:01
阅读次数:
160
……就是爬管道……
还好内存给的多……
不然就不会做了……
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
const int inf=(1<<31)-1;
int dp[51][51][1<<10];
int ro...
分类:
其他好文 时间:
2014-11-16 18:43:52
阅读次数:
234
Description定义一个二维数组:int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, };它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横...
分类:
其他好文 时间:
2014-11-16 15:52:01
阅读次数:
157
Problem Description
Fat brother and Maze are playing a kind of special (hentai) game on an N*M board (N rows, M columns). At the beginning, each grid of this board is consisting of grass or just em...
分类:
其他好文 时间:
2014-11-14 01:39:15
阅读次数:
218
Borg MazeTime Limit:1000MSMemory Limit:65536KTotal Submissions:8905Accepted:2969DescriptionThe Borg is an immensely powerful race of enhanced humanoid...
分类:
编程语言 时间:
2014-11-13 01:49:04
阅读次数:
271
题意:n*m的迷宫。多多要从(1,1)到达(n,m)。每移动一步消耗1秒。有P种钥匙。有K个门或墙。给出K个信息:x1,y1,x2,y2,gi含义是(x1,y1)与(x2,y2)之间有gi。gi=0:墙 1,2,3....:第1种门,第2种门,第3种门.....有S把钥匙。给出S个信息:x1,y1,...
分类:
其他好文 时间:
2014-11-09 22:13:39
阅读次数:
281
题目链接:hdu 5094 Maze
题目大意:给定一张图,现在要从(1,1)的位置移动到(n,m),中途有些位置是存在门或者墙的。相应的门需要那到对应
的钥匙才可以通过。并且给定钥匙的位置。
解题思路:就是普通的bfs,钥匙的拥有可以用一个二进制数表示,唯一麻烦的是它门以及墙是落在边上的,所以我预
处理的时候直接在边上搞。
#include
#include
#in...
分类:
其他好文 时间:
2014-11-09 01:05:00
阅读次数:
186
实践经典迷宫问题的两种解法,给出了实际运行的动态效果图,以帮助体会栈的运用。...
分类:
编程语言 时间:
2014-11-05 23:14:21
阅读次数:
377
1 #include 2 #include 3 #include 4 using namespace std; 5 6 typedef pair P; 7 8 char maze[41][41]; 9 int dist[41][41]; 10 int spDirX[4...
分类:
其他好文 时间:
2014-11-05 01:51:50
阅读次数:
203
hdu 5094 Maze (bfs+状态压缩)—— black 的专栏 ——waShaXiu...
分类:
其他好文 时间:
2014-11-04 17:29:32
阅读次数:
231