This problem is in Contest(s) below:
Contest 1937:算法基础练习(1)
Contest 1646:区一中提高组贪心练习
Contest 1920:七、八年级基础算法复习题目