首页 > Cappuccino ~ the end of journey
头像 东溪看水
发表于 2020-06-18 16:50:41
题目:Cappuccino ~ the end of journey来源:第二届太原理工大学程序设计新生赛决赛(重现赛) 解题思路 商店街有一家咖啡厅,提供两种购买卡布奇诺的方式:① 支付 a 元,获得 1 杯卡布奇诺。② 支付 b 元,获得 c 杯卡布奇诺。现在有 d 元,并且可以无限次任意选择购 展开全文
头像 ASC_8384
发表于 2020-06-22 00:13:55
Cappuccino ~ the end of journey 我们可以把它当做完全背包来看,即该背包有两种物品,一种体积为1价值为a,一种体积为c价值为b,在总价值确定的情况下求体积最多的解法。 #include <bits/stdc++.h> using namespace std; 展开全文