
bfs
Z~柳
这个作者很懒,什么都没留下…
展开
-
HDU2251 3Ddungeon(bfs)
You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south...原创 2019-02-03 16:47:53 · 244 阅读 · 0 评论 -
poj3278(bfs)
Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100,0...原创 2019-02-04 15:56:54 · 107 阅读 · 0 评论 -
寒假训练题之bfs(poj3984)
定义一个二维数组: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表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线。Input一个5 × 5的二维数组,表示一个迷...原创 2019-01-30 00:00:19 · 126 阅读 · 0 评论 -
hdu1072走出迷宫(bfs)
Ignatius had a nightmare last night. He found himself in a labyrinth with a time bomb on him. The labyrinth has an exit, Ignatius should get out of the labyrinth before the bomb explodes. The initial ...原创 2019-02-16 00:25:58 · 273 阅读 · 0 评论 -
poj3126怪癖首相(广搜)
The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices.— It is a matter of sec...原创 2019-01-30 21:01:07 · 154 阅读 · 0 评论 -
hdu3533红蓝大战(广搜)
The students of the HEU are maneuvering for their military training.The red army and the blue army are at war today. The blue army finds that Little A is the spy of the red army, so Little A has to e...原创 2019-02-11 21:16:35 · 173 阅读 · 0 评论 -
hdu1495 平分可乐(bfs)
大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S<101)毫升 (正好装满一瓶) ,它们三个之间可以相互倒可乐 (都是没有刻度的,且 S==N+M,101>S>...原创 2019-02-12 11:24:36 · 340 阅读 · 0 评论