![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
搜索
文章平均质量分 61
zuhiul
这个作者很懒,什么都没留下…
展开
-
Codeforces 1560 F2. Nearest Beautiful Number (hard version)
更好的阅读体验F2. Nearest Beautiful Number (hard version)开启传送门题目描述It is a complicated version of problem F1. The difference between them is the constraints (F1: k≤2k \le 2k≤2, F2: k≤10k \le 10k≤10).You are given an integer nnn. Find the minimum integer xxx原创 2021-08-29 15:14:46 · 117 阅读 · 0 评论 -
poj 3170 Knights of Ni
链接:点这里。Bessie is in Camelot and has encountered a sticky situation: she needs to pass through the forest that is guarded by the Knights of Ni. In order to pass through safely, the Knights have demanded原创 2017-11-28 22:31:44 · 177 阅读 · 0 评论 -
hdu 3152 Obstacle Course
题目链接:传送门。You are working on the team assisting with programming for the Mars rover. To conserve energy, the rover needs to find optimal paths across the rugged terrain to get from its starting location原创 2017-11-02 15:46:20 · 193 阅读 · 0 评论 -
hdu 1429 胜利大逃亡(续)
Ignatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)……这次魔王汲取了上次的教训,把Ignatius关在一个n*m的地牢里,并在地牢的某些地方安装了带锁的门,钥匙藏在地牢另外的某些地方。刚开始Ignatius被关在(sx,sy)的位置,离开地牢的门在(ex,ey)的位置。Ignatius每分钟只能从一个坐标走到相邻四个坐标中的其中一个。魔王每t分钟回地牢视察一次,若发现Ignatius不在原原创 2017-06-15 19:48:54 · 149 阅读 · 0 评论 -
hdu 1069 Monkey and Banana
A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. If the monke原创 2017-05-30 20:36:21 · 194 阅读 · 0 评论 -
poj 2240 Arbitrage
Arbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, suppose that 1 US Dollar buys 0.5 British原创 2017-05-28 14:41:22 · 220 阅读 · 0 评论 -
hdu 1072 Nightmare
DescriptionIgnatius 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. Th原创 2017-05-25 19:16:43 · 159 阅读 · 0 评论 -
hdu 1728 逃离迷宫
给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,gloria是个没什么方向感的人,因此,她在行走过程中,不能转太多弯了,否则她会晕倒的。我们假定给定的两原创 2017-05-24 17:50:21 · 173 阅读 · 0 评论 -
hdu 1175
“连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两次,那么这两个棋子就可以在棋盘上消去。不好意思,由于我以前没有玩过连连看,咨询了同学的意见,连线不能从外面绕过去的,但事实上这是错的。现在已经酿成大祸,就只能将错就错了,连线不能从外围绕过。玩家鼠标先后原创 2017-05-22 18:10:47 · 186 阅读 · 0 评论 -
hdu 1242
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原创 2017-05-22 16:51:27 · 246 阅读 · 0 评论 -
POJ - 3984 迷宫问题
【想法】题目简单,长宽都固定了下来,直接深搜就行。就是记录路径有点障碍,稍微一想就行,还是那句话:一个人可能有多个儿子,但是一定只有一个爸爸,所以每次搜索的时候直接记录当前节点的爸爸是谁就行,然后由最后依次向前统计出路径,压到栈中,反序输出就是答案了。因为起始点和终止点都固定了下来,所以可以用特征值直接扫出答案。【代码】#include <cstdio>#include <cstring>#in原创 2017-05-09 19:20:00 · 178 阅读 · 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 point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100,00原创 2017-05-09 11:53:51 · 202 阅读 · 0 评论 -
poj 3126
The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices.— It is a matter of secu原创 2017-05-07 18:55:57 · 349 阅读 · 0 评论 -
ecnu 3260 袋鼠妈妈找孩子
袋鼠妈妈找不到她的孩子了。她的孩子被怪兽抓走了。袋鼠妈妈现在在地图的左上角,她的孩子在地图第 x 行第 y 列的位置。怪兽想和袋鼠妈妈玩一个游戏:他不想让袋鼠妈妈过快地找到她的孩子。袋鼠妈妈每秒钟可以向上下左右四个方向跳一格(如果没有墙阻拦的话),怪兽就要在一些格子中造墙,从而完成一个迷宫,使得袋鼠妈妈能够找到她的孩子,但最快不能小于 k 秒。请设计这样一个迷宫。Input第一行两个整数 n,m原创 2017-05-13 13:41:57 · 299 阅读 · 0 评论 -
FZU - 2150 Fire Game
Fat brother and Maze are playing a kind of special (hentai) game on an N*M board (N rows, M columns). At the beginning, each grid of this board is consisting of grass or just empty and then they start原创 2017-05-09 20:54:49 · 389 阅读 · 0 评论