This problem is in Contest(s) below:
Contest 1003:竞赛基础题型练习
Contest 1162:2025春季入门班课程
Contest 1167:2025暑假信奥入门班课程