This problem is in Contest(s) below:
Contest 3184:字符与字符串