Problem 1961 --Coincidence

1961: Coincidence

Time Limit: 1 Sec  Memory Limit: 32 MB
Submit: 56  Solved: 26
[Submit][Status][Web Board][Creator:][下载FPS1元][添加到购物车][下载测试数据1元][20kb]

Description

Find a longest common subsequence of two strings.

Input

First and second line of each input case contain two strings of lowercase character a…z. There are no spaces before, inside or after the strings. Lengths of strings do not exceed 100.

Output

For each case, output k – the length of a longest common subsequence in one line.

Sample Input

google
goodbye

Sample Output

4

HINT

Source

[Submit][Status]