BFS
文章平均质量分 87
mrcoderrev
C
展开
-
BFS——NYOJ 21 三个水杯
三个水杯时间限制:1000 ms | 内存限制:65535 KB难度:4描述给出三个水杯,大小不一,并且只有最大的水杯的水是装满的,其余两个为空杯子。三个水杯之间相互倒水,并且水杯没有标识,只能根据给出的水杯体积来计算。现在要求你写出一个程序,使其输出使初始状态到达目标状态的最少次数。输入第一行一个整数N(0接下来每组测试数据有两行,第一行给出三转载 2016-05-27 17:55:23 · 294 阅读 · 0 评论 -
cf 727A Transformation: from A to B(搜索)
A. Transformation: from A to Btime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasily has a number a, which原创 2017-11-14 17:53:37 · 793 阅读 · 0 评论 -
51 nod 1693 水群(最短路)
1693 水群基准时间限制:0.4 秒 空间限制:524288 KB 分值: 160 难度:6级算法题 收藏 关注总所周知,水群是一件很浪费时间的事,但是其实在水群这件事中,也可以找到一些有意思的东西。比如现在,bx2k就在研究怎样水表情的问题。首先,bx2k在对话框中输入了一个表情,接下来,他可以进行三种操作。第一种,是全选原创 2017-10-25 16:06:08 · 275 阅读 · 0 评论 -
poj 3083 Children of the Candy Corn (dfs+bfs)
The cornfield maze is a popular Halloween treat. Visitors are shown the entrance and must wander through the maze facing zombies, chainsaw-wielding psychopaths, hippies, and other terrors on their que原创 2017-11-01 20:29:58 · 191 阅读 · 0 评论 -
hiho #1539 : 数组重排3(bfs)
#1539 : 数组重排3时间限制:10000ms单点时限:1000ms内存限制:256MB描述给定一个{1..N}的排列A1, A2, ... AN,每一次操作可以将相邻的两个数一起移动(保持两个数相邻且前后顺序不变)到任意位置。询问至少经过多少次操作,可以使得原序列变为1, 2, ..., N。例如对于54321,把32一起移原创 2017-07-24 09:49:10 · 362 阅读 · 0 评论 -
zzuli 1726: 迷宫(bfs)@
1726: 迷宫Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 500 Solved: 79SubmitStatusWeb BoardDescription在很多 RPG (Role-playing Games) 游戏中,迷宫往往是非常复杂的游戏环节。通常来说,我们在走迷宫的时候都需要花非常多的时间来尝试不同的路径。但原创 2017-04-15 10:57:47 · 461 阅读 · 0 评论 -
poj 2965 The Pilots Brothers' refrigerator (状压+bfs)
The game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a refrigerator.There are 16 handles on the refrigerator door. Every handle can be in one of two原创 2017-03-13 12:09:19 · 250 阅读 · 0 评论 -
poj 2049 Finding Nemo(bfs+dij 建图难)
Nemo is a naughty boy. One day he went into the deep sea all by himself. Unfortunately, he became lost and couldn't find his way home. Therefore, he sent a signal to his father, Marlin, to ask for hel原创 2017-03-13 12:08:26 · 282 阅读 · 0 评论 -
light oj 1046(广搜。。。。)
1046 - Rider PDF (English)StatisticsForumTime Limit: 1 second(s)Memory Limit: 32 MBA rider is a fantasy chess piece that can jump like a knight seve原创 2016-10-25 08:31:09 · 295 阅读 · 0 评论 -
UESTC - 149 解救小Q
解救小QTime Limit: 1000MS Memory Limit: 65535KB 64bit IO Format: %lld & %lluSubmit StatusDescription小Q被邪恶的大魔王困在了迷宫里,love8909决定去解救她。迷宫里面有一些陷阱,一旦走到陷阱里,就会被困身亡:(,迷宫里原创 2016-07-14 17:16:36 · 482 阅读 · 0 评论 -
hdu A Famous Grid (bfs)
A Famous GridTime Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2292 Accepted Submission(s): 869Problem DescriptionMr. B has recently disco...原创 2019-03-13 11:33:34 · 166 阅读 · 0 评论