
动态规划
__铭
这个作者很懒,什么都没留下…
展开
-
CodeForces 429B Working out(dp,四个角递推)
B. Working outSummer 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 matrixa with n lines andm columns. Let原创 2015-10-13 19:35:25 · 1898 阅读 · 2 评论 -
SDUT 3222 Free Goodies(贪心+dp)
Free GoodiesTime Limit: 1000MS Memory limit: 65536K题目描述Petra and Jan have just received a box full of free goodies, and want to divide the goodies between them. However, it is原创 2016-05-31 10:13:00 · 716 阅读 · 0 评论 -
HDU 4521 小明系列问题——小明序列(线段树+树状数组)
小明系列问题——小明序列Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 2499 Accepted Submission(s): 778Problem Description 大家都知道小明最喜欢研究跟序列有原创 2015-12-05 18:15:16 · 543 阅读 · 0 评论 -
HDU 5236 Article(概率dp+贪心)
Problem Description As the term is going to end, DRD begins to write his final article.DRD uses the famous Macrohard’s software, World, to write his article. Unfortunately this software is rather unst原创 2016-05-10 18:07:44 · 756 阅读 · 0 评论 -
山东省第一届ACM省赛 C SDUT 2153 Clockwise(dp+计算几何)
Clockwise Time Limit: 1000ms | Memory limit: 65536K 有疑问?点这里^ 题目描述Saya have a long necklace with N beads, and she signs the beads from 1 to N. Then she fixes them to the wall to show N-1 v原创 2016-04-12 11:46:49 · 723 阅读 · 0 评论 -
山东省第一届ACM省赛 C SDUT 2153 Clockwise
ClockwiseTime Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^题目描述Saya have a long necklace with N beads, and she signs the beads from 1 to N. Then she fixes them to the wall to show N-1原创 2016-04-11 20:46:04 · 415 阅读 · 0 评论 -
POJ 3368 Frequent values (RMQ)
题目链接:http://poj.org/problem?id=3368题目大意:给出一个n个数长度的串, m个询问求出给定范围内的最大连续字符串的长度方法:RMQ模板, 记录每个位置的数连续的次数,用RMQ求出每个区间的最大连续字符的长度值#include #include #include #include #include using namespace s原创 2016-02-25 21:22:29 · 659 阅读 · 0 评论 -
POJ 3264 Balanced Lineup (RMQ)
题目链接:http://poj.org/problem?id=3264题目大意:给出n个数, m个询问求每次询问范围内最大值与最小值得差方法:RMQ查询#include #include #include #include #include using namespace std;const int maxn = 50010;int A[maxn];int原创 2016-02-25 17:22:26 · 1727 阅读 · 0 评论 -
ZSTUOJ 4214: Power Eggs(经典动态规划——鹰蛋问题)
4214: Power EggsTime Limit: 1 Sec Memory Limit:128 MBSubmit: 125 Solved:21DescriptionBenedict bought K identical power eggs from Dropeggs.com, and now he wants to test them by droppi原创 2015-12-22 21:23:51 · 3288 阅读 · 0 评论 -
计算机学院大学生程序设计竞赛(2015’12) 1006 01 Matrix(dp)
01 MatrixTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 605 Accepted Submission(s): 127Problem DescriptionIt's really a simp原创 2015-12-27 15:49:26 · 562 阅读 · 0 评论 -
poj 3254 Corn Fields (状态压缩dp)
Corn FieldsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 10923 Accepted: 5723DescriptionFarmer John has purchased a lush new rectangular pasture com原创 2016-01-26 11:58:52 · 571 阅读 · 0 评论 -
HDU DP
Robberies http://acm.hdu.edu.cn/showproblem.php?pid=2955背包;第一次做的时候把概率当做背包(放大100000倍化为整数):在此范围内最多能抢多少钱 最脑残的是把总的概率以为是抢N家银行的概率之和… 把状态转移方程写成了f[j]=max{f[j],f[j-q[i].v]+q[i].money}(f[j]表示在概率j之下能抢的大洋);原创 2015-10-14 17:44:11 · 774 阅读 · 0 评论 -
poj 1837 Balance
DescriptionGigel has a strange "balance" and he wants to poise it. Actually, the device is different from any other ordinary balance.It orders two arms of negligible weight and each arm's length i原创 2015-08-21 16:19:44 · 369 阅读 · 0 评论