This problem is in Contest(s) below:
Contest 1976:2024年csp-x
Contest 1983:1.14练习