This problem is in Contest(s) below:
Contest 1025:2019CSP普及模拟赛F
Contest 1130:2022小学省赛练习题