填空题

Text Diff

发布于 2022-03-03 17:21:29

Alice made some changes to a text file and she wants to know which lines are changed and compare the before and after line contents. Can you help her with this? 输入描述: The first line contains two integers m (1  m  1000) and n (1  n  1000) – the number of lines in the original text and in the modified text separately. The following m lines are the original text and the next n lines compose the modified text. The length of each text line is in the range [0, 100]. Note that m may not be equal to n.输入样例: 3 4 a bb ccc aa bb ccc dddd 输出描述: The result of the comparison is based on original text. If one line is not modified, just output the line with one leading space ‘ ‘. If this line is modified, output two lines: the original line leading with a ‘-‘ and the modified line leading with a ‘+’.输出样例 -a +aa bb ccc +dddd
关注者
0
被浏览
9
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看