A and B and Compilation Errors

题意翻译

题目描述 A和B在准备他们的编程比赛。 B十分喜欢调试他的代码,但在他让程序输出结果并开始调试之前,他必须先编译他的代码。 最初,编译器显示了nnn 处编译错误,每一处被描述为一个正整数。经过不懈的努力,B就能够修复一个错误然后再去修复另一个。 然而,尽管事实上B的确修复了两个错误,但他无法准确地记住哪些编译上的错误消失了——B所使用的编译器每次输出的剩下的编译错误的顺序是不定的!B明白,不像其它的编程语言,他编程中的某一个编译错误与其它的错误无关,也就是说,修正了一个错误之后,其它的错误依旧存在,不会被修正。 你能帮助B找出他修正了哪两个错误吗?(只有两个) 输入输出格式 输入格式 第一行包括一个整数n ($3<=n<=10^5$),表示最初有多少个编译错误。 第二行包括n个整数,输入时用空格隔开:$a_{1},a_{2},...,a_{n}(1<=a_{i}<=10^9)$ ——表示所有最初编译器输出的编译错误。 第三行包括n−1个整数:$b_{1},b_{2},...,b_{n-1}$——表示B消除一个错误之后,编译器展示出的编译错误。数据保证第三行的序列包括第二列的数中除消除的数(或编译错误)外的所有数。 第四行包括n−2个整数:$c_{1},c_{2},...,c_{n-2}$ ——表示B再消除一个错误之后,编译器展示出的编译错误。数据保证第四行的序列包括第三列中的书中除消除的数(或编译错误)外的所有数。 (以上如有不懂的看样例总能明白!!!) 输出格式 两行,每行一个数,分别代表B第一次和第二次消除的错误。 感谢lonelysir 提供的翻译

题目描述

A and B are preparing themselves for programming contests. B loves to debug his code. But before he runs the solution and starts debugging, he has to first compile the code. Initially, the compiler displayed $ n $ compilation errors, each of them is represented as a positive integer. After some effort, B managed to fix some mistake and then another one mistake. However, despite the fact that B is sure that he corrected the two errors, he can not understand exactly what compilation errors disappeared — the compiler of the language which B uses shows errors in the new order every time! B is sure that unlike many other programming languages, compilation errors for his programming language do not depend on each other, that is, if you correct one error, the set of other error does not change. Can you help B find out exactly what two errors he corrected?

输入输出格式

输入格式


The first line of the input contains integer $ n $ ( $ 3<=n<=10^{5} $ ) — the initial number of compilation errors. The second line contains $ n $ space-separated integers $ a_{1},a_{2},...,a_{n} $ ( $ 1<=a_{i}<=10^{9} $ ) — the errors the compiler displayed for the first time. The third line contains $ n-1 $ space-separated integers $ b_{1},b_{2},...,b_{n-1} $ — the errors displayed at the second compilation. It is guaranteed that the sequence in the third line contains all numbers of the second string except for exactly one. The fourth line contains $ n-2 $ space-separated integers $ с_{1},с_{2},...,с_{n-2} $ — the errors displayed at the third compilation. It is guaranteed that the sequence in the fourth line contains all numbers of the third line except for exactly one.

输出格式


Print two numbers on a single line: the numbers of the compilation errors that disappeared after B made the first and the second correction, respectively.

输入输出样例

输入样例 #1

5
1 5 8 123 7
123 7 5 1
5 1 7

输出样例 #1

8
123

输入样例 #2

6
1 4 3 3 5 7
3 7 5 4 3
4 3 7 5

输出样例 #2

1
3

说明

In the first test sample B first corrects the error number 8, then the error number 123. In the second test sample B first corrects the error number 1, then the error number 3. Note that if there are multiple errors with the same number, B can correct only one of them in one step.