This problem is in Contest(s) below:
Contest 1021:2019CSP普及模拟赛B
Contest 1182:基础课程-字符串