优先队列(根据每次加人各项目会产生多少增益) ```cpp#include#include#includeusingnamespacestd;constintN=1e5+10;structmoney{intk,b,wcount,incre;//wcount是已经选择多少人;incre是wcount到wcount+1的增益}mon[N];doubl 题解列表 2024年04月13日 0 点赞 0 评论 532 浏览 评分:0.0
优质题解 贪心 + 优先队列 摘要:# 贪心 + 优先队列 ## 解题思路 > 问题一:某一娱乐项目所需要支付的钱随着购买人数的增加是一个怎样的趋势? 可以发现,单价为$$one = k \times x + b$$,购买…… 题解列表 2023年05月04日 1 点赞 0 评论 1777 浏览 评分:9.8