2000ms 262144K
You're given a string of lower-case Latin letters. Your task is to find the length of its longest substring that can be met in the string at least twice. These occurrences can overlap (see sample test 2).
给你一个含小写字母的字符串,你的任务是找到在这个字符串中出现至少两次的最长字串。这些字串可以重叠(看样例2)
The first input line contains the string. It's guaranteed, that the string is non-empty, consists of lower-case Latin letters, and its length doesn't exceed 100.
第一行输出一行字符串。保证这个字符串不空,且由小写字母组成,长度不超过100.
Output one number — length of the longest substring that can be met in the string at least twice.
输出一个数字——在这个字符串中出现至少两次的字串的最大长度
abcd
0
ababa
3
zzz
2