
HDU
文章平均质量分 59
Alex_McAvoy
想要成为渔夫的猎手
展开
-
Buried memory(HDU-3007)
Problem DescriptionEach person had do something foolish along with his or her growth.But,when he or she did this that time,they could not predict that this thing is a mistake and they will want thi...原创 2020-02-04 18:26:28 · 659 阅读 · 0 评论 -
Kejin Player(HDU-6656)
Problem DescriptionCuber QQ always envies those Kejin players, who pay a lot of RMB to get a higher level in the game. So he worked so hard that you are now the game designer of this game. He decid...原创 2019-10-25 19:49:59 · 565 阅读 · 0 评论 -
Roundgod and Milk Tea(HDU-6667)
Problem DescriptionRoundgod is a famous milk tea lover at Nanjing University second to none. This year, he plans to conduct a milk tea festival. There will be n classes participating in this festiv...原创 2019-10-13 18:25:44 · 730 阅读 · 0 评论 -
Quailty and CCPC(HDU-6666)
Problem DescriptionConsidering the overall difficulty of other problems, we invite Quailty to propose an easy problem for this contest.Quailty accidentally won both gold medal and silver medal in...原创 2019-10-13 18:08:41 · 434 阅读 · 0 评论 -
Acesrc and Good Numbers(HDU-6659)
Problem DescriptionAcesrc is a famous mathematician at Nanjing University second to none. Playing with interesting numbers is his favorite. Today, he finds a manuscript when cleaning his room, whic...原创 2019-10-13 15:37:18 · 381 阅读 · 0 评论 -
Sudoku Killer(HDU-1426)
Problem Description自从2006年3月10日至11日的首届数独世界锦标赛以后,数独这项游戏越来越受到人们的喜爱和重视。据说,在2008北京奥运会上,会将数独列为一个单独的项目进行比赛,冠军将有可能获得的一份巨大的奖品———HDU免费七日游外加lcy亲笔签名以及同hdu acm team合影留念的机会。所以全球人民前仆后继,为了奖品日夜训练茶饭不思。当然也包括初学者l...原创 2018-03-19 19:38:27 · 404 阅读 · 0 评论 -
Sequence Two(HDU-2611)
Problem DescriptionSearch is important in the acm algorithm. When you want to solve a problem by using the search method, try to cut is very important.Now give you a number sequence, include n (&...原创 2018-03-19 19:50:20 · 480 阅读 · 0 评论 -
Sequence One(HDU-2610)
Problem Description Search is important in the acm algorithm. When you want to solve a problem by using the search method, try to cut is very important.Now give you a number sequence, incl...原创 2018-03-19 19:35:51 · 842 阅读 · 0 评论 -
Another Eight Puzzle(HDU-2514)
Problem DescriptionFill the following 8 circles with digits 1~8,with each number exactly once . Conntcted circles cannot be filled with two consecutive numbers.There are 17 pairs of connected cic...原创 2018-03-19 19:32:23 · 683 阅读 · 0 评论 -
Pusher(HDU-2821)
Problem Description PusherBoy is an online game http://www.hacker.org/push . There is an R * C grid, and there are piles of blocks on some positions. The goal is to clear the blocks by pushing i...原创 2018-03-19 19:28:57 · 500 阅读 · 0 评论 -
The magic apple tree(HDU-3290)
Problem DescriptionSailormoon girls all like eating many kinds of fruit, such as banana, grape, apple and so on.One day, when they was walking on a orchard, they found a magic apple tree.The magi...原创 2018-03-19 19:25:39 · 470 阅读 · 0 评论 -
Prime Ring(HDU-1016)
Problem DescriptionA ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime....原创 2018-03-19 19:23:17 · 276 阅读 · 0 评论 -
Tempter of the Bone(HDU-1010)
Problem Description The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. ...原创 2018-03-19 19:20:32 · 415 阅读 · 0 评论 -
非常可乐(HDU-1495)
Problem Description 大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N毫升和M毫升 可乐的体积为S毫升 (正好装满一瓶) ,它们三个之间可以相互倒可乐 (都是没有刻度的,且 ...原创 2018-03-19 19:17:37 · 440 阅读 · 0 评论 -
Red and Black(HDU-1312)
Problem Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four a...原创 2018-03-16 23:21:12 · 594 阅读 · 0 评论 -
Knight Moves(HDU-1372)
Problem Description 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 ...原创 2018-03-16 23:25:06 · 317 阅读 · 0 评论 -
A strange lift(HDU-1548)(dfs实现)
Problem Description 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 d...原创 2018-03-18 11:06:18 · 473 阅读 · 1 评论 -
A strange lift(HDU-1548)(bfs实现)
Problem Description 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 d...原创 2018-03-18 11:03:37 · 483 阅读 · 0 评论 -
Rescue(HDU-1242)
Problem Description Angel's friends want to save Angel. Their task is: approach Angel. We assume that approach Angel is to get to the position where Angel stays. When there's a guard in the grid...原创 2018-03-18 10:57:22 · 584 阅读 · 0 评论 -
Oil Deposits(HDU-1241)
Problem Description The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and crea...原创 2018-03-16 14:57:00 · 355 阅读 · 0 评论 -
Catch him(HDU-2351)
Problem Description 在美式足球中,四分卫负责指挥整只球队的进攻战术和跑位,以及给接球员传球的任务。四分卫是一只球队进攻组最重要的球员,而且一般身体都相对比较弱小,所以通常球队会安排5-7名大汉来保护他,其中站在四分卫前方、排成一线的5名球员称为进攻锋线,他们通常都是135公斤左右的壮汉。对防守方来说,攻击对手的四分卫当然是最直接的限制对手进攻的方法。如果...原创 2018-03-16 14:54:59 · 309 阅读 · 0 评论 -
连连看(HDU-1175)
Problem Description “连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两次,那么这两个棋子就可以在棋盘上消去。不好意思,由于我以前没有玩过连连看,咨询了同学的意见,连线不能从外面绕过去的,但事实上这是错的。现在已经酿成大祸...原创 2018-03-15 21:45:03 · 1444 阅读 · 2 评论 -
猜数字(HDU-2178)
Problem Description A有一个数m,B来猜。B每猜一次,A就说太大、太小或对了。问B猜n次可以猜到的最大数。Input 第1行是整数T,表示有T组数据,下面有T行每行一个整数n (1 ≤ n ≤ 30)Output 猜n次可以猜到的最大数Sample Input213Sa...原创 2018-03-15 21:35:40 · 1080 阅读 · 0 评论 -
Cable master(HDU-1551)
Problem Description Inhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize the most honest contest ...原创 2018-03-15 20:36:02 · 398 阅读 · 0 评论 -
Line Belt(HDU-3400)
Problem Description In a two-dimensional plane there are two line belts, there are two segments AB and CD, lxhgww's speed on AB is P and on CD is Q, he can move with the speed R on other area on...原创 2018-03-14 18:58:07 · 347 阅读 · 0 评论 -
Turn the corner(HDU-2438)
Problem Description Mr. West bought a new car! So he is travelling around the city.One day he comes to a vertical corner. The street he is currently in has a width x, the street he wants t...原创 2018-03-14 15:16:32 · 363 阅读 · 0 评论 -
Toxophily(HDU-2298)
Problem Description The recreation center of WHU ACM Team has indoor billiards, Ping Pang, chess and bridge, toxophily, deluxe ballrooms KTV rooms, fishing, climbing, and so on.We all like...原创 2018-03-13 23:41:41 · 381 阅读 · 0 评论 -
Pie(HDU-1969)
Problem DescriptionMy birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are comin...原创 2018-03-13 22:10:20 · 344 阅读 · 0 评论 -
Strange fuction(HDU-2899)
Problem DescriptionNow, here is a fuction:F(x) = 6 * x^7+8*x^6+7*x^3+5*x^2-y*x (0 <= x <=100)Can you find the minimum value when x is between 0 and 100.InputThe first line o...原创 2018-03-13 17:47:10 · 389 阅读 · 0 评论 -
Can you solve this equation?(HDU-2199)
Problem DescriptionNow,given the equation 8*x^4 + 7*x^3 + 2*x^2 + 3*x + 6 == Y,can you find its solution between 0 and 100;Now please try your lucky.InputThe first line of the inpu...原创 2018-03-12 21:41:34 · 337 阅读 · 0 评论 -
Max Sum(HDU-1003)
Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence.For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + ...原创 2018-03-26 20:31:41 · 961 阅读 · 0 评论 -
Common Subsequence(HDU-1159)
Problem Description A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, ..., xm>,another sequence Z = <z1, ...原创 2018-03-26 20:37:04 · 414 阅读 · 0 评论 -
Super Jumping! Jumping! Jumping!(HDU-1087)
Problem Description Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it t...原创 2018-03-26 20:40:59 · 640 阅读 · 0 评论 -
Humble Numbers(HDU-1058)
Problem Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows the ...原创 2018-03-26 20:42:53 · 311 阅读 · 0 评论 -
Monkey and Banana(HDU-1069)
Problem Description 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...原创 2018-03-26 20:44:55 · 1745 阅读 · 0 评论 -
数塔(HDU-2084)
Problem Description 在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已经告诉你了,这是个DP的题目,你能AC吗?Input 输入数据首先包括一个整数C,表示测试实例的个数,每个测试实例的第一行是一个整数N(1 ...原创 2018-03-27 23:25:59 · 594 阅读 · 0 评论 -
免费馅饼(HDU-1176)
Problem Description 都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游戏,虽然在...原创 2018-03-27 23:28:20 · 622 阅读 · 0 评论 -
命运(HDU-2571)
Problem Description 穿过幽谷意味着离大魔王lemon已经无限接近了!可谁能想到,yifenfei在斩杀了一些虾兵蟹将后,却再次面临命运大迷宫的考验,这是魔王lemon设下的又一个机关。要知道,不论何人,若在迷宫中被困1小时以上,则必死无疑!可怜的yifenfei为了去救MM,义无返顾地跳进了迷宫。让我们一起帮帮执着的他吧!命运大迷宫可以看成是一个两维的方格...原创 2018-03-27 23:32:16 · 404 阅读 · 0 评论 -
超级楼梯(HDU-2040)
Problem Description 有一楼梯共M级,刚开始时你在第一级,若每次只能跨上一级或二级,要走上第M级,共有多少种走法?Input 输入数据首先包含一个整数N,表示测试实例的个数,然后是N行数据,每行包含一个整数M(1<=M<=40),表示楼梯的级数。Output 对于每个测试实例,请输出不同走法的数量Sample Input2...原创 2018-03-27 23:34:41 · 1264 阅读 · 0 评论 -
一只小蜜蜂(HDU-2044)
Problem Description 有一只经过训练的蜜蜂只能爬向右侧相邻的蜂房,不能反向爬行。请编程计算蜜蜂从蜂房a爬到蜂房b的可能路线数。其中,蜂房的结构如下所示。Input 输入数据的第一行是一个整数N,表示测试实例的个数,然后是N 行数据,每行包含两个整数a和b(0<a<b<50)。Output 对于每个测试实例,...原创 2018-03-27 23:36:41 · 534 阅读 · 0 评论