摘要:
与01背包结合的: #include<bits/stdc++.h> using namespace std; const int maxn=1e3+5; int dp[maxn][maxn]; int main(){ int n,V,M;cin>>n>>V>>M; for(int i=1;i<=n; 阅读全文
posted @ 2021-02-04 20:03
Anonytt
阅读(31)
评论(0)
推荐(0)
摘要:
不优化朴素解法,01背包看出S=1,完全背包看成S=INF,再跑多重背包(时间复杂度高,3层for循环): #include<bits/stdc++.h> using namespace std; const int maxn=1e3+5; int dp[maxn]; int v[maxn],w[m 阅读全文
posted @ 2021-02-04 19:28
Anonytt
阅读(59)
评论(0)
推荐(0)

浙公网安备 33010602011771号