码迷,mamicode.com
首页 >  
搜索关键字:nightmare    ( 81个结果
HDU 1072 Nightmare BFS
其实就是多加了一个引爆时间的限制条件,反正n,m给的很小,直接记录3维状态,之后就很随意了。#include #include #include #include #include #include #include #include #include #include #include #incl...
分类:Web程序   时间:2014-08-23 16:35:31    阅读次数:233
HDU 1072 (不一样的入队条件) Nightmare
之前的BFS都是需要一个标记数组,但这个题不一样,因为可能一个格子不止走一次。那么我们就要寻找新的入队条件:left比上次经过的时候大才入队(left表示上次经过该点时剩余的时间)。为什么呢?我们重复走过一个点只有一个可能,那就是为了去取那个,所以如果取完后再回头经过这个点的时候剩余时间变多了,我们...
分类:Web程序   时间:2014-08-15 22:31:19    阅读次数:262
POJ 1984 Navigation Nightmare (数据结构-并查集)
POJ 1984 Navigation Nightmare (数据结构-并查集) 题目大意: 给定n个城市,m条边告诉你城市间的相对距离,接下来q组询问,问你在第几条边添加后两城市的距离。 解题思路: 用离线处理,再用并查集维护每个城市到父亲城市的距离。...
分类:Web程序   时间:2014-07-31 00:07:55    阅读次数:398
HDUJ 1072 Nightmare 搜索
Nightmare Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6992    Accepted Submission(s): 3354 Problem Description Ignatius had a night...
分类:Web程序   时间:2014-07-28 16:07:13    阅读次数:274
HDU 1072:Nightmare(BFS)
Nightmare Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6968    Accepted Submission(s): 3344 Problem Description Ignatius had a n...
分类:Web程序   时间:2014-07-27 11:36:14    阅读次数:281
HDU 1072 Nightmare (BFS)
HDU 1072 Nightmare (BFS) 不是根据重置点进行判断,而是另外打了一个时间表,感觉这样能节省时间。...
分类:Web程序   时间:2014-07-27 11:32:22    阅读次数:252
POJ 1984 Navigation Nightmare 二维带权并查集
题目来源:POJ 1984 Navigation Nightmare 题意:给你一颗树 k次询问 求2点之间的曼哈顿距离 并且要在只有开始k条边的情况下 思路:按照方向 我是以左上角为根 左上角为原点 dx[i]为i点距离根的x坐标 dy[]是y坐标 这两个可以通过路径压缩求出 只不过是二维而已 #include #include #include using namespace st...
分类:Web程序   时间:2014-07-26 17:19:52    阅读次数:358
HDU 3085 Nightmare Ⅱ (双向广搜)
题意:有M,G两人和鬼魂(Z)在n*m的方格内,M每秒走3步,G每秒走一步,鬼魂每秒走2步,问是否能 不遇到鬼魂下两人相遇,鬼魂可以穿墙(X),人不可以。初始鬼魂有2个。 #include #include #include #include #include #include #include #define M 800 using namespace std...
分类:Web程序   时间:2014-06-22 18:57:14    阅读次数:189
NYOJ 483 Nightmare 【广搜】+【无标记】
Nightmare 时间限制:1000 ms  |  内存限制:65535 KB 难度:4 描述 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 ...
分类:Web程序   时间:2014-06-16 18:57:52    阅读次数:268
HDU 1072 Nightmare (BFS)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1072 题目大意: 走迷宫,初始剩余时间为6min,每步1min;到reset区是若剩余时间大于0,则可以重置。到终点3区,若时间大于0,则成功逃脱。(可以走回路) 0:wall 1:可以走 2:起点 3:终点 4:剩余时间重置为6 源代码: #include #inc...
分类:Web程序   时间:2014-06-07 13:39:38    阅读次数:298
81条   上一页 1 ... 6 7 8 9 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!