Loading

摘要: 相较与完全背包问题,多出来的条件是,每种物品的数量是一定的。 只需要多套一个循环,选1个2个3个一直到k个,k+1种可能循环一遍就行了。 #include<bits/stdc++.h> using namespace std; const int N=101; int n,m; int f[N]; 阅读全文
posted @ 2021-11-05 15:27 longwind7 阅读(37) 评论(0) 推荐(0)