
水题
文章平均质量分 76
__XINGLE
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hdu 1425 整理下水题 排序
Problem Description给你n个整数,请按从大到小的顺序输出其中前m大的数。 Input每组测试数据有两行,第一行有两个数n,m(0<n,m<1000000),第二行包含n个各不相同,且都处于区间[-500000,500000]的整数。 Output对每组测试数据按从大到小的顺序输出前m大的数。 Sample Input5 33 -35 92 213 -644 Samp原创 2015-06-15 21:20:00 · 286 阅读 · 0 评论 -
hdu 2013 整理下水题 递推动规
Problem Description喜欢西游记的同学肯定都知道悟空偷吃蟠桃的故事,你们一定都觉得这猴子太闹腾了,其实你们是有所不知:悟空是在研究一个数学问题!什么问题?他研究的问题是蟠桃一共有多少个!不过,到最后,他还是没能解决这个难题,呵呵^-^当时的情况是这样的:第一天悟空吃掉桃子总数一半多一个,第二天又将剩下的桃子吃掉一半多一个,以后每天吃掉前一天剩下的一半多一个,原创 2015-06-15 21:27:33 · 333 阅读 · 0 评论 -
hdu 1785 整理下水题 排序
Problem Description本次集训队共有30多人参加,毫无疑问,你们都是很优秀的,但是由于参赛名额有限,只能选拔部分队员参加省赛。从学校的角度,总是希望选拔出最优秀的18人组成6支队伍来代表学校。但是,大家也知道,要想做到完全客观,是一件很难的事情。因为选拔的标准本身就很难统一。为了解决这个难题,我现在把问题作了简化,现在假设每个队员都是二维平面中的一个点,用(xi,yi)原创 2015-06-15 21:21:58 · 423 阅读 · 0 评论 -
hdu 1022 整理下水题 栈和队列
Problem DescriptionAs the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is原创 2015-06-15 21:08:59 · 381 阅读 · 0 评论 -
hdu 1711 整理下水题
Problem DescriptionGiven two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a number K which make a[K] =原创 2015-06-15 21:42:33 · 345 阅读 · 0 评论 -
hdu 1789 整理下水题 贪心
Problem DescriptionIgnatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands i原创 2015-06-15 21:00:05 · 260 阅读 · 0 评论 -
CodeForces 560B Gerald is into Art
Gerald bought two very rare paintings at the Sotheby's auction and he now wants to hang them on the wall. For that he bought a special board to attach it to the wall and place the paintings on the boa原创 2015-08-20 17:02:59 · 412 阅读 · 0 评论 -
hdu 1159 整理下水题 递推动规
Problem DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence Z = is a subsequence of X if there e原创 2015-06-15 21:37:13 · 272 阅读 · 0 评论 -
hdu 1009 整理下水题 贪心
Problem DescriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean.The warehouse has N rooms. The i-th room con原创 2015-06-15 20:57:31 · 614 阅读 · 0 评论 -
hdu 2041 整理下水题 递推动规
Problem Description有一楼梯共M级,刚开始时你在第一级,若每次只能跨上一级或二级,要走上第M级,共有多少种走法? Input输入数据首先包含一个整数N,表示测试实例的个数,然后是N行数据,每行包含一个整数M(1 Output对于每个测试实例,请输出不同走法的数量 Sample Input2原创 2015-06-15 21:29:29 · 265 阅读 · 0 评论 -
hdu 2569 整理下水题 递推动规
Problem Description突破蝙蝠的包围,yifenfei来到一处悬崖面前,悬崖彼岸就是前进的方向,好在现在的yifenfei已经学过御剑术,可御剑轻松飞过悬崖。现在的问题是:悬崖中间飞着很多红,黄,蓝三种颜色的珠子,假设我们把悬崖看成一条长度为n的线段,线段上的每一单位长度空间都可能飞过红,黄,蓝三种珠子,而yifenfei必定会在该空间上碰到一种颜色的珠子。如果在连续3原创 2015-06-15 21:33:18 · 533 阅读 · 0 评论 -
CodeForces 560A Currency System in Geraldion
A magic island Geraldion, where Gerald lives, has its own currency system. It uses banknotes of several values. But the problem is, the system is not perfect and sometimes it happens that Geraldionian原创 2015-08-20 16:49:31 · 462 阅读 · 0 评论 -
hdu 1702 整理下水题 栈和队列
Problem DescriptionACboy was kidnapped!! he miss his mother very much and is very scare now.You can't image how dark the room he was put into is, so poor :(.As a smart ACMer, you want to get A原创 2015-06-15 21:05:55 · 326 阅读 · 0 评论 -
hdu 2602 整理下水题 背包
Problem DescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s , also he went to the grav原创 2015-06-15 21:39:08 · 829 阅读 · 0 评论 -
hdu 2037 整理下水题
Problem Description“今年暑假不AC?”“是的。”“那你干什么呢?”“看世界杯呀,笨蛋!”“@#$%^&*%...”确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑,奔向电视了。作为球迷,一定想看尽量多的完整的比赛,当然,作为新时代的好青年,你一定还会看一些其它的节目,比如新闻联播(永远不要忘记关心国家大事)、非常6+7、原创 2015-06-15 20:54:51 · 346 阅读 · 0 评论 -
hdu 2020 整理下水题 排序
Problem Description输入n(n Input输入数据有多组,每组占一行,每行的第一个数字为n,接着是n个整数,n=0表示输入数据的结束,不做处理。 Output对于每个测试实例,输出排序后的结果,两个数之间用一个空格隔开。每个测试实例占一行。 Sample Input3 3 -4 2原创 2015-06-15 21:16:47 · 366 阅读 · 0 评论 -
hdu 1870 整理下水题
Problem Description四月一日快到了,Vayko想了个愚人的好办法——送礼物。嘿嘿,不要想的太好,这礼物可没那么简单,Vayko为了愚人,准备了一堆盒子,其中有一个盒子里面装了礼物。盒子里面可以再放零个或者多个盒子。假设放礼物的盒子里不再放其他盒子。用()表示一个盒子,B表示礼物,Vayko想让你帮她算出愚人指数,即最少需要拆多少个盒子才能拿到礼物。原创 2015-06-15 21:03:27 · 382 阅读 · 0 评论 -
UVA 11040 Add bricks in the wall
This in not “another brick in the wall”, it’s just a matter of adding numbers. Suppose you have a wallwith the shape of a triangle, like the one shown below. The wall has 9 rows and row i has exactl原创 2015-08-20 16:51:44 · 334 阅读 · 0 评论 -
hdu 2084 整理下水题 递推动规
Problem Description在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已经告诉你了,这是个DP的题目,你能AC吗? Input输入数据首先包括一个整数C,表示测试实例的个数,每个测试实例的第一行是一个整数N(1原创 2015-06-15 21:34:38 · 297 阅读 · 0 评论 -
hdu 1106 整理下水题 排序
Problem Description输入一行数字,如果我们把这行数字中的‘5’都看成空格,那么就得到一行用空格分割的若干非负整数(可能有些整数以‘0’开头,这些头部的‘0’应该被忽略掉,除非这个整数就是由若干个‘0’组成的,这时这个整数就是0)。你的任务是:对这些分割得到的整数,依从小到大的顺序排序输出。 Input输入包含多组测试用例,每组输原创 2015-06-15 21:13:44 · 330 阅读 · 0 评论