Maximum Common Substring
Easy
Execution time limit is 3 seconds
Runtime memory usage limit is 256 megabytes
Given the strings (A = a_1a_2...a_n) and (B = b_1b_2...b_m).
Your task is to determine the length of the longest common substring shared by both strings.
Input
The first line contains the string (A) and the second line contains the string (B). Both strings consist of lowercase Latin letters, are non-empty, and have a maximum length of 30000 characters.
Output
Print the length of the longest common substring between the two strings.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 13%