会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
walfy
博客园
首页
新随笔
联系
管理
随笔分类 -
动态规划之dp
上一页
1
2
完全背包hdu1114
摘要:https://vjudge.net/contest/68966#problem/F 初始化就行了;dp【0】=0; 这题还要刚好装满背包,输出时进行判断
阅读全文
posted @
2017-03-12 20:32
walfy
阅读(139)
评论(0)
推荐(0)
最长递增子序列hdu1087
摘要:https://vjudge.net/contest/68966#problem/E dp【i】=a【i】这一步一定不能忘了!!
阅读全文
posted @
2017-03-12 20:04
walfy
阅读(146)
评论(0)
推荐(0)
最长公共子序列poj1458
摘要:#include #include #include #include #include #include #include #include #include #include #include #define ll long long using namespace std; const int N=100; int dp[N][N]; int main() { char s1[...
阅读全文
posted @
2017-03-12 18:46
walfy
阅读(438)
评论(0)
推荐(0)
01背包排序
摘要:https://vjudge.net/contest/150953#problem/D 此题关键 就是排序,刚开始按q排序结果想死都想不出来应该是q-p排 一维的dp 二维的dp
阅读全文
posted @
2017-03-12 13:40
walfy
阅读(474)
评论(0)
推荐(0)
01背包饭卡
摘要:https://vjudge.net/contest/150953#problem/B 转化一下就行了,<5时要特判
阅读全文
posted @
2017-03-12 12:25
walfy
阅读(183)
评论(0)
推荐(0)
01背包Bone Collector
摘要:今天复习背包,之前集训讲过,现在又忘了,昨天杭电校赛刚好有一题背包,居然不会做了,好尴尬,重新复习一下。 https://vjudge.net/contest/150953#problem/A 可以说是最基础的01背包了 最重要的就是状态转移方程了dp[j]=max(dp[j],dp[j-w[i]]
阅读全文
posted @
2017-03-12 12:07
walfy
阅读(184)
评论(0)
推荐(0)
上一页
1
2
公告