![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM—广搜
文章平均质量分 85
蝉鸣的夏季
要在IT这条不归路上,越走越远了。
展开
-
HDU 1072 Nightmare
题目描述 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 i原创 2016-09-09 18:39:03 · 188 阅读 · 0 评论 -
CodeForces - 520B Two Buttons
Vasya has found a strange device. On the front panel of a device there are: a red button, a blue button and a display showing some positive integer. After clicking the red button, device multiplies th原创 2017-04-13 19:09:50 · 245 阅读 · 0 评论 -
hdu 1242 Rescue(广搜+优先队列)
Problem DescriptionAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M Angel's friends want to save Angel. Their task is: approach Angel. W原创 2017-04-13 21:23:28 · 185 阅读 · 0 评论 -
HDU - 1728 逃离迷宫
给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,gloria是个没什么方向感的人,因此,她在行走过程中,不能转太多弯了,否则她会晕倒的。我们假定给定的原创 2017-04-14 21:30:15 · 203 阅读 · 0 评论 -
POJ - 3278 Catch That Cow
Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a pointN (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 10原创 2017-04-15 08:26:06 · 198 阅读 · 0 评论 -
nyoj 21 三个水杯
给出三个水杯,大小不一,并且只有最大的水杯的水是装满的,其余两个为空杯子。三个水杯之间相互倒水,并且水杯没有标识,只能根据给出的水杯体积来计算。现在要求你写出一个程序,使其输出使初始状态到达目标状态的最少次数。输入第一行一个整数N(0接下来每组测试数据有两行,第一行给出三个整数V1 V2 V3 (V1>V2>V3 V10)表示三个水杯的体积。第二行给出三个整数E1 E2 E3 (体原创 2017-04-16 21:41:35 · 273 阅读 · 0 评论 -
nyoj 284 坦克大战(广搜+优先队列)
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 tha原创 2017-05-03 21:17:24 · 339 阅读 · 0 评论 -
nyoj 1100 WAJUEJI which home strong!( BFS+优先队列)
在一个山沟里,姐弟俩同时考上了大学。但由于家里拮据,所以这并不是什么好消息。父亲对孩子说:我就是砸锅卖铁也要把你们姐俩供出来。 当时的姐姐已经决定放弃上学的机会。 没想到第二天天还没亮,弟弟就偷偷带著几件破衣服和几个乾巴馒头走了,在姐姐枕边留下一个纸条: 姐,你别愁了,考上大学不容易,我出去打工供你。弟。 姐姐握著那张字条,趴在炕上,失声痛哭。 那一年,弟弟17岁,姐姐20岁。 姐姐用父亲满村子借原创 2017-05-13 11:35:34 · 252 阅读 · 0 评论 -
nyoj 58 最少步数
这有一个迷宫,有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 1,1,0,1,0,1,0,0,1 1,1,0,1,0,0,0,0,1 1,1,1,1,1,1,1,1,1原创 2017-04-18 00:01:11 · 190 阅读 · 0 评论 -
CodeForces - 242C King's Path (广搜+STL)
The black king is standing on a chess field consisting of 109 rows and 109 columns. We will consider the rows of the field numbered with integers from1 to 109 from top to bottom. The columns are s原创 2017-04-11 22:02:41 · 535 阅读 · 0 评论 -
HDU - 2354 Another Brick in the Wall (优先队列+BFS 记忆化)
After years as a brick-layer, you've been called upon to analyze the structural integrity of various brick walls built by the Tetrad Corporation. Insteadof using regular-sized bricks, the Tetrad C原创 2017-04-11 20:25:02 · 299 阅读 · 0 评论 -
HDU 1175 连连看
题目描述“连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两次,那么这两个棋子就可以在棋盘上消去。不好意思,由于我以前没有玩过连连看,咨询了同学的意见,连线不能从外面绕过去的,但事实上这是错的。现在已经酿成大祸,就只能将错就错了,连线不能从外围绕原创 2016-09-11 14:23:53 · 256 阅读 · 0 评论 -
HDU 1548 A strange lift
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 you原创 2016-09-02 14:19:34 · 215 阅读 · 0 评论 -
HDU 1372 Knight Moves
A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a chessboa原创 2016-09-02 15:31:16 · 214 阅读 · 0 评论 -
广搜之倒叙输出最短路径
地图是自己输入的,S为起始点,E为终点,*为不能走的路。输出则是走过的路。#include#include#include#includeusing namespace std;struct note{ int x,y; }Dian,dian;queueq;char Map[105][105];int book[105][105];int sx原创 2016-12-04 21:31:24 · 827 阅读 · 0 评论 -
Dungeon Master
You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south原创 2017-03-06 14:30:15 · 189 阅读 · 0 评论 -
天梯赛 L2-020. 功夫传人
一门武功能否传承久远并被发扬光大,是要看缘分的。一般来说,师傅传授给徒弟的武功总要打个折扣,于是越往后传,弟子们的功夫就越弱…… 直到某一支的某一代突然出现一个天分特别高的弟子(或者是吃到了灵丹、挖到了特别的秘笈),会将功夫的威力一下子放大N倍 —— 我们称这种弟子为“得道者”。这里我们来考察某一位祖师爷门下的徒子徒孙家谱:假设家谱中的每个人只有1位师傅(除了祖师爷没有师傅);每位师傅可以原创 2017-03-28 10:19:43 · 252 阅读 · 0 评论 -
MX的密码锁 (广搜)
在赢得了友谊赛后, MX获得了无敌变身的技能,他带着技能在寒假去ZKY做了实习工,并在寒假结束之后获得了一大笔财富,MX为了不让这笔钱充公,决定将这笔私房钱藏起来,连MM也不告诉藏在哪,为此MM很是苦恼(有钱不让我花)。有一天MM在工作室偶然发现了一个小箱子,箱子上除了有一个3*3的密码锁外还写着“MX的私房钱”(MDZZ)。密码锁有以下四种操作:1.使同一列中三个数同时向下移动一格,并使最下原创 2017-03-21 15:26:28 · 887 阅读 · 0 评论 -
CodeForces - 198B Jumping on Walls
Vasya plays a computer game with ninjas. At this stage Vasya's ninja should get out of a deep canyon.The canyon consists of two vertical parallel walls, their height is n meters. Let's imagine tha原创 2017-03-30 11:20:43 · 430 阅读 · 0 评论 -
HDU - 2612 Find a way
Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a good friend Merceki.Yifenfei’s home is at the原创 2017-03-30 14:03:39 · 157 阅读 · 0 评论 -
nyoj 635 Oh, my goddess 优先队列+BFS
Shining Knight is the embodiment of justice and he has a very sharp sword can even cleavewall. Many bad guys are dead on his sword.One day, two evil sorcerer cgangee and Jackchess decided to give原创 2017-05-21 20:15:32 · 287 阅读 · 0 评论