LCS2  Longest Common Substring II
A string is finite sequence of characters over a nonempty finite set Σ.
In this problem, Σ is the set of lowercase letters.
Substring, also called factor, is a consecutive sequence of characters occurrences at least once in a string.
Now your task is a bit harder, for some given strings, find the length of the longest common substring of them.
Here common substring means a substring of all the considered strings.
Input
The input contains at most 10 lines, each line consists of no more than 100000 lowercase letters, representing a string.
Output
The length of the longest common substring. If such string doesn't exist, print "0" instead.
Example
Input: alsdfkjfjkdsal fdjskalajfkdsla aaaajfaaaa Output: 2
Notice: new testcases added
hide comments
oier12345:
20210414 07:35:37
good luck! 

Leandro Vianna:
20201128 22:42:25
I got TLE with gcc but AC with clang. O(n lg n). 

ablondal:
20200825 21:03:02
Solved with O(nlogn) suffix array and O(nlogn) postprocessing, but only using clang compiler, got TLE with gcc... Last edit: 20200825 21:03:38 

shefin:
20190522 00:23:50
AC with O(n) Suffix Array. Time limit is so strict. Any extra log factor while traversing the LCP array gives TLE. I've used a deque while traversing the LCP array for finding the ans. 

harolinch:
20180729 10:26:13
time limit is bullshit, comon, increase it some Last edit: 20180729 10:26:45 

xzy:
20180615 16:01:31
Can I use "while(scanf("%s",ch))!=EOF)" for input?


edgration:
20180604 05:14:30
WA on #10, because I forget to update information on the parent tree Last edit: 20180604 05:26:37 

centaurus99:
20180413 11:07:43
Last edit: 20180413 11:13:29 

shadyqwq:
20180105 09:14:05
[Removed] Nevermind... Last edit: 20180105 09:15:51 

zahisho:
20171103 20:19:21
never mind, submitted, passed until 10 and TLE 
Added by:  Bin Jin 
Date:  20070924 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 CPP 