This problem is in Contest(s) below:
Contest 1355:最靓的仔
Contest 1441:YC-NOIP普及