首页 > NIH Budget
头像 lanxingxuan
发表于 2021-03-15 21:21:03
分组背包,一开始因为没注意每组可以一个都不选的情况,一直没调出来,其实每组数据加个0 0就行 #include<bits/stdc++.h> using namespace std; int dp[13][120000]; int v[200];//价值 int w[200];//重量 展开全文
头像 希胤
发表于 2021-03-16 22:03:47
题目:此题总费用固定,同种疾病的费用只能选择一种方案(每种疾病有四种方案)(方案:花多少钱救多少人),求最多挽救人数分组背包经典例题 #include<bits/stdc++.h> using namespace std; #define fio ios::sync_with_stdio 展开全文

等你来战

查看全部