首页 > 试题广场 >

Coincidence

[编程题]Coincidence
  • 热度指数:10559 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 64M,其他语言128M
  • 算法知识视频讲解
Find a longest common subsequence of two strings.

输入描述:
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.


输出描述:
For each case, output k – the length of a longest common subsequence in one line.
示例1

输入

abcd
cxbydz

输出

2

这道题你会答吗?花几分钟告诉大家答案吧!