Another easy string problem
Execution time limit is 2 seconds
Runtime memory usage limit is 256 megabytes
Given a string . We call any non-empty string good, if it is a substring of and has 4 non-overlapping occurrences in . Your task is to find the number of different good strings.
Input
Contains one string — given string. It is guaranteed that all letters are lowercase English alphabet.
Output
Print one integer — the number of different good strings.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 16
Acceptance rate 13%