This problem is in Contest(s) below:
Contest 1324:2024春周日早C++c6(塘下)
Contest 1134:2022春季周六下\日早第七期
Contest 1000:贪心算法