This problem is in Contest(s) below:
Contest 8939:▁▂▃▄▅▆▇█C++2025秋长训B7-贪心初步