This problem is in Contest(s) below:
Contest 5998:北海基础班字符串家庭作业
Contest 5999:鲁小文源字符串家庭作业