![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
dp
文章平均质量分 89
sunnykema
这个作者很懒,什么都没留下…
展开
-
uva 10405 - Longest Common Subsequence
Problem C: Longest Common SubsequenceSequence 1: Sequence 2: Given two sequences of characters, print thelength of the longest common subsequence of both sequences. Forexample, the lon原创 2015-01-26 21:05:22 · 431 阅读 · 0 评论 -
HDU 1712 ACboy needs your help
ACboy needs your helpTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uDescriptionACboy has N courses this term, and he plans to spend at most M days on study.O原创 2015-02-08 22:05:33 · 285 阅读 · 0 评论 -
uva 10534 Wavio Sequence nlogn方法
Wavio Sequence Input:StandardInputOutput: Standard Output Time Limit: 2 Seconds Wavio is a sequence of integers. It has some interestingproperties. · Wavio is of odd length i.e. L = 2*n+原创 2015-02-08 22:08:07 · 343 阅读 · 0 评论 -
UVA 147 Dollars
DollarsNew Zealand currency consists of $100, $50, $20, $10, and $5notes and $2, $1, 50c, 20c, 10c and 5c coins. Write a program thatwill determine, for any given amount, in how many ways that原创 2015-02-06 21:58:46 · 350 阅读 · 0 评论 -
UVA 624 CD
CDTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluDescriptionYou have a long drive by car ahead. You have a tape recorder, but unfortunately your best music is on原创 2015-02-10 21:59:33 · 244 阅读 · 0 评论 -
2955 Robberies
RobberiesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionThe aspiring Roy the Robber has seen a lot of American movies, and knows that原创 2015-02-10 21:56:16 · 258 阅读 · 0 评论 -
poj 2392 Space Elevator
Space ElevatorTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8893 Accepted: 4219DescriptionThe cows are going to space! They plan to achieve orbit by原创 2015-02-25 22:33:10 · 206 阅读 · 0 评论 -
poj 3260 The Fewest Coins
The Fewest CoinsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 5257 Accepted: 1586DescriptionFarmer John has gone to town to buy some farm supplies.原创 2015-02-11 23:03:18 · 338 阅读 · 0 评论 -
HDOJ 2084 数塔
数塔Problem Description在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已经告诉你了,这是个DP的题目,你能AC吗? Input输入数据首先包括一个整数C,表示测试实例的个数,每个测试实例的第一行是一个整数N(1原创 2015-01-25 19:35:21 · 326 阅读 · 0 评论 -
Codeforces Round #293 (Div. 2) D. Ilya and Escalator
D. Ilya and Escalatortime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIlya got tired of sports programming,原创 2015-02-27 13:40:14 · 308 阅读 · 0 评论 -
HDU 1003 Max Sum
Max SumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 160148 Accepted Submission(s): 37497Problem DescriptionGiven a sequenc原创 2015-03-04 21:48:31 · 333 阅读 · 0 评论 -
Poj 1088 滑雪
滑雪Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 79545 Accepted: 29593DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或原创 2015-02-07 22:47:24 · 261 阅读 · 0 评论 -
CodeForces 505C Mr. Kitayuta, the Treasure Hunter
Mr. Kitayuta, the Treasure HunterTime Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uDescriptionThe Shuseki Islands are an archipelago of 30001 small islands in原创 2015-02-06 22:02:06 · 682 阅读 · 0 评论 -
HDU 2059 龟兔赛跑
龟兔赛跑Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description据说在很久很久以前,可怜的兔子经历了人生中最大的打击——赛跑输给乌龟后,心中郁闷,发誓要报仇雪恨,于是躲进了杭州下沙某农业园卧薪尝胆潜心修炼,终于练成了绝技,能原创 2015-02-07 22:41:25 · 319 阅读 · 0 评论 -
poj 2533 Longest Ordered Subsequence
Longest Ordered SubsequenceTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 35239 Accepted: 15471DescriptionA numeric sequence of ai is ordered if a1 a原创 2015-01-27 19:30:18 · 311 阅读 · 0 评论 -
hdu 1590 Bridging signals
Bridging signalsTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uDescription'Oh no, they've done it again', cries the chief designer at the Waferland chip fact原创 2015-01-28 21:01:35 · 336 阅读 · 0 评论 -
uva 103 Stacking Boxes
Stacking Boxes BackgroundSome concepts in Mathematics and Computer Science are simple in one ortwo dimensions butbecome more complex when extended to arbitrary dimensions. Considersolving原创 2015-01-29 22:57:02 · 331 阅读 · 0 评论 -
hdu 2546 饭卡
A -饭卡Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uDescription电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额原创 2015-01-31 13:58:03 · 352 阅读 · 0 评论 -
HDU 2602 Bone Collector
Bone CollectorTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uDescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”.原创 2015-01-30 22:51:24 · 268 阅读 · 0 评论 -
NOIP 2006 金明的预算
题目描述 金明今天很开心,家里购置的新房就要领钥匙了,新房里有一间金明自己专用的很宽敞的房间。更让他高兴的是,妈妈昨天对他说:“你的房间需要购买哪些物品,怎么布置,你说了算,只要不超过N元钱就行”。今天一早,金明就开始做预算了,他把想买的物品分为两类:主件与附件,附件是从属于某个主件的,下表就是一些主件与附件的例子:主件 附件电脑 打印机,扫描仪书柜 图书原创 2015-01-31 14:02:42 · 523 阅读 · 0 评论 -
hdu 2844 Coins
CoinsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7939 Accepted Submission(s): 3241Problem DescriptionWhuacmers use coins.原创 2015-02-03 22:42:47 · 386 阅读 · 0 评论 -
hdu 1864 最大报销额
最大报销额Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description现有一笔经费可以报销一定额度的发票。允许报销的发票类型包括买图书(A类)、文具(B类)、差旅(C类),要求每张发票的总额不得超过1000元,每张发票上,单项物品的原创 2015-02-04 23:09:58 · 247 阅读 · 0 评论 -
HDU 2639 Bone Collector II
Bone Collector IITime Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionThe title of this problem is familiar,isn't it?yeah,if you had took par原创 2015-02-05 22:19:54 · 269 阅读 · 0 评论 -
HDU 1114 Piggy-Bank
Piggy-BankTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionBefore ACM can do anything, a budget must be prepared and the necessary fina原创 2015-02-05 22:14:55 · 251 阅读 · 0 评论 -
LeetCode 5. Longest Palindromic Substring
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example:Input: "babad"Output: "bab"Note: "aba" is also a valid answer.原创 2016-11-15 16:21:28 · 210 阅读 · 0 评论