#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<string.h>
#include<algorithm>
using namespace std;
int main(){
int n;
scanf("%d", &n);
unsigned long long sumOfAll = 0, sumAfterOneDelete = 0, sumAfterTwoDelete = 0;
unsigned long long tmp;
for(int i = 0; i < n; ++i){
scanf("%I64d", &tmp);
sumOfAll += tmp;
}
for(int i = 1; i < n; ++i){
scanf("%I64d", &tmp);
sumAfterOneDelete += tmp;
}
for(int i = 2; i < n; ++i){
scanf("%I64d", &tmp);
sumAfterTwoDelete += tmp;
}
printf("%I64d\n", sumOfAll - sumAfterOneDelete);
printf("%I64d\n", sumAfterOneDelete - sumAfterTwoDelete);
return 0;
}
本来想通过数个数的,但是复杂度太高了,于是就看了参考解答, 真的是很机智啊!