This problem is in Contest(s) below:
Contest 1004:竞赛中等题型练习
Contest 1197:2026春季入门班练习