
bfs
文章平均质量分 80
Alone枫叶
世界上有10种人,一种懂二进制,一种不懂二进制。
展开
-
poj3984迷宫问题 入门搜索bfs
这道题如果不要求写路径,就是一道简单的bfs#include #include #include using namespace std;int map[5][5];int dx[4]={1,-1,0,0},dy[4]={0,0,1,-1};struct Node{ //定义了一个结构体数组,用来模拟队列原创 2016-03-11 21:15:47 · 519 阅读 · 0 评论 -
hdu1072 Nightmare(bfs)
NightmareTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9662 Accepted Submission(s): 4696Problem DescriptionIgnatius had a night原创 2016-06-26 15:48:55 · 406 阅读 · 0 评论 -
poj 2251 Dungeon Master
Description - 题目描述 你被困在一个3D地牢中且继续寻找最短路径逃生!地牢由立方体单位构成,立方体单位中有的会充满岩石。向上下前后左右移动一个单位需要一分钟。你不能向对角线的四个方向移动且迷宫四周环绕着许多岩石。 是否可以逃出地牢?如果可以,则需要多少时间? Input - 输入 输入的第一行包含一个数,表示地牢的数量。 每个地牢的描述,其第一行原创 2017-08-02 16:42:58 · 366 阅读 · 0 评论 -
poj 3278
Catch That CowTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 95646 Accepted: 30002DescriptionFarmer John has been informed of the location of a fugit原创 2017-08-02 16:49:11 · 270 阅读 · 0 评论