Rescue Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 27406 Accepted Submission(s): 9711 Problem Description Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is d…
http://acm.hdu.edu.cn/showproblem.php?pid=4568 Hunter Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1254 Accepted Submission(s): 367 Problem Description One day, a hunter named James went…
Battle City Many of us had played the game "Battle city" in our childhood, and some people (like me) even often play it on computer now. What we are discussing is a simple edition of this game. Given a map that consists of empty spaces, rivers,…
D. Lunar New Year and a Wander bfs+优先队列 题意 给出一个图,从1点开始走,每个点至少要经过一次(可以很多次),每次经过一个没有走过的点就把他加到走过点序列中,问最小字典序的序列是多少 思路 起始就是从每次可达的点的选取最小的那个走,拓展可达的点,然后重复直到走完了全部为止,直接用个bfs+优先队列即可 #include<bits/stdc++.h> #include<stdlib.h> using namespace std; const in…
Rescue Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 20938 Accepted Submission(s): 7486 Problem Description Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is d…
直接把Angle的位置作为起点,广度优先搜索即可,这题不是步数最少,而是time最少,就把以time作为衡量标准,加入优先队列,队首就是当前time最少的.遇到Angle的朋友就退出.只需15ms AC代码: #include<cstdio> #include<cstring> #include<queue> using namespace std; const int maxn=202; int d[maxn][maxn]; int n,m; char G[maxn]…
Description Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and GUARDs in the prison. Angel's friends want to save Angel. Their task is: approach Angel…
Waiting ten thousand years for Love Time Limit: 10000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1057 Accepted Submission(s): 335 Problem Description It was ten thousand years, after Demon Lemon caught Y…
Ignatius and the Princess I Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 13911 Accepted Submission(s): 4370 Special Judge Problem Description The Princess has been abducted by the BEelzeb…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1548 There is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two buttons: up and down.When you at floor i,if yo…
Battle City Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7579 Accepted: 2544 Description Many of us had played the game "Battle city" in our childhood, and some people (like me) even often play it on computer now. What we are…
Ignatius and the Princess I Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description The Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Princess. Now he g…
Problem Description Luke最近沉迷一款RPG游戏,游戏中角色可以进入地牢关卡,只要顺利走出地牢就可以获得奖励.地牢表示为n行m列的块矩阵,其中每个块只可以是障碍块.入口.出口或数字块,角色不能通过障碍块,其余块均可任意通行,角色经过数字块时疲劳度会增加相应的数字(经过出入口不产生疲劳).地牢有若干入口和1个出口,角色可以任意选择入口.抵达出口时的疲劳值越少,地牢提供的奖励越多,为了尽可能获得更多的奖励,问从进入地牢到离开地牢所产生的疲劳值最少是多少,如果无法抵达出口,输出-…
来源poj2312 Many of us had played the game "Battle city" in our childhood, and some people (like me) even often play it on computer now. What we are discussing is a simple edition of this game. Given a map that consists of empty spaces, rivers, st…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1242 题目描述: Problem Description Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and GUARDs in the prison…
Description Captain Clearbeard decided to go to the harbour for a few days so his crew could inspect and repair the ship. Now, a few days later, the pirates are getting landsick(Pirates get landsick when they don't get enough of the ships' rocking mo…