摘要: 简单贪心 PAT B1020 月饼 题意:现有月饼需求量为D,已知 n 种月饼的库存量和总售价,问如何销售这些月饼,使得可以获得的收益最大。求最大收益 思路:总是选择单价最高的月饼出售,可以获得最大利润 1 #include <cstdio> 2 #include <string> 3 #inclu 阅读全文
posted @ 2018-01-13 11:01 Just_for_Myself 阅读(445) 评论(0) 推荐(1) 编辑