
动态规划
文章平均质量分 74
Shicheng_Yang
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Pearls(ACM三部曲一)
Pearls Time Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other) Total Submission(s) : 15 Accepted Submission(s) : 8 Problem Description In Pearlania everybody is fond of pearls.原创 2013-07-15 11:48:21 · 9043 阅读 · 0 评论 -
Ural 1012. K-based Numbers. Version 2 &&1013. K-based Numbers. Version 3 DP+高精度
1012. K-based Numbers. Version 2 Time limit: 1.0 second Memory limit: 64 MB Let’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 · 804 阅读 · 0 评论 -
Ural 1225. Flags DP
1225. Flags Time limit: 1.0 second Memory limit: 64 MB On 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 · 1755 阅读 · 0 评论 -
Ural 1167. Bicolored Horses DP
1167. Bicolored Horses Time limit: 1.0 second Memory limit: 64 MB Every 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 · 1332 阅读 · 0 评论 -
Ural 1119. Metro DP+精度
1119. Metro Time limit: 0.5 second Memory limit: 64 MB Many 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 · 1180 阅读 · 0 评论 -
Ural 1146. Maximum Sum DP经典
1146. Maximum Sum Time limit: 1.0 second Memory limit: 64 MB Given 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 · 903 阅读 · 0 评论 -
Ural 1203. Scientific Conference
1203. Scientific Conference Time limit: 1.0 second Memory limit: 64 MB Functioning of a scientific conference is usually divided into several simultaneous sections. For example, there may b原创 2013-08-11 21:24:02 · 1364 阅读 · 0 评论 -
Ural 1073. Square Country 背包
1073. Square Country Time limit: 1.0 second Memory limit: 64 MB There 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 · 730 阅读 · 0 评论 -
Ural 1260. Nudnik Photographer DP
1260. Nudnik Photographer Time limit: 1.0 second Memory limit: 64 MB If 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 · 909 阅读 · 0 评论 -
Ural 1017. Staircases
1017. Staircases Time limit: 1.0 second Memory limit: 64 MB One 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 · 2396 阅读 · 2 评论 -
Cash Machine
Cash Machine Time Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other) Total Submission(s) : 0 Accepted Submission(s) : 0 Problem Description A Bank plans to install a machine for原创 2013-07-15 11:48:35 · 503 阅读 · 0 评论 -
Problem E 动态规划
Problem E Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other Problem Description Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popula原创 2013-07-15 11:48:37 · 467 阅读 · 0 评论 -
Alignment(ACM三部曲一)
Alignment Time Limit : 2000/1000ms (Java/Other) Memory Limit : 60000/30000K (Java/Other) Problem Description In the army, a platoon is composed by n soldiers. During the morning inspection, the soldie原创 2013-07-15 11:48:23 · 656 阅读 · 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 · 872 阅读 · 0 评论 -
Palindrome(三部曲一)
Palindrome Time Limit : 6000/3000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other) Problem Description A palindrome is a symmetrical string, that is, a string read identically from left to ri原创 2013-07-15 11:48:33 · 488 阅读 · 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 · 518 阅读 · 0 评论 -
tyvj 1016 装箱问题
装箱问题 描述: 有一个箱子容量为v(正整数,o≤v≤20000),同时有n个物品(o≤n≤30),每个物品有一个体积 (正整数)。要求从 n 个物品中,任取若干个装入箱内,使箱子的剩余空间为最小。 输入格式: 第一行,一个整数,表示箱子容量; 第二行,一个整数,表示有n个物品; 接下来n行,分别表示这n个物品的各自体积 输出格式: 一个整数,表示箱子剩余空间。 样例输入: 24 6原创 2013-07-15 11:49:02 · 584 阅读 · 0 评论 -
tyvj 1024 外星人的密码数字
XXXX年突然有外星人造访,但大家语言不通,不过科学家们经过研究发现外星人用26个英文字母组成的单词中 最长不降子序列的长度来表述数字,且英文字母的排列顺序不同,现给出其排列顺序,再给出外星人说的每个 数字(其实是每个英文单词,用空格隔开),翻译出外星人所说的数字(连续输出,最后加回车)。 (因为是最长不降子序列,所以数字中没有0,也就是说外星人的数字是>=1的数字) 例如 我们正常的字母排原创 2013-07-15 11:48:59 · 1130 阅读 · 0 评论 -
Human Gene Functions
Human Gene Functions Problem Description It is well known that a human gene can be considered as a sequence, consisting of four nucleotides, which are simply denoted by four letters, A, C, G, and T.原创 2013-07-15 11:48:19 · 572 阅读 · 0 评论 -
Ural 1009. K-based Numbers DP
1009. K-based Numbers Time limit: 1.0 second Memory limit: 64 MB Let’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 · 1329 阅读 · 0 评论 -
Cow Bowling(ACM三部曲一)
Cow Bowling Time Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other) Total Submission(s) : 8 Accepted Submission(s) : 4 Problem Description The cows don't use actual bowling bal原创 2013-07-15 11:48:15 · 629 阅读 · 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): 1912 Problem Description 给出一个只由小写英文字符a,b,c...y原创 2013-08-12 11:01:05 · 785 阅读 · 0 评论