摘要:
1 #include <cmath> 2 #include <cstdio> 3 #include <cstdlib> 4 #include <iostream> 5 #include <algorithm> 6 const int MAXN = 100; 7 const int MAXV = 20 阅读全文
posted @ 2019-11-07 20:56
KBAI
阅读(173)
评论(0)
推荐(0)
摘要:
完全背包最简代码 1 for(int i=1;i<=n;++i) 2 for(int j=w[i];j<=w;++j) 3 dp[j]=max(dp[j],dp[j-w[i]]+v[i]); View Code 阅读全文
posted @ 2019-11-07 18:52
KBAI
阅读(89)
评论(0)
推荐(0)

浙公网安备 33010602011771号