动态规划
fanxingxue
这个作者很懒,什么都没留下…
展开
-
hdu 1069 Monkey and Banana
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1069题目大意: 高处有一个香蕉,若是猴子想要吃到香蕉,可以采用堆箱子的方式让自己接近香蕉,这里有n种不同规格的箱子,且每种规格的箱子不限数量,既可以重复使用,但是在堆叠过程中要保证上方的箱子长和宽都要小于下方的箱子。 这里每种箱子都有六种不同的排列方法,n又不超过30,所以数组开到1...原创 2018-09-15 19:19:33 · 79 阅读 · 0 评论 -
Zipper (dp)
题目链接:https://cn.vjudge.net/contest/269853#problem/B题目描述:Given three strings, you are to determine whether the third string can be formed by combining the characters in the first two strings. The f...原创 2018-11-16 18:05:18 · 143 阅读 · 0 评论 -
hdu 1257 最长上升子序列
题目链接:https://cn.vjudge.net/contest/268427#problem/D题目大意:某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹. 怎么办呢...原创 2018-11-11 15:54:54 · 176 阅读 · 0 评论 -
POJ - 1065 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...原创 2018-10-16 19:32:01 · 118 阅读 · 0 评论 -
POJ 3616 Milking Time
题目描述:Bessie is such a hard-working cow. In fact, she is so focused on maximizing her productivity that she decides to schedule her next N (1 ≤ N ≤ 1,000,000) hours (conveniently labeled 0..N-1) so t...原创 2018-10-06 13:04:00 · 121 阅读 · 0 评论 -
POJ 2385 Apple Catching
题目描述:It is a little known fact that cows love apples. Farmer John has two apple trees (which are conveniently numbered 1 and 2) in his field, each full of apples. Bessie cannot reach the apples when...原创 2018-10-04 18:12:26 · 94 阅读 · 0 评论 -
区间DP
转载来源:https://blog.csdn.net/my_sunshine26/article/details/77141398 区间DP 一、定义 区间DP,顾名思义是在区间上DP,它的主要思想就是先在小区间进行DP得到最优解,然后再利用小区间的最...转载 2018-09-21 21:20:38 · 172 阅读 · 0 评论 -
POJ 1458 Common Subsequence (最长公共子序列)
题目描述:A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, ..., xm > another sequence Z = < z1, z2, ..., zk >...原创 2018-09-26 20:18:09 · 109 阅读 · 0 评论 -
hdu 1087 Super Jumping! Jumping! Jumping! (动态规划)
题目描述:Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now.The...原创 2018-09-26 20:06:40 · 107 阅读 · 0 评论 -
POJ 2533 Longest Ordered Subsequence (最长上升子序列)
题目描述: A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence ( a1, a2, ..., aN) be any sequence ( ai1, ai2, ..., aiK), where 1 <=...原创 2018-09-26 16:12:51 · 127 阅读 · 0 评论 -
hdu 2546 饭卡
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2546题目分析:先用一个sort函数对输入的菜价进行排序。使最后的钱够五元用来买最贵的那个菜注意:若是刚开始便不够五元直接输出。代码#include<iostream>#include<cstring>#include<cmath>#in...原创 2018-09-12 22:04:49 · 80 阅读 · 0 评论 -
动态规划
动态规划一般可分为四类:线性动规、区域动规、树形动规、背包动规。线性动规:拦截导弹、合唱队形、挖地雷、建学校、剑客决斗等。区域动规:石子合并、加分二叉树、统计单词个数、炮兵布阵等。树形动规:贪吃的九头龙、二分查找树、聚会的欢乐、数字三角形等。背包问题:01背包问题、完全背包问题、分组背包问题、二维背包、装箱问题、挤牛奶(同济ACM第1132题)等。应用实例: 最短路径问题、...原创 2018-09-10 10:29:19 · 137 阅读 · 0 评论 -
Hdu 1029 Ignatius and the Princess IV
转载来源: 法一: https://blog.csdn.net/to_be_better/article/details/50557796 法二:https://blog.csdn.net/lulipeng_cpp/article/details/7469372 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1029...转载 2018-09-12 19:32:52 · 105 阅读 · 0 评论 -
HDU - 1160 FatMouse's Speed
题目链接:https://cn.vjudge.net/problem/HDU-1160题目描述:FatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on a collection of mice and put as lar...原创 2018-12-04 20:48:20 · 113 阅读 · 0 评论