摘要: 点击查看代码 #include<iostream> using namespace std; const int N = 1010; int n, V, M; int v[N], m[N], w[N]; int f[N][N]; int main() { cin >> n >> V >> M; fo 阅读全文
posted @ 2022-06-19 16:25 wKingYu 阅读(24) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> using namespace std; const int N = 1e3 + 10; int n, m; int v[N], w[N], s[N]; int f[N]; int main() { cin >> n >> m; for (int 阅读全文
posted @ 2022-06-19 16:06 wKingYu 阅读(32) 评论(0) 推荐(0)
摘要: 多重背包朴素做法 时间复杂度 \(O(n \cdot m \cdot s)\) 总体时间复杂度 \(500 \times 6000 \times 10 = 3 \times 10^{7}\) 点击查看代码 #include<iostream> using namespace std; const i 阅读全文
posted @ 2022-06-19 13:31 wKingYu 阅读(38) 评论(0) 推荐(0)