P28577 [洛谷] [AHOI2004] Strange String
普及+
题目描述

Problem Description

Input Format

The input file contains two strings X and Y. Both strings consist of characters that are either '0' or '1'. The length of each string is less than 9999.

Output Format

Output the length of the longest common subsequence of X and Y.

Sample Input and Output

Sample Input #1

01010101010 00000011111

Sample Output #1

6

Sample Input #2

01011 010010101111111111

Sample Output #2

5
输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
01010101010 00000011111
样例输出
6