#include<iostream>#include<cstdio>#include<queue>using namespace std;class P{public: char mark; int record; //搜索过这里没 int x,y; vector<int> XX; vector<int> Y...
原创 2021-07-12 10:17:14
51阅读
Problem Description
原创 2023-04-24 09:11:25
235阅读
                                 &n
原创 2013-07-21 10:43:00
635阅读
问题链接:HDU1026 Ignatius and the Princess I。题意简述:从矩阵的左上角走到右下角所需的最短时间,并且要求输出走的过程。矩阵中"."是可以走的,"X"是墙,n(数字1-9)是怪兽,需要战斗数字所示的时间。对于每个测试实例,先输入n和m...
转载 2016-08-17 03:09:00
31阅读
2评论
问题链接:HDU1026 Ignatius and the Princess I。题意简述:从矩阵的左上角走到右下角所需的最短时间,并且要求输出走的过程。矩阵中"."是可以走的,"X"是墙,n(数字1-9)是怪兽,需要战斗数字所示的时间。对于每个测试实例,先输入n和m...
转载 2016-08-17 03:09:00
64阅读
2评论
HDU1026 Ignatius and the Princess ITime Limit: 2000/1000 MS (Java/Others) Memory
原创 2022-11-30 13:12:41
89阅读
Ignatius and the Princess I Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 11710 Accepted Submi
转载 2017-05-23 17:16:00
84阅读
2评论
Problem Description The Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Princess. Now he gets into feng5166's castle. The castle is a large labyrinth. To make the problem simply, we assume the labyrinth is a N*M two-dimensional array which left-to
转载 2013-08-02 22:32:00
46阅读
2评论
Problem Description The Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Princess. Now he gets into feng5166's castle. The castle is a large labyrinth. To make the problem simply, we assume the labyrinth is a N*M two-dimensional array which left-to
转载 2013-08-03 22:40:00
26阅读
2评论
Ignatius and the Princess I Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 18858    Accepted Submissi
原创 2022-08-09 22:21:20
86阅读
地址:http://acm.hdu.edu.cn/showproblem.php?pid=1026题意:n*m迷宫,求从(0,0)到(n-1,m-1)的最少时间。'X'是墙,'.'是空地,'1'-'9'表示有怪物,消灭之需要数字对应的时间。mark:最近一直在写搜索题。搜索题有的很费劲,但是写多也就觉得嗯,就那么回事。这题也没啥可说的,直接BFS。和最简单的BFS不同的是,判断一个过去到过的点是否可走,需要多开一个数组来记录,然后判断过去到达的时间和现在到达的时间的大小。(其实最好的方法是优先队列么。。。懒得写而已。)然后因为要求
转载 2012-01-17 05:28:00
32阅读
Ignatius and the Princess ITime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14212    Accepted Submission(s): 4488Special JudgeProblem
原创 2023-08-15 17:30:49
50阅读
原题链接: http://acm.hdu.edu.cn/showprob终点的最小秒,并输出路径。二:分析
原创 2022-12-06 19:19:02
53阅读
点击打开链接
原创 2022-06-15 21:25:27
36阅读
单纯bfs问题。 左上角是入口迷宫,右下角是出口,有战斗在迷宫1~9后卫,他们需要击败1~9时间。 遇到怪物就能判断是什么。步骤反向输出可。 因为需要记录的步骤,队列了。 也能够使用priority_queue 优化到 0ms, 模拟queue #include<cstdio> #include<cstring> #include<string>
转载 2015-09-17 18:59:00
24阅读
2评论
上班之余抽点时间出来写写博文,希望对新接触的朋友有帮助。今天在这里和大家一起学习一下最小方向本来一道简略的搜索题,输出方式是难点每日一道理 在每个人心中,都曾停留过那些值得怀念的人,也许还在,也许早
转载 2013-05-28 23:28:00
26阅读
广搜的一个简单变形,思路还是一样的,依旧是维护一个队列,将一个节点不断的扩展,扩展完后出队。这道题还有两个特点就是:可能遇到怪兽,因此需要额外花费n秒的时间来打败它。最终还要输出路径。因此结构体里面prex 和 prey就是来记录下一个格子的坐标的。因为有了怪兽所以我们不能一搜到起点就退出搜索,因为...
转载 2014-08-13 23:16:00
24阅读
2评论
Ignatius and the Princess ITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 8405Accepted Submission(s): 2499 Special JudgeProblem DescriptionThe Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Prince
转载 2013-03-28 10:47:00
80阅读
2评论
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=1026在这博客学的 ttp://www.wutianqi.com/?p=2354感觉看了这个之后收获良多#include <queue>#include <stack>#include <cstdio>#include <iostream>#include <string.h>#include <algorithm>using namespace std;typedef struct node{ int x,y,dis; int
原创 2021-07-29 16:17:19
91阅读
Ignatius and the Princess I Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 17171 Accepted Submis
原创 2021-07-21 15:47:34
59阅读
  • 1
  • 2
  • 3
  • 4
  • 5