摘要:
题目 略 简单的贪心 #include <iostream> #include <cstring> using namespace std; const int N=2003; int n,k,len; int c[30]; char s[N]; int main(){ int cas; cin>> 阅读全文
posted @ 2022-10-08 09:15
towboat
阅读(20)
评论(0)
推荐(0)
摘要:
题目 n个物品 有属性a[i],b[i] 选择若干物品,且有sum{a[i]}=sum{b[i]}*k, 问 sum{a[i]} 最大值 n<=100 解答 01背包, sum{a[i]} -sum{b[i]}*k==0, 展开写 (a[1]-b[1]*k) + (a[2]-b[2]*k) + .. 阅读全文
posted @ 2022-10-08 09:07
towboat
阅读(21)
评论(0)
推荐(0)
浙公网安备 33010602011771号