-
-
Save yxdb/472d141cee6c80b4fede to your computer and use it in GitHub Desktop.
Project 5: Diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
go to the 1st comment for the problem statement please. :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Project 5: Diff
Given two strings S1 and S2, find the LCS (longest common subsequence) of them.
Input Specification
There is only one input file and it contains multiple test cases. The first line of input file contains one positive integer T, indicating there are T test cases. For each test case, there are two lines. Each line contains one string Si (1 <= |Si| <= 1000, |Si| means the length of Si). All characters in Si are printable standard ASCII characters, which means all in the range [0x20, 0x7E]. Please note that Si may contain spaces since the ASCII code of space (
' '
) is 0x20. It's case sensitive in this problem, so'A'
and'a'
should be treated as different characters.Output Specification
For each test case:
No difference found
.Totally different
.Don't output redundant characters like spaces at the front or the end of a line.
Sample Input
Sample Output
Hint
In the 3rd test case, following output is also accepted:
In the 4th test case, following output is also accepted: