This problem is in Contest(s) below:
Contest 1739:25春季信奥编程入门19
Contest 1546:NJ23秋季信息学奥赛提高-11
Contest 1547:NJ23秋季信息学奥赛基础-12