翻译联系 Day14
作者:互联网
题目:You're Given a String... | JXNUOJ
翻译:
You're Given a String...
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
标签:输出,翻译,联系,样例,Day14,re,length,字符串,string 来源: https://www.cnblogs.com/shw940795634/p/15866526.html