This problem is in Contest(s) below:
Contest 1516:NJ23秋季信息学奥赛提高-4