This problem is in Contest(s) below:
Contest 1437:一些备选题
Contest 1123:贪心进阶
Contest 1262:贪心第一轮复习