This problem is in Contest(s) below:
Contest 1347:NJ信息学编程训练3-21
Contest 1348:2023寒假C++编程基础集训4
Contest 1349:2023寒假信息学编程集训4