摘要:
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 阅读全文
摘要:
完全背包最简代码 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 阅读全文