This problem is in Contest(s) below:
Contest 1040:csp/noip数据结构专练
Contest 1017:NOIP模拟
Contest 1092:2022长训班普及\bronze级别练习题