#P3804. 【模板】后缀自动机(SAM)
【模板】后缀自动机(SAM)
Description
Given a string consisting only of lowercase letters.
Please find the maximum value of (occurrence count of a substring) multiplied by (the length of that substring) over all substrings of whose occurrence count is not .
Input Format
One line containing a string consisting only of lowercase letters.
Output Format
A single integer, the required answer.
abab
4
Hint
Constraints:
-
For of the testdata, .
-
For of the testdata, .
-
2023.7.30: Added a set of hack testdata.
Translated by ChatGPT 5
京公网安备 11011102002149号