Longest Common Palindrome Substring
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

A palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left.

Given two strings which consists of lowercase letters, find the length of the longest common palindrome substring among these strings.

输入描述:

There are several test cases.

For each test case, there are two single lines contains two string S and T which only consist of lowercase English letters. (1≤|S|,|T|≤105)

输出描述:

For each test case, output the length in a single line.
示例1

输入

复制
aba
aaa
ababa
babab
aaaaa
aaaab

输出

复制
1
3
4