LCS2 - Longest Common Substring II
A string is finite sequence of characters over a non-empty 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.
The input contains at most 10 lines, each line consists of no more than 100000 lowercase letters, representing a string.
The length of the longest common substring. If such string doesn't exist, print "0" instead.
Input: alsdfkjfjkdsal fdjskalajfkdsla aaaajfaaaa Output: 2
Notice: new testcases added
why in the test case the answer is 2?
I don't know why am I getting WA on TEST 15???
I found a wrong way to pass the current testcases, and I have found a new testcase can make it WA. Could I submit the new testcase or do something?
i submited the same solution that has got AC when i used it in the easier version of this problem but now
Last edit: 2017-08-16 15:56:19
Last edit: 2017-04-27 10:25:40
WA 10 cause of not understand SAM well
WHY I ALWAYS GET WA ON TEST10??? :(Last edit: 2017-03-16 16:55:22
Why always get WA on #10???
AC with O(N) suffix array :)