![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
动态规划
文章平均质量分 81
校园苦行生
这个作者很懒,什么都没留下…
展开
-
Max Sum
HDOJ 1003: Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequ原创 2013-04-20 17:25:27 · 327 阅读 · 0 评论 -
滑雪
POJ1088: Description Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 5 16 17 18 1原创 2013-05-17 22:28:00 · 374 阅读 · 0 评论 -
The Triangle
POJ1163: 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原创 2013-05-17 23:26:50 · 420 阅读 · 0 评论 -
To The Max(求最大子矩阵和)
HDOJ 1081: Problem Description Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1 x 1 or greater located within the whol原创 2013-04-20 20:12:22 · 418 阅读 · 0 评论 -
Piggy-Bank(完全背包)
HDOJ1114: Problem Description Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bo原创 2013-05-14 15:11:45 · 408 阅读 · 0 评论 -
悼念512汶川大地震遇难同胞——珍惜现在,感恩生活
HDOJ2191: Problem Description 急!灾区的食物依然短缺! 为了挽救灾区同胞的生命,心系灾区同胞的你准备自己采购一些粮食支援灾区,现在假设你一共有资金n元,而市场有m种大米,每种大米都是袋装产品,其价格不等,并且只能整袋购买。 请问:你用有限的资金最多能采购多少公斤粮食呢? 后记: 人生是一个充满了变数的生命过程,天灾、人祸、病痛是我们原创 2013-05-14 15:53:00 · 406 阅读 · 0 评论 -
放苹果
问题描述 把 M 个同样的苹果放在N 个同样的盘子里,允许有的盘子空着不放,问共有多少 种不同的分法?(用K 表示)注意:5,1,1 和1,5,1 是同一种分法。 输入数据 第一行是测试数据的数目t(0 空格分开。1 输出要求 对输入的每组数据M 和N,用一行输出相应的K。 输入样例 1 7 3 输出样原创 2013-05-14 18:36:04 · 447 阅读 · 0 评论 -
Bone Collector(01背包)
HDOJ2602: Problem Description Many 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 dog’s , cow’s , also原创 2013-05-14 14:28:15 · 383 阅读 · 0 评论 -
Ignatius and the Princess III(母函数或动态规划)
HDOJ1028: Problem Description "Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 says. "The second problem is, given an positive原创 2013-05-14 20:49:46 · 857 阅读 · 1 评论