摘要:
Problem DescriptionNowadays, 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 to you now.The game can be played by two or more than two players. It consists of a chessboard(棋盘)and some 阅读全文
posted @ 2012-03-14 17:40
'wind
阅读(336)
评论(0)
推荐(0)
摘要:
Problem DescriptionA 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, z2, ..., zk> is a subsequence of X if there exists a strictly increasing sequence <i1, i2, ..., ik&g 阅读全文
posted @ 2012-03-14 17:39
'wind
阅读(937)
评论(0)
推荐(0)
摘要:
DescriptionGiven a set of n integers: A={a1, a2,..., an}, we define a function d(A) as below:Your task is to calculate d(A).InputThe input consists of T(<=30) test cases. The number of test cases (T) is given in the first line of the input.Each test case contains two lines. The first line is an i 阅读全文
posted @ 2012-03-14 17:34
'wind
阅读(1105)
评论(0)
推荐(0)
摘要:
Problem DescriptionGiven 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 + (-1) + 5 + 4 = 14.InputThe first line of the input contains an integer T(1<=T<=20) which means the number 阅读全文
posted @ 2012-03-14 17:32
'wind
阅读(762)
评论(0)
推荐(0)
摘要:
Description"47 is the quintessential random number," states the 47 society. And there might be a grain of truth in that.For example, the first ten digits of the Euler's constant are:2 7 1 8 2 8 1 8 2 8And what's their sum? Of course, it is 47.You are given a sequence S of integers 阅读全文
posted @ 2012-03-14 17:22
'wind
阅读(445)
评论(0)
推荐(0)
摘要:
Problem Description世界杯结束了,意大利人连本带利的收回了法国人6年前欠他们的债,捧起了大力神杯,成就了4星意大利.世界杯虽然结束了,但是这界世界杯给我们还是留下许多值得回忆的东西.比如我们听到了黄名嘴的3分钟激情解说,我们懂得了原来可以向同一个人出示3张黄牌,我们还看到了齐达内的头不仅能顶球还能顶人…………介于有这么多的精彩,xhd决定重温德国世界杯,当然只是去各个承办世界杯比赛的城市走走看看.但是这需要一大比钱,幸运的是xhd对世界杯的热爱之情打动了德国世界杯组委会,他们将提供xhd在中国杭州和德国任意世界杯承办城市的往返机票,并说服了这些城市在xhd到达这座城市时为他提 阅读全文
posted @ 2012-03-14 17:20
'wind
阅读(249)
评论(0)
推荐(0)
摘要:
Description一年一度的哈理工选美大赛开始了.来自各个院系的N个美女们都在一起排成一排,然后从左到右给他们标号(1-N),评委叫兽开始观摩,由于身高高低都不同, 叫兽想从中选出尽可能多的人使得他们的身高从左到右依次递增,你能帮助叫兽吗?Input输入数据第一行一个数据表示美女的个数N(0接下来有N个数据表示1-N标号的美女的身高,身高范围都在0-180之内当N=0时候输入结束Output按照样例输出,首先The number is N:N是选出最多美女个数,然后后面输出N个数,代表选出美女的标号,从左到右依次输出.题目保证答案唯一Sample Input32 1 231 2 30Sam 阅读全文
posted @ 2012-03-14 14:55
'wind
阅读(299)
评论(0)
推荐(0)
摘要:
Problem Description某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹.怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊.所以俺就到这里来求救了,请帮助计算一下最少需要多少套拦截系统.Input输入若干组数据.每组数据包括:导弹总个数(正整数),导弹依此飞来的高度(雷达给出的高度数据是不大于30000的正整数,用空格分隔)Output对应每组数据 阅读全文
posted @ 2012-03-14 14:53
'wind
阅读(239)
评论(0)
推荐(0)
摘要:
转自:// Blog:www.WuTianQi.com最长上升子序列 LIS(Longest Increasing Subsequence)引出:问题描述:给出一个序列a1,a2,a3,a4,a5,a6,a7….an,求它的一个子序列(设为s1,s2,…sn),使得这个子序列满足这样的性质,s1<s2<s3<…<sn并且这个子序列的长度最长。输出这个最长的长度。(为了简化该类问题,我们将诸如最长下降子序列及最长不上升子序列等问题都看成同一个问题,其实仔细思考就会发现,这其实只是<符号定义上的问题,并不影响问题的实质)例如有一个序列:1 7 3 5 9 4 8,它的 阅读全文
posted @ 2012-03-14 14:49
'wind
阅读(952)
评论(0)
推荐(1)
摘要:
Problem Description电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的余额,问最少可使卡上的余额为多少。Input多组数据。对于每组数据:第一行为正整数n,表示菜的数量。n<=1000。第二行包括n个正整数,表示每种菜的价格。价格不超过50。第三行包括一个正整数m,表示卡上的余额。m<=1000。n=0表示数据结束。Ou 阅读全文
posted @ 2012-03-14 14:16
'wind
阅读(258)
评论(0)
推荐(0)
摘要:
Problem DescriptionNowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College had ever been split into Computer College and Software College in 2002.The splitting is absolutely a big event in HDU! At the same time, it is a troubl 阅读全文
posted @ 2012-03-14 14:14
'wind
阅读(331)
评论(0)
推荐(0)
摘要:
Problem DescriptionSpeakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的。Speakless没有多少钱,总共只攒了n万美元。他将在m个学校中选择若干的(当然要在他的经济承受范围内)。每个学校都有不同的申请费用a(万美元),并且Speakless估计了他得到这个学校offer的可能性b。不同学校之间是否得到offer不会互相影响。“I NEED A OFFER”,他大叫一声。帮帮这个可怜的人吧,帮助他计算一下,他可以收到至少一份offer的最大概率。(如果 阅读全文
posted @ 2012-03-14 14:12
'wind
阅读(252)
评论(0)
推荐(0)
摘要:
Problem Description最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产生的厌恶感,但又不得不通过杀怪来升完这最后一级。现在的问题是,xhd升掉最后一级还需n的经验值,xhd还留有m的忍耐度,每杀一个怪xhd会得到相应的经验,并减掉相应的忍耐度。当忍耐度降到0或者0以下时,xhd就不会玩这游戏。xhd还说了他最多只杀s只怪。请问他能升掉这最后一级吗?Input输入数据有多组,对于每组数据第一行输入n,m,k,s(0 < n,m,k,s < 100)四个正整数。分别表示还需的经验值,保留的忍耐度,怪的种数和最 阅读全文
posted @ 2012-03-14 14:09
'wind
阅读(1172)
评论(0)
推荐(0)
摘要:
Problem DescriptionWhuacmers use coins.They have coins of value A1,A2,A3...An Silverland dollar. One day Hibix opened purse and found there were some coins. He decided to buy a very nice watch in a nearby shop. He wanted to pay the exact price(without change) and he known the price would not more th 阅读全文
posted @ 2012-03-14 14:06
'wind
阅读(455)
评论(0)
推荐(0)
摘要:
DescriptionMarsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles. This would be easy if all the marbles had the same value, because then they could just split the collection in half. But unfortunately, some 阅读全文
posted @ 2012-03-14 14:02
'wind
阅读(233)
评论(0)
推荐(0)
摘要:
Problem Description为了挽救灾区同胞的生命,心系灾区同胞的你准备自己采购一些粮食支援灾区,现在假设你一共有资金n元,而市场有m种大米,每种大米都是袋装产品,其价格不等,并且只能整袋购买。请问:你用有限的资金最多能采购多少公斤粮食呢?Input输入数据首先包含一个正整数C,表示有C组测试用例,每组测试用例的第一行是两个整数n和m(1<=n<=100, 1<=m<=100),分别表示经费的金额和大米的种类,然后是m行数据,每行包含3个数p,h和c(1<=p<=20,1<=h<=200,1<=c<=20),分别表示每袋的价 阅读全文
posted @ 2012-03-14 14:00
'wind
阅读(303)
评论(0)
推荐(0)
摘要:
DescriptionDota中英雄技能攻击会有一个范围,现在释放一个技能给出他的攻击范围和目标英雄的位置,问是否能攻击到。攻击范围保证是一个多边型。Input有多组测试数据第一行输入1个整数n,期中n代表攻击范围是给出的n个点组成的多边形,按照时针方向(顺或逆)依次给出,(n>=3)N = 0输入结束。第二行a,b表示目标英雄的坐标( 0 < a,b<100)接下来有n行,每行两个整数x,y(0 < x,y <100)表示每个点的坐标攻击范围在边缘也算在内Output每组结果输出占一行如果能够攻击到输出”Yes”否则输出”No”Sample Input31 14 阅读全文
posted @ 2012-03-14 13:05
'wind
阅读(187)
评论(0)
推荐(0)
摘要:
Descriptiondccmx likes playing Warcraft III. Now, he is teaching his girlfriend to play it. In Warcraft III, there are many kinds of units. Every unit costs some gold and lumber. Different units have different attack value.Now question comes. Given some amount of gold and a list of types of units, h 阅读全文
posted @ 2012-03-14 07:37
'wind
阅读(285)
评论(0)
推荐(0)
摘要:
Problem DescriptionThe bone collector had a big bag with a volume of V ,and along his trip of collecting there are a lot of bones , obviously , different bone has different value and different volume, now given the each bone’s value along his trip , can you calculate out the maximum of the total val 阅读全文
posted @ 2012-03-14 07:30
'wind
阅读(387)
评论(0)
推荐(0)


浙公网安备 33010602011771号