-->
当前位置:首页 > 题库

PROGRAMMING:Decode message

Luz5年前 (2021-05-10)题库592
Xiao Ming received a task to crack the message: the message is a string of text, and the cracked ciphertext should be the longest of all the substrings that appear more than 1 times in the message string. It is stipulated that the message itself cannot be called its own substring. Please write as efficient a program as possible to help Xiao Ming complete this difficult task.
###Input format:
The input is a string representing the message, which contains no more than 10000 letters.
###Output format:
The output is an integer indicating the length of the ciphertext string cracked.
###Input sample 1:
```in
xabceabcf
```
###Output sample 1:
```out
three
```
###Input sample 2:
```in
xyabcabcayx
```
###Output sample 2:
```out
four
```






answer:If there is no answer, please comment