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
surayans tiwari(http://bit.ly/1EPzcpv):
20170116 13:10:25
hash+binarysearch gives TLE 

dad3zz:
20161220 01:29:20
totziens' Suffix Automaton is necessary! 

totziens:
20161001 10:00:55
Suffix Automaton is necessary! 

Augusto:
20160831 01:41:12
"Here common substring means a substring of two or more strings." The problem is kind of obvious but I think that statement might be confusing, we're asked for the length of the longest common substring, common means common to ALL the strings in the input :)


sxysxyspoj:
20160818 07:40:23
WA at #10....... 

flaze:
20160730 15:52:28
Well... It seems easy to get WA on #10... 

[Rampage] Blue.Mary:
20160311 07:30:11
My program uses hash and get AC. 

liuguangzhe:
20160311 02:38:03
Is suffix automaton necessary?Or suffix tree and suffix array are also Ok?And what about HASH? 

sigma_poet:
20160116 12:36:39
always get wa on #10... sad ....cao yi yuan do you know me ? we've ever lived in the same dormitory in Peking 80 school......曹奕远 

sigma_poet:
20160116 12:29:57
get wa on #0 
Added by:  Bin Jin 
Date:  20070924 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 CPP 