This problem is in Contest(s) below:
Contest 2000:零基础第八节
Contest 1324:行之高年级第一节课练习(枚举、桶、排序,字符串)
Contest 1282:昌乐二中基础组20210810
Contest 1651:字符练习