Time Limit: 2s
Memory Limit: 128MB
Given N string S, S......, S[N], you are to find a pair of strings whose longest common prefix has the largest length.
There are multiple test cases. For each case:
The first line is a integer N. (2 <= N <= 20000)
The next N lines each contains a non-empty string S[i]. The length of S[i] is at most 50.
For each case output a line representing the length of longest common prefix.
3 bcabc bcd abcd