码迷,mamicode.com
首页 >  
搜索关键字:hdu1072    ( 9个结果
hdu1072 逃离迷宫系列 bfs
题目链接:http://icpc.njust.edu.cn/Problem/Hdu/1072/ 题意:逃离迷宫,路中可能有炸弹,总时间是6个单位,在有炸弹的位置,如果到达的时刻时间大于0,则恢复到6时间,炸弹的位置可以重复到达,求出最终至少需要多少步才能走出迷宫,到达终点。这样的最优化问题和地图相关 ...
分类:其他好文   时间:2020-03-17 08:22:43    阅读次数:63
Nightmare HDU1072
非常标准的BFS 第一次写错了很多 1、到达4时设置为墙就好了 避免了死循环 2、不用开d数组 在结构体里面就行了 3、结构体初始化函数的写法: Node(int x=0,int y=0,int oil=0):x(x),y(y),oil(oil){} 4、bfs的FOR里面的判断条件可以写的很清晰! ...
分类:Web程序   时间:2019-01-21 16:04:34    阅读次数:184
hdu1072(dfs和bfs)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1072 题意:有一个n*m的矩阵迷宫,2是起点,3是终点,0是墙不能走,1是路,现在有6分钟炸弹要爆炸,没走一步花一分钟,问你是否能到达终点 能,则输出最短时间,不能输出-1。而4是重置时间,将时间变为6 ...
分类:其他好文   时间:2018-07-28 15:58:20    阅读次数:176
hdu1072
#include <iostream> #include <cstdio> #include <cstring> #include <queue> using namespace std; class Data { public: int Etime; int x, y; int count; }; ...
分类:其他好文   时间:2017-01-21 21:11:10    阅读次数:209
hdu1072 bfs时间优化剪枝
Nightmare Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9424 Accepted Submission(s): 4551 Probl ...
分类:其他好文   时间:2016-04-26 19:06:29    阅读次数:192
hdu1072【bfs可重复走】
大意:给一个矩阵 有一个六秒之内会爆炸的炸弹 爆炸事件在数值为4的位置会重置为60: The area is a wall, Ignatius should not walk on it.1: The area contains nothing, Ignatius can walk on it.2....
分类:其他好文   时间:2015-03-04 20:57:53    阅读次数:138
hdu 1072 Nightmare BFS,第一次刷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 exploding time of the bomb is set to 6 minutes. To preve...
分类:Web程序   时间:2015-02-12 22:51:36    阅读次数:188
HDU1072 Nightmare 【BFS】
Nightmare Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7367    Accepted Submission(s): 3530 Problem Description Ignatius had a n...
分类:Web程序   时间:2014-10-21 07:50:00    阅读次数:202
Hdu1072广搜
题意:0不能走,1可以走,2起始位置,3中点,4时间变成6.初始时间为6 走到终点或者4时时间不能为0.问能否走到终点和 到终点的最短距离。反正时间就是6 ,每个点可以重复走,随便走就行。剪纸 就是 经过4这个点只要经过一次,第二次经过这个点的路程一定比第一次经过的长 并且都重置了时间。#inc.....
分类:其他好文   时间:2014-09-12 18:53:23    阅读次数:165
9条  
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!