This problem is in Contest(s) below:
Contest 1161:2022暑期246早晚第八期
Contest 1155:2022暑期135下c++第七期
Contest 1166:2022暑期246晚c++第六七期
Contest 1439:2025秋周日晚p进阶2
Contest 1416:2025暑135晚p3