LongLong
Practice
4.1 (62 votes)
Approved
Binary search
Hash maps
Medium
Open
String manipulation
Problem
81% Success 5628 Attempts 30 Points 2s Time Limit 256MB Memory 1024 KB Max Code
You are given a string S. Find the length of its the longest substring which occurs at least two times. Occurences can intersect.
Input
One line containing a string S consisting of lowercase Latin letters.
Output
Output one integer - answer to the question.
Constraints
1 <= length of S <= 1000000
Submissions
Please login to view your submissions
Similar Problems
Points:50
43 votes
Tags:
Hard
Points:30
48 votes
Tags:
Ad-HocAlgorithmsApprovedHash MapsMediumOpen
Points:30
88 votes
Tags:
ApprovedBinary SearchMediumOpenSorting
Editorial