
*************动态规划*************
小天位
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
poj_1887
点击打开链接 Testing the CATCHER Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 18584 Accepted: 6824 Description A military contractor for the Department o原创 2017-09-04 20:07:17 · 219 阅读 · 0 评论 -
poj 3181
给你n元钱和无限个价钱为1~k的物品,让你求有多少种方法花光这n元钱? 思路: 参考别人的。。 可以看成是整数的划分。 如5 3 1+1+1+1+1 1+1+1+2 1+2+2 1+1+3 2+3 设dp[i][j]为i的划分中最大数不超过j的划分总数。 则dp[i][j]=dp[i][j-1]+dp[i-j][j]; 有点像组合的原创 2017-12-06 16:19:39 · 189 阅读 · 0 评论 -
poj 1742 多重背包 气死个人明天接着看啊
People in Silverland use coins.They have coins of value A1,A2,A3...An Silverland dollar.One day Tony opened his money-box and found there were some coins.He decided to buy a very nice watch in a nearb原创 2017-12-05 21:06:39 · 213 阅读 · 0 评论 -
hdu 2191 多重背包入门
悼念512汶川大地震遇难同胞——珍惜现在,感恩生活 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 32629 Accepted Submission(s): 13704 Problem Description原创 2017-12-05 19:28:39 · 223 阅读 · 0 评论 -
hdu 2602 01背包入门
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 he went to the grave … The bone collector原创 2017-12-05 19:25:26 · 184 阅读 · 0 评论 -
poj 3280Cheapest Palindrome
Keeping track of all the cows can be a tricky task so Farmer John has installed a system to automate it. He has installed on each cow an electronic ID tag that the system will read as the cows pass by原创 2017-12-04 21:28:11 · 248 阅读 · 0 评论 -
poj 2385
一共有 2 棵苹果树, 一头奶牛站在其中一棵苹果树下等待苹果落下, 由于任意一个时刻只能站在一棵树下,它从一棵树移动到另外一棵树的时间不计, 奶牛不愿意太频繁移动,现在给定苹果的下落次序和最大移动次数,问奶牛最多可以抓住几个苹果。 /*16ms,388KB*/ #include #include using namespace std; int dp[31];///dp[i]表示进行了原创 2017-12-03 19:42:53 · 223 阅读 · 0 评论 -
poj 2392 dp 不是很懂哎!!!Space Elevator
大意:有K种block去建塔,每种每个都有一个高度H,用了当前的block塔的高度不能超出a,和每种的数量。求塔最高能建多高。 分析:这题就是一个多重背包,但有一点变动,必须先以a从小到大排序,因为如果先用了充许塔最高的block,而那种block的h很小,个数很少,更新自然就小,那么接下来小的就充许塔高越建越小,这样就不是我们所求的塔高了。如果先用a小的类形,就有变动更大的余地。原创 2017-12-03 18:19:41 · 207 阅读 · 0 评论 -
E2. 比昨天更多的棒棒糖 (Hard)
http://www.cnblogs.com/hua-dong/p/8011232.html转载 2017-12-10 12:51:08 · 274 阅读 · 0 评论 -
SDUT_2080最长公共子序列问题
点击打开讲解 最长公共子序列问题 Time Limit: 1000MS Memory Limit: 65536KB Submit Statistic Discuss Problem Description 给定两个序列X= Input 输入数据有多组,每组有两行 ,每行为一个长度不超过500的字符串(输入全是大写英文字母(A,Z)),表示序列X和原创 2017-08-31 19:40:36 · 563 阅读 · 0 评论 -
SDUT_1299 最长上升子序列
最长上升子序列 Time Limit: 3000MS Memory Limit: 65536KB Submit Statistic Discuss Problem Description 一个数的序列bi,当b1 2 S的时候,我们称这个序列是上升的。对于给定的一个序列(a1, a2, ..., aN),我们可以得到一些上升的子序列(ai1, ai2, ..., a原创 2017-08-31 12:16:39 · 350 阅读 · 0 评论 -
poj_1163&&SDUT 1730 The Triangle
The Triangle Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 51049 Accepted: 30929 Description 7 3 8 8 1 0 2 7 4 4 4 5 2 6 5 (Figure原创 2017-08-29 16:58:35 · 284 阅读 · 0 评论 -
SDUT_2075 最少拦截系统
最少拦截系统 Time Limit: 1000MS Memory Limit: 65536KB Submit Statistic Discuss Problem Description 某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导原创 2017-09-06 18:37:40 · 435 阅读 · 2 评论 -
YTU_3137: 动态规划基础题目之拦截导弹
Description 某国为了防御敌国的导弹袭击,开发出一种导弹拦截系统。但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能高于前一发的高度。某天,雷达捕捉到敌国的导弹来袭,并观测到导弹依次飞来的高度,请计算这套系统最多能拦截多少导弹。拦截来袭导弹时,必须按来袭导弹袭击的时间顺序,不允许先拦截后面的导弹,再拦截前面的导弹。 Input原创 2017-09-06 16:15:13 · 670 阅读 · 0 评论 -
HDU_1003 Max Sum
点击打开链接Max SumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 255311 Accepted Submission(s): 60666Problem DescriptionGiven a sequence a[1],a[2...原创 2017-09-05 20:06:42 · 251 阅读 · 0 评论 -
hdu1065 Wooden Sticks
There is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodworking machine in one by one fashion. It needs some time, called原创 2017-12-06 17:54:53 · 199 阅读 · 0 评论