![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
dp
文章平均质量分 81
ACZone
这个作者很懒,什么都没留下…
展开
-
poj2441(状压dp)
http://poj.org/problem?id=2441Arrange the BullsTime Limit: 4000MS Memory Limit: 65536KTotal Submissions: 4810 Accepted: 1832DescriptionFarmer Johnson's Bu原创 2017-04-28 22:40:38 · 423 阅读 · 0 评论 -
hdu1028(dp)
http://acm.split.hdu.edu.cn/showproblem.php?pid=1028Problem Description"Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 says."The s原创 2017-04-27 19:51:06 · 399 阅读 · 0 评论 -
hdu5410(dp)
http://acm.hdu.edu.cn/showproblem.php?pid=5410CRB and His BirthdayTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2077 Accepted Sub原创 2017-05-28 09:18:00 · 280 阅读 · 0 评论 -
CodeForces - 540D Bad Luck Island (概率dp)
D. Bad Luck Islandtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Bad Luck Island is inhabited by thre原创 2017-07-12 22:47:36 · 387 阅读 · 0 评论 -
CodeForces - 835C Star sky dp前缀+容斥思想
CodeForces - 835C Star sky dp前缀+容斥思想The Cartesian coordinate system is set in the sky. There you can see n stars, the i-th has coordinates (xi, yi), a maximum brightness c, equal for all stars, and an initial brightness si (0 ≤ si ≤ c).Over time the sta原创 2017-08-01 13:06:42 · 941 阅读 · 0 评论 -
hdu4939 Stupid Tower Defense dp好题
hdu4939 Stupid Tower Defense dp好题题意:塔防游戏:在长度为n的路上放置n座炮塔。有一只怪兽,经过单位长度需要时间t。现在有三种炮塔,红塔:只对经过该点的怪兽造成每秒x点的伤害,绿塔:怪兽经过这座塔之后的每一秒,每秒造成y点伤害(伤害是累加的,比如怪兽已经经过两座绿塔,那么伤害就是每秒2*y点),蓝塔:使怪兽经过单位长度的时间增加z秒(时间也是累加的)。现在要求你来建塔,使怪兽受到的伤害最大,求这个最大伤害。题解:可以发现,红塔一定是建造在所有塔之后的,即最后面。因原创 2017-08-16 19:45:39 · 219 阅读 · 0 评论 -
hdu 4906 Our happy ending 状压dp
题意:一个数量为n的序列,每个数0<=a[i]<=l,要求序列中的某些数之和等于k。求有多少种赋值方案。题解:样例:可以赋值0 2,1 2,2 2,1 1,2 1,2 0。dp[i]:i转化为二进制,第一位表示和为1,第二位表示和为2……,二进制1表示有,0表示无。如i=3,二进制是11,表示有和为1,2的存在。下一个状态:next=(1<<(p-1))|i|(i<<k)&size。1、表示和为p的存在,2、i本身,3、有和为(i+p)存在。原创 2017-08-06 15:25:25 · 319 阅读 · 0 评论 -
hdu6078 Wavel Sequence 2017多校第四场1012 dp
hdu6078 Wavel Sequence 2017多校第四场1012 dp题意:给定数组a和b,在a和b中取几个数,使满足a[i]=b[j],且a[1]<a[2]>a[3]<a[4]>a[5]...。求这样的子序列有多少。题解:dp[i][j][0]:a数组前i个与b数组前j个满足题意的所有方案数,且a[i]=b[j]为波谷。dp[i][j][1]:a数组前i个与b数组前j个满足题意的所有方案数,且a[i]=b[j]为波峰。up:当a[i]>b[j],这个时候a[i]可以作为波峰的所有情况数,原创 2017-08-15 10:43:55 · 339 阅读 · 0 评论