← 返回 amazon 的题目列表K Highest Probability Winners in Lottery System
类型:online_judge
There is a lottery system where the probability of winning is linearly related to the amount spent. Given an integer k, find the k winners with the highest probability of winning.
Example
Input
[(50, 0.5), (20, 0.3), (30, 0.2)], k=1
Output
[(50, 0.5)]