2011年8月24日

hdu Proud Merchants

摘要: Proud MerchantsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others) Total Submission(s): 84 Accepted Submission(s): 46 Problem DescriptionRecently, iSea went to an ancient country. For such a long time, it was the most wealthy and powerful kingdom in the world. As a resu 阅读全文

posted @ 2011-08-24 13:12 NewPanderKing 阅读(418) 评论(0) 推荐(0) 编辑

hdu 饭卡

摘要: 编辑器加载中.饭卡Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 112 Accepted Submission(s): 50 Problem Description电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜可购买一次。已知每 阅读全文

posted @ 2011-08-24 10:28 NewPanderKing 阅读(966) 评论(0) 推荐(1) 编辑

2011年8月23日

HDU Dividing

摘要: DividingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 113 Accepted Submission(s): 50 Problem 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 m 阅读全文

posted @ 2011-08-23 19:02 NewPanderKing 阅读(904) 评论(0) 推荐(0) 编辑

2011年8月22日

HDU Coins

摘要: CoinsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 84 Accepted Submission(s): 52Problem 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 decid 阅读全文

posted @ 2011-08-22 21:46 NewPanderKing 阅读(1209) 评论(0) 推荐(0) 编辑

HDU Bone Collector

摘要: Bone CollectorTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 85 Accepted Submission(s): 49Problem 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 阅读全文

posted @ 2011-08-22 19:23 NewPanderKing 阅读(1836) 评论(1) 推荐(1) 编辑

HDU Piggy-Bank

摘要: Piggy-BankTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 71 Accepted Submission(s): 48 Problem DescriptionBefore ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes f 阅读全文

posted @ 2011-08-22 19:12 NewPanderKing 阅读(813) 评论(0) 推荐(0) 编辑

2011年8月20日

01背包问题

摘要: 题目有N件物品和一个容量为V的背包。第i件物品的费用是c[i],价值是w[i]。求解将哪些物品装入背包可使价值总和最大。基本思路这是最基础的背包问题,特点是:每种物品仅有一件,可以选择放或不放。用子问题定义状态:即f[i][v]表示前i件物品恰放入一个容量为v的背包可以获得的最大价值。则其状态转移方程便是:f[i][v]=max{f[i-1][v],f[i-1][v-c[i]]+w[i]}这个方程非常重要,基本上所有跟背包相关的问题的方程都是由它衍生出来的。所以有必要将它详细解释一下:“将前i件物品放入容量为v的背包中”这个子问题,若只考虑第i件物品的策略(放或不放),那么就可以转化为一个只牵 阅读全文

posted @ 2011-08-20 14:56 NewPanderKing 阅读(335) 评论(0) 推荐(0) 编辑

hdu Big Event in HDU

摘要: Big Event in HDUTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 78 Accepted Submission(s): 48Problem DescriptionNowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College had 阅读全文

posted @ 2011-08-20 10:59 NewPanderKing 阅读(302) 评论(0) 推荐(0) 编辑

HDU 免费馅饼

摘要: 免费馅饼Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 230 Accepted Submission(s): 116 Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只 阅读全文

posted @ 2011-08-20 08:59 NewPanderKing 阅读(1995) 评论(0) 推荐(0) 编辑

HDU 命运

摘要: 命运Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 277 Accepted Submission(s): 124 Problem Description穿过幽谷意味着离大魔王lemon已经无限接近了!可谁能想到,yifenfei在斩杀了一些虾兵蟹将后,却再次面临命运大迷宫的考验,这是魔王lemon设下的又一个机关。要知道,不论何人,若在迷宫中被困1小时以上,则必死无疑!可怜的yifenfei为了去救MM,义无返顾地跳进了迷宫。让我们一起帮 阅读全文

posted @ 2011-08-20 08:56 NewPanderKing 阅读(528) 评论(0) 推荐(0) 编辑

导航