#P8697. [蓝桥杯 2019 国 C] 最长子序列
[蓝桥杯 2019 国 C] 最长子序列
Problem Description
We say that a string contains a string if is a subsequence of . That is, we can pick some characters from and keep their original order to form a new string that is exactly the same as . Given two strings and , starting from the first character of , what is the maximum number of consecutive characters that are contained in ?
Input Format
Two lines, each containing one string. The first line is , and the second line is . Both strings are non-empty and contain only uppercase English letters.
Output Format
Output one integer, the answer.
ABCDEABCD
AABZ
3
Hint
For of the testdata, .
For of the testdata, .
For all testdata, .
Problem F of Group C in the 2019 Lanqiao Cup National Contest.
Translated by ChatGPT 5