Given two strings, output it's length of longest common subsequence (LCS).
The first line contains one number n, denoting number of test cases, each test case contains two string without spaces, each on a line. The length of string are no more than 100.
For each test case, output the length of LCS on a line.
2 abc cba abcdefghijklmnopqrstuvwxyz beeiscolorful
1 7
Migrated from old NTUJ.
No. | Testdata Range | Score |
---|