This problem is in Contest(s) below:
Contest 1154:ACM集训队训练