Problem B. Maximum repetition substring
时间限制 1000 ms
内存限制 32 MB
The repetition number of a string is defined as the maximum number R such that the string can be partitioned into R same consecutive substrings. For example, the repetition number of "ababab" is 3 and "ababa" is 1.
Given a string containing lowercase letters, you are to find a substring of it with maximum repetition number.
输入数据
输出数据
For each test case, print a line containing the test case number( beginning with 1) followed by the substring of maximum repetition number. If there are multiple substrings of maximum repetition number, print the lexicographically smallest one.
样例输入
样例输出
复制
Case 1: ababab
Case 2: aa
$ Mathjax font initiator $