动态规划
文章平均质量分 74
Shicheng_Yang
这个作者很懒,什么都没留下…
展开
-
Pearls(ACM三部曲一)
PearlsTime Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K(Java/Other)Total Submission(s) : 15 Accepted Submission(s) : 8Problem DescriptionIn Pearlania everybody is fond of pearls.原创 2013-07-15 11:48:21 · 8926 阅读 · 0 评论 -
Ural 1012. K-based Numbers. Version 2 &&1013. K-based Numbers. Version 3 DP+高精度
1012. K-based Numbers. Version 2Time limit: 1.0 secondMemory limit: 64 MBLet’s consider K-based numbers, containing exactly N digits. We define a number to be valid if itsK-based notatio原创 2013-08-07 17:42:09 · 769 阅读 · 0 评论 -
Ural 1225. Flags DP
1225. FlagsTime limit: 1.0 secondMemory limit: 64 MBOn the Day of the Flag of Russia a shop-owner decided to decorate the show-window of his shop with textile stripes of white, blue and原创 2013-08-03 13:52:48 · 1683 阅读 · 0 评论 -
Ural 1167. Bicolored Horses DP
1167. Bicolored HorsesTime limit: 1.0 secondMemory limit: 64 MBEvery day, farmer Ion (this is a Romanian name) takes out all his horses, so they may run and play. When they are done, far原创 2013-08-21 15:36:25 · 1268 阅读 · 0 评论 -
Ural 1119. Metro DP+精度
1119. MetroTime limit: 0.5 secondMemory limit: 64 MBMany of SKB Kontur programmers like to get to work by Metro because the main office is situated quite close the station Uralmash. So,原创 2013-08-11 19:51:48 · 1116 阅读 · 0 评论 -
Ural 1146. Maximum Sum DP经典
1146. Maximum SumTime limit: 1.0 secondMemory limit: 64 MBGiven a 2-dimensional array of positive and negative integers, find the sub-rectangle with the largest sum. The sum of a rectang原创 2013-08-11 20:34:19 · 845 阅读 · 0 评论 -
Ural 1203. Scientific Conference
1203. Scientific ConferenceTime limit: 1.0 secondMemory limit: 64 MBFunctioning of a scientific conference is usually divided into several simultaneous sections. For example, there may b原创 2013-08-11 21:24:02 · 1302 阅读 · 0 评论 -
Ural 1073. Square Country 背包
1073. Square CountryTime limit: 1.0 secondMemory limit: 64 MBThere live square people in a square country. Everything in this country is square also. Thus, the Square Parliament has pass原创 2013-08-12 09:35:09 · 683 阅读 · 0 评论 -
Ural 1260. Nudnik Photographer DP
1260. Nudnik PhotographerTime limit: 1.0 secondMemory limit: 64 MBIf two people were born one after another with one second difference and one of them is a child, then the other one is a原创 2013-08-12 09:01:42 · 845 阅读 · 0 评论 -
Ural 1017. Staircases
1017. StaircasesTime limit: 1.0 secondMemory limit: 64 MBOne curious child has a set of N little bricks (5 ≤ N ≤ 500). From these bricks he builds different staircases. Staircase consist原创 2013-08-12 10:10:29 · 2266 阅读 · 2 评论 -
Cash Machine
Cash MachineTime Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K(Java/Other)Total Submission(s) : 0 Accepted Submission(s) : 0Problem DescriptionA Bank plans to install a machine for原创 2013-07-15 11:48:35 · 458 阅读 · 0 评论 -
Problem E 动态规划
Problem ETime Limit : 2000/1000ms(Java/Other) MemoryLimit : 65536/32768K (Java/OtherProblem DescriptionNowadays, a kind of chess game called “Super Jumping! Jumping!Jumping!” is very popula原创 2013-07-15 11:48:37 · 415 阅读 · 0 评论 -
Alignment(ACM三部曲一)
AlignmentTime Limit : 2000/1000ms (Java/Other) Memory Limit : 60000/30000K(Java/Other)Problem DescriptionIn the army, a platoon is composed by n soldiers. During themorning inspection, the soldie原创 2013-07-15 11:48:23 · 610 阅读 · 0 评论 -
计算直线的交点数
计算直线的交点数Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K(Java/Others)Problem Description平面上有n条直线,且无三线共点,问这些直线能有多少种不同交点数。比如,如果n=2,则可能的交点数量为0(平行)或者1(不平行)。Input输入数据包含多个测试实例,每个原创 2013-07-15 11:48:28 · 806 阅读 · 0 评论 -
Palindrome(三部曲一)
PalindromeTime Limit : 6000/3000ms (Java/Other) Memory Limit : 131072/65536K(Java/Other)Problem DescriptionA palindrome is a symmetrical string, that is, a string readidentically from left to ri原创 2013-07-15 11:48:33 · 441 阅读 · 0 评论 -
tyvj 1046 Blast
Blast描述 Description设有字符串X,我们称在X的头尾及中间插入任意多个空格后构成的新字符串为X的扩展串,如字符串X为“abcbcd”,则字符串“abcb□cd”,“□a□bcbcd□”和“abcb□cd□”都是X的扩展串,这里“□”代表空格字符。如果A1是字符串A的扩展串,B1是字符串B的扩展串,A1与B1具有相同的长度,那么我们定义字符串A1与B1的距离为相应位置上的字原创 2013-07-15 11:49:04 · 466 阅读 · 0 评论 -
tyvj 1016 装箱问题
装箱问题描述:有一个箱子容量为v(正整数,o≤v≤20000),同时有n个物品(o≤n≤30),每个物品有一个体积 (正整数)。要求从 n个物品中,任取若干个装入箱内,使箱子的剩余空间为最小。 输入格式:第一行,一个整数,表示箱子容量;第二行,一个整数,表示有n个物品;接下来n行,分别表示这n个物品的各自体积 输出格式:一个整数,表示箱子剩余空间。 样例输入:246原创 2013-07-15 11:49:02 · 528 阅读 · 0 评论 -
tyvj 1024 外星人的密码数字
XXXX年突然有外星人造访,但大家语言不通,不过科学家们经过研究发现外星人用26个英文字母组成的单词中最长不降子序列的长度来表述数字,且英文字母的排列顺序不同,现给出其排列顺序,再给出外星人说的每个数字(其实是每个英文单词,用空格隔开),翻译出外星人所说的数字(连续输出,最后加回车)。(因为是最长不降子序列,所以数字中没有0,也就是说外星人的数字是>=1的数字)例如 我们正常的字母排原创 2013-07-15 11:48:59 · 1063 阅读 · 0 评论 -
Human Gene Functions
Human Gene Functions Problem DescriptionIt is well known that a human gene can be considered as a sequence,consisting of four nucleotides, which are simply denoted by fourletters, A, C, G, and T.原创 2013-07-15 11:48:19 · 523 阅读 · 0 评论 -
Ural 1009. K-based Numbers DP
1009. K-based NumbersTime limit: 1.0 secondMemory limit: 64 MBLet’s consider K-based numbers, containing exactly N digits. We define a number to be valid if itsK-based notation doesn’t c原创 2013-08-02 21:43:48 · 1281 阅读 · 0 评论 -
Cow Bowling(ACM三部曲一)
Cow BowlingTime Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K(Java/Other)Total Submission(s) : 8 Accepted Submission(s) : 4Problem DescriptionThe cows don't use actual bowling bal原创 2013-07-15 11:48:15 · 581 阅读 · 0 评论 -
hdu 3068 最长回文 Manacher求最大回文串
最长回文Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5616 Accepted Submission(s): 1912Problem Description给出一个只由小写英文字符a,b,c...y原创 2013-08-12 11:01:05 · 733 阅读 · 0 评论