This problem is in Contest(s) below:
Contest 1103:2022寒假提高班练习题
Contest 1182:基础课程-字符串