
动态规划
文章平均质量分 74
Megumin
这个作者很懒,什么都没留下…
展开
-
Hdu5366 The mook jong
Problem Description ZJiaQ want to become a strong man, so he decided to play the mook jong。ZJiaQ want to put some mook jongs in his backyard. His backyard consist of n bricks that is 1*1,so it is 1原创 2016-07-12 21:22:47 · 424 阅读 · 0 评论 -
NYOJ739 笨蛋难题四
描述 这些日子笨蛋一直研究股票,经过调研,终于发现xxx公司股票规律,更可喜的是 笨蛋推算出这家公司每天的股价,为了防止别人发现他的秘密。他决定对于这家公司的 股票最多买一次,现在笨蛋已经将股票价格列了出来。(这已经不是笨蛋的难题了,他已经解决 呵 呵)。只想难为难为你呀,从股票价格表上,你能算出笨蛋的每股股票最多能赚多少钱吗? 输入第原创 2016-08-02 16:00:10 · 512 阅读 · 0 评论 -
UESTC1133 菲波拉契数制 01背包思想
Description 我们定义如下数列为菲波拉契数列: F(1)=1 F(2)=2 F(i)=F(i−1)+F(i−2)(i>=3) 给定任意一个数,我们可以把它表示成若干互不相同的菲波拉契数之和。比如13有三种表示法 13=13 13=5+8 13=2+3+8 现在给你一个数n,请输出把它表示成若干互不相同的菲波拉契数之和有多少种表示法。 Input原创 2016-07-21 00:11:50 · 351 阅读 · 0 评论 -
Codeforces698A Vacations
Vasya has n days of vacations! So he decided to improve his IT skills and do sport. Vasya knows the following information about each of this n days: whether that gym opened and whether a contest was原创 2016-07-20 00:10:53 · 659 阅读 · 0 评论 -
POJ1390 Blocks 区间DP
Description Some of you may have played a game called 'Blocks'. There are n blocks in a row, each box has a color. Here is an example: Gold, Silver, Silver, Silver, Silver, Bronze, Bronze, Bronze,原创 2016-07-18 23:55:11 · 579 阅读 · 0 评论 -
POJ3624 Charm Bracelet 01背包裸题
Description Bessie has gone to the mall's jewelry store and spies a charm bracelet. Of course, she'd like to fill it with the best charms possible from the N (1 ≤ N ≤ 3,402) available charms. Each原创 2016-07-18 18:57:36 · 443 阅读 · 0 评论 -
POJ1088 滑雪
Description Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 5 16 17 18 19 6 15 24 25 20 7原创 2016-07-18 20:08:03 · 247 阅读 · 0 评论 -
POJ1163 The Triangle
Description 7 3 8 8 1 0 2 7 4 4 4 5 2 6 5 (Figure 1) Figure 1 shows a number triangle. Write a program that calculates the highest sum of numbers passed on a route that原创 2016-07-18 18:27:08 · 225 阅读 · 0 评论 -
POJ1458 Common Subsequence 最长公共子序列
Description A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence Z = is a subsequence of X if there exists a原创 2016-07-18 18:41:34 · 289 阅读 · 0 评论 -
UVa1638 Pole Arrangement 递推
There are poles of height 1, 2, . . . , n in a row. If you look at these poles from the left side or the right side, smaller poles are hidden by taller poles. For example, consider the two arrangemen原创 2016-07-12 19:11:36 · 435 阅读 · 0 评论 -
UVa12034 Race 递推
Disky and Sooma, two of the biggest mega minds of Bangladesh went to a far country. They ate, coded and wandered around, even in their holidays. They passed several months in this way. But everythin原创 2016-07-12 18:27:22 · 372 阅读 · 0 评论 -
CodeForces429B Working out
Description Summer is coming! It's time for Iahub and Iahubina to work out, as they both want to look hot at the beach. The gym where they go is a matrix a with n lines and m columns. Let number a[i]原创 2016-07-25 12:21:06 · 881 阅读 · 0 评论 -
URAL1009 K-based Numbers
Description Let’s consider K-based numbers, containing exactly N digits. We define a number to be valid if its K-based notation doesn’t contain two successive zeros. For example: 1010230 is a valid原创 2016-07-24 23:19:44 · 328 阅读 · 0 评论 -
Hdu3466 Proud Merchants
Problem Description Recently, iSea went to an ancient country. For such a long time, it was the most wealthy and powerful kingdom in the world. As a result, the people in this country are still ver原创 2016-07-12 21:28:32 · 269 阅读 · 0 评论 -
Hdu1069 Monkey and Banana
Problem Description A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with s原创 2016-07-12 21:25:41 · 271 阅读 · 0 评论 -
bzoj1026 windy数 数位DP
windy定义了一种windy数。不含前导零且相邻两个数字之差至少为2的正整数被称为windy数。 windy想知道, 在A和B之间,包括A和B,总共有多少个windy数? Input 包含两个整数,A B。 Output 一个整数 Sample Input 【输入样例一】 1 10 【输入样例二】 25 50 Sample Output 【输出样例一】原创 2017-03-31 10:19:37 · 510 阅读 · 0 评论