https://leetcode.com/problems/maximize-happiness-of-selected-children/description/
class Solution:
def maximumHappinessSum(self, happiness: List[int], k: int) -> int:
happiness.sort()
happiness.reverse()
ans = 0
for i, e in enumerate(happiness[:k]):
x = min(k, i, e)
y = (e - x)
ans += y
return ans