
动态规划
追逐o
Practice makes perfect.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
[HDU - 1029] Ignatius and the Princess IV(动态规划)
Link:http://acm.hdu.edu.cn/showproblem.php?pid=1029Problem Description"OK, you are not too bad, em... But you can never pass the next test." feng5166 says."I will tell you an odd number N, and then N i原创 2017-08-08 16:30:13 · 288 阅读 · 0 评论 -
[HDU - 1257] 最少拦截系统(动态规划)
Link:https://vjudge.net/contest/177074#problem/IProblem Description某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹.原创 2017-08-08 17:24:29 · 434 阅读 · 0 评论 -
[HDU - 1159] Common Subsequence(动态规划&&LCS)
Link: http://acm.hdu.edu.cn/showproblem.php?pid=1159Problem DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2,原创 2017-08-08 18:19:21 · 311 阅读 · 0 评论 -
[POJ - 2533] Longest Ordered Subsequence(动态规划)
Link:http://poj.org/problem?id=2533DescriptionA 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, .原创 2017-08-08 20:09:16 · 288 阅读 · 0 评论 -
[HDU - 1950] Bridging signals(动态规划&&LIS)
Link:http://acm.hdu.edu.cn/showproblem.php?pid=1950Problem Description'Oh no, they've done it again', cries the chief designer at the Waferland chip factory. Once more the routing designers have screwe原创 2017-08-09 20:08:08 · 297 阅读 · 0 评论 -
[HDU - 5748] Bellovin(动态规划&&LIS)
Link:http://acm.hdu.edu.cn/showproblem.php?pid=5748Problem DescriptionPeter has a sequence a1,a2,...,an and he define a function on the sequence -- F(a1,a2,...,an)=(f1,f2,...,fn), where fi is the lengt原创 2017-08-09 20:14:17 · 359 阅读 · 0 评论 -
[51NOD - 1085] 背包问题(动态规划)
Link:http://www.51nod.com/onlineJudge/questionCode.html#problemId=1085¬iceId=293828Problem Description在N件物品取出若干件放在容量为W的背包里,每件物品的体积为W1,W2……Wn(Wi为整数),与之相对应的价值为P1,P2……Pn(Pi为整数)。求背包能够容纳的最大价值。Input第1行,2原创 2017-08-10 16:48:53 · 478 阅读 · 1 评论 -
[HDU - 5773] The All-purpose Zero(动态规划&&LIS)
Link:http://acm.hdu.edu.cn/showproblem.php?pid=5773Problem Description?? gets an sequence S with n intergers(0 < n <= 100000,0<= S[i] <= 1000000).?? has a magic so that he can change 0 to any interger(原创 2017-08-09 20:30:41 · 335 阅读 · 0 评论 -
[HDU- 2546] 饭卡(动态规划&&背包)
Link:http://acm.hdu.edu.cn/showproblem.php?pid=2546Problem Description电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜原创 2017-08-10 21:03:53 · 452 阅读 · 0 评论 -
最长上升子序列模板(LIS)
1. 复杂度 O(n^2)#include <cstdio>#include <cstring>#include <algorithm>using namespace std;const int maxn = 30010;int dp[maxn], a[maxn];int main(){ int n; while(scanf("%d",&n)!=EOF) {原创 2017-08-09 15:43:59 · 251 阅读 · 0 评论 -
[HDU - 1087]Super Jumping! Jumping! Jumping!(动态规划)
Link:http://acm.hdu.edu.cn/showproblem.php?pid=1087Problem DescriptionNowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know原创 2017-08-08 16:54:36 · 284 阅读 · 0 评论 -
[HDU - 1069] Monkey and Banana(动态规划)
Link:http://acm.hdu.edu.cn/showproblem.php?pid=1069Problem DescriptionA 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, a原创 2017-08-08 16:40:30 · 296 阅读 · 0 评论 -
[HDU - 1176] 免费馅饼(动态规划)
Link:http://acm.hdu.edu.cn/showproblem.php?pid=1176Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径原创 2017-08-08 17:04:07 · 365 阅读 · 0 评论