CodeM 资格赛 B 可乐 思维
摘要:
分析: 我们假设购买一种可乐p瓶,我们可以得到期望:p*(m/n*a[i]+(n-m)/n*b[i]),由这个式子我们可以看出唯一的变量是i,所以可以遍历i找出式子的最大值 #include <map> #include <set> #include <stack> #include <cmath> 阅读全文
posted @ 2018-07-15 19:43 九月旧约 阅读(160) 评论(0) 推荐(0)
浙公网安备 33010602011771号