This problem is in Contest(s) below:
Contest 1035:csp/noip模拟算法练习
Contest 1018:2019CSP复赛练习题
Contest 1130:2022小学省赛练习题