CF443B Kolya and Tandem Repeat
Description
Kolya got string $ s $ for his birthday, the string consists of small English letters. He immediately added $ k $ more characters to the right of the string.
Then Borya came and said that the new string contained a tandem repeat of length $ l $ as a substring. How large could $ l $ be?
See notes for definition of a tandem repeat.
Input Format
The first line contains $ s $ ( $ 1
Output Format
Print a single number — the maximum length of the tandem repeat that could have occurred in the new string.
Explanation/Hint
A tandem repeat of length $ 2n $ is string $ s $ , where for any position $ i $ ( $ 1