#Lutece2241. 如果早知道wf题也会被ak - DLC1

如果早知道wf题也会被ak - DLC1

Migrated from Lutece 2241 如果早知道wf题也会被ak - DLC1

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

阿伟在网吧打cf时碰上了jjjj

Snipaste2019-05-2212-10-26

给出两个字符串,求这两个串的最长公共子串长度

Input

给出两行,每行一个字符串S。

Output

两个串的最长公共子串长度

Samples

aabcba
ababc
3

Constraints

每个字符串长度<=10610^6

Note

子串:指串中任意个连续的字符组成的子序列

Resources

2019 UESTC ACM Training for Search Algorithm and String