
搜索
文章平均质量分 84
shao824714565
这个作者很懒,什么都没留下…
展开
-
NYOJ 58 最少步数(广搜入门经典)
最少步数时间限制:3000 ms | 内存限制:65535 KB难度:4描述这有一个迷宫,有0~8行和0~8列: 1,1,1,1,1,1,1,1,1 1,0,0,1,0,0,1,0,1 1,0,0,1,1,0,0,0,1 1,0,1,0,1,1,0,1,1 1,0,0,0,0,1,0,0,1 1,1,0,1,0,1,0,0,1原创 2016-07-15 20:01:09 · 24049 阅读 · 0 评论 -
POJ 1190 生日蛋糕
7月17日是Mr.W的生日,ACM-THU为此要制作一个体积为Nπ的M层生日蛋糕,每层都是一个圆柱体。 设从下往上数第i(1 Ri+1且Hi > Hi+1。 由于要在蛋糕上抹奶油,为尽可能节约经费,我们希望蛋糕外表面(最下一层的下底面除外)的面积Q最小。 令Q = Sπ 请编程对给出的N和M,找出蛋糕的制作方案(适当的Ri和Hi的值),使S最小。(除Q外,以上所有数据皆为正整原创 2016-12-18 22:12:45 · 25105 阅读 · 0 评论 -
HDU-3085 Nightmare Ⅱ (双BFS)
Last night, little erriyue had a horrible nightmare. He dreamed that he and his girl friend were trapped in a big maze separately. More terribly, there are two ghosts in the maze. They will kill the p原创 2016-12-15 20:53:47 · 27487 阅读 · 0 评论 -
POJ 3083 Children of the Candy Corn (BFS+DFS)
DescriptionThe cornfield maze is a popular Halloween treat. Visitors are shown the entrance and must wander through the maze facing zombies, chainsaw-wielding psychopaths, hippies, and other t原创 2016-11-14 20:34:27 · 24288 阅读 · 0 评论 -
POJ 1724 ROADS (优先队列+最短路)
DescriptionN cities named with numbers 1 ... N are connected with one-way roads. Each road has two parameters associated with it : the road length and the toll that needs to be paid for the ro原创 2016-11-16 21:22:00 · 24362 阅读 · 0 评论 -
POJ 3414 Pots(模拟倒水)
DescriptionYou are given two pots, having the volume of A and B liters respectively. The following operations can be performed:FILL(i) fill the pot i (1 ≤ i ≤ 2) from the tap;DROP原创 2016-11-09 21:19:25 · 24144 阅读 · 0 评论 -
HDU 1180 诡异的楼梯
DescriptionHogwarts正式开学以后,Harry发现在Hogwarts里,某些楼梯并不是静止不动的,相反,他们每隔一分钟就变动一次方向. 比如下面的例子里,一开始楼梯在竖直方向,一分钟以后它移动到了水平方向,再过一分钟它又回到了竖直方向.Harry发现对他来说很难找到能使得他最快到达目的地的路线,这时Ron(Harry最好的朋友)告诉Harry正好有一个魔法道具可原创 2016-11-07 21:10:50 · 24098 阅读 · 0 评论 -
POJ 2965 The Pilots Brothers' refrigerator
DescriptionThe game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a refrigerator.There are 16 handles on the refrigerator door. Every handle原创 2016-11-04 19:24:33 · 23778 阅读 · 0 评论 -
POJ 1753 Flip Game
DescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other one is black and each piece is l原创 2016-11-03 22:06:04 · 23825 阅读 · 0 评论 -
NYOJ 21 三个水杯(BFS)
描述给出三个水杯,大小不一,并且只有最大的水杯的水是装满的,其余两个为空杯子。三个水杯之间相互倒水,并且水杯没有标识,只能根据给出的水杯体积来计算。现在要求你写出一个程序,使其输出使初始状态到达目标状态的最少次数。输入第一行一个整数N(0接下来每组测试数据有两行,第一行给出三个整数V1 V2 V3 (V1>V2>V3 V10)表示三个水杯的体积。第二行给出三原创 2016-09-14 19:18:32 · 27508 阅读 · 0 评论 -
NYOJ 20 吝啬的国度(深搜)
描述在一个吝啬的国度里有N个城市,这N个城市间只有N-1条路把这个N个城市连接起来。现在,Tom在第S号城市,他有张该国地图,他想知道如果自己要去参观第T号城市,必须经过的前一个城市是几号城市(假设你不走重复的路)。输入第一行输入一个整数M表示测试数据共有M(1每组测试数据的第一行输入一个正整数N(1随后的N-1行,每行有两个正整数a,b(1输出每组测试原创 2016-09-09 21:45:23 · 27640 阅读 · 0 评论 -
NYOJ 27 水池数目
?????????3000 ms | ?????65535 KB???4?????????????????????????????????????????????????????????????????????????????????????????????????????????????N?????N?????????????????????m原创 2016-07-13 11:10:52 · 33195 阅读 · 2 评论 -
HDU 2102 A计划(广度优先搜索+数据)
A计划Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 17222 Accepted Submission(s): 4329Problem Description可怜的公主在一次次被魔王掳走一次次被骑士们原创 2016-07-30 11:21:02 · 29401 阅读 · 2 评论 -
NYOJ 1058 部分和问题(简单深搜)
部分和问题时间限制:1000 ms | 内存限制:65535 KB难度:2描述给定整数a1、a2、.......an,判断是否可以从中选出若干数,使它们的和恰好为K。输入首先,n和k,n表示数的个数,k表示数的和。接着一行n个数。(1输出如果和恰好可以为k,输出“YES”,并按输入顺序依次输出是由哪几个数的和组成,否则“NO”样例输入原创 2016-07-15 20:46:30 · 25609 阅读 · 0 评论 -
HDU 3309 Roll The Cube
Problem DescriptionThis is a simple game.The goal of the game is to roll two balls to two holes each.'B' -- ball'H' -- hole'.' -- land'*' -- wallRemember when a ball rolls into a hole, t原创 2016-12-13 16:32:40 · 24411 阅读 · 0 评论