This problem is in Contest(s) below:
Contest 1000:贪心算法
Contest 1216:2023春季周日早