摘要:
分组背包: #include<iostream> #include<cmath> #include<cstring> #include<algorithm> using namespace std; int n,m; const int N=105; int f[N],v[N],w[N]; int 阅读全文
摘要:
首先是01背包的算法代码: #include<iostream> #include<cmath> #include<cstring> #include<algorithm> using namespace std; const int N=1005; int f[N]; int v[N],w[N]; 阅读全文