LCS0 - Longest Common Subsequence

题意翻译

给定两个只包含小写字母的字符串,长度小于等于50000。 求最长公共子序列。 感谢@Nishikino_Maki 提供的翻译

题目描述

No imagination at the moment.

输入输出格式

输入格式


You will be given two lines. The first line will contain the string A, the second line will contain the string B. Both strings consist of no more than 50000 lowercase Latin letters.

输出格式


Output the length of the longest common subsequence of strings A and B.

输入输出样例

输入样例 #1

abababab
bcbb

输出样例 #1

3