参考:https://www.liuchuo.net/archives/543
一开始没想到用结构做,用了2个分开的数组来存月饼的价格和数量,到了排序时发现会麻烦。
排序好了后,后面的价格计算比较简单,就用总需求和月饼数量依次比较。
参考:https://www.liuchuo.net/archives/543
一开始没想到用结构做,用了2个分开的数组来存月饼的价格和数量,到了排序时发现会麻烦。
排序好了后,后面的价格计算比较简单,就用总需求和月饼数量依次比较。
月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不同风味的月饼。现给定所有种类月饼的库存量、总售价
1020 月饼(JAVA)
月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不同风味的月饼。现给定所有种类月饼的库存
其库存量分别为 18、15、10 万吨,总售价分别为 75、72、45 亿元。如果市场的最大需求量只有 2...
月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不同风味的月饼。现给定所有种类月饼的库
1020. 月饼 (25)时间限制100 ms内存限制65536 kB代码长度限制8000 B判题程序St
很少做贪心的题 , 第二次了吧应该 月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不同风味的月饼。现给定所有
1020 月饼 (25 分)月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不同风味
写在前面实现思路结构体封装月饼元数据,总库存、总售价、单价根据单价将结构体非增序排序正序循环,需求量递减库存量;库存大,更新需
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M