#P5546. [POI 2000] 公共串
[POI 2000] 公共串
Problem Description
Given several words consisting of lowercase letters, find the length of their longest common substring.
Input Format
The first line of the file is an integer , , which represents the number of words. The next lines each contain one word, consisting only of lowercase letters. The length of each word is at least and at most .
Output Format
Only one line containing one integer: the length of the longest common substring.
3
abcb
bca
acbc
2
Hint
Translated by ChatGPT 5