This problem is in Contest(s) below:
Contest 1142:基础班-贪心