This problem is in Contest(s) below:
Contest 1300:贪心算法