动态规划
可能走太远 └(^o^)┘
这个作者很懒,什么都没留下…
展开
-
BMHOJ 1439: 选择我自己的算法
BMHOJ 1439: 选择我自己的算法 看:数据多小!水题! 搜索一交:80pts 天哪,有毒吧! 那。。。就dp 令f[i][j]表示用了i个值为j可不可能达到 转移很简单 当然,滚动数组一开就好了 —》f[j]=1,则f[j+a[k]]=1,f[j*a[k]]=1; std: #include<bits/stdc++.h> using namespace std; #defi...原创 2018-12-14 21:38:29 · 488 阅读 · 0 评论 -
luogu P1156 垃圾陷阱
luogu P1156 垃圾陷阱 动态规划 没错f[i][j]表示第i个时刻还有j的生命值能叠的最大值 好写但垃圾 所以滚! std: #include<bits/stdc++.h> using namespace std; struct Trbs{ int t;//投放的时间 int tim;//维持的时间 int h;//高度 }s[101]; int...原创 2018-12-10 21:39:36 · 91 阅读 · 0 评论