Hide
Problem C
Longest Common Substring
Given a list of strings, what is the longest substring common to all of them?
Input
The first line of input contains an integer
Each of the next
Output
Output a single integer, which is the length of the longest substring common to all of the input strings.
Sample Input 1 | Sample Output 1 |
---|---|
5 axabcrwmvd abcn tabchwqsl bvrkabcayna tyabc |
3 |