摘要: 输入是 4 5 1 2 3 2 4 1 3 4 3 4 5 2 实际上把他边成 4 5 1 2 1 2 4 1 2 4 1 3 4 1 6 8 1 4 5 1 4 5 1 全部是一就变成01背包问题了 #include<bits/stdc++.h> using namespace std; cons 阅读全文
posted @ 2022-10-27 19:12 天然气之子 阅读(13) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> using namespace std; const int N = 1010; int n, m; int v[N], w[N]; int f[N]; int main() { cin >> n >> m; for (int i = 1; i <= 阅读全文
posted @ 2022-10-27 18:20 天然气之子 阅读(10) 评论(0) 推荐(0) 编辑