This problem is in Contest(s) below:
Contest 1383:莲花校区练习1
Contest 1406:莲花校区练习1
Contest 1441:YC-NOIP普及