摘要:
题目链接:https://www.luogu.com.cn/problem/P1507 解题思路:二维费用背包模板题。 示例代码: #include <bits/stdc++.h> using namespace std; const int maxn = 505; int v1, v2, n, f 阅读全文
posted @ 2020-09-09 14:05
quanjun
阅读(126)
评论(0)
推荐(0)
摘要:
题目链接:https://www.luogu.com.cn/problem/P5662 解题思路: 我们进行 \(t−1\) 轮 完全背包 : 把今天手里的钱当做背包的容量, 把商品今天的价格当成它的消耗, 把商品明天的价格当做它的价值。 示例代码: #include <bits/stdc++.h> 阅读全文
posted @ 2020-09-09 13:37
quanjun
阅读(302)
评论(0)
推荐(0)
浙公网安备 33010602011771号