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?

Input

The first line of the input contains integer n (3 ≤ n ≤ 105) — the initial number of compilation errors.

The second line contains n space-separated integers a1, a2, ..., an (1 ≤ ai ≤ 109) — the errors the compiler displayed for the first time.

The third line contains n - 1 space-separated integers b1, b2, ..., bn - 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.

Output

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.

Examples
input
5
1 5 8 123 7
123 7 5 1
5 1 7
output
8
123
input
6
1 4 3 3 5 7
3 7 5 4 3
4 3 7 5
output
1
3
Note

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.

 #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cstring>
#include <vector>
using namespace std;
#define N 100005
int a[N],b[N],c[N];
int main()
{
int n;
while(cin>>n){
for(int i=;i<n;i++)
cin>>a[i];
for(int i=;i<n-;i++)
cin>>b[i];
for(int i=;i<n-;i++)
cin>>c[i];
sort(a,a+n);
sort(b,b+n-);
sort(c,c+n-);
for(int i=;i<n;i++)
if(a[i]!=b[i]){
cout<<a[i]<<endl;
break;
}
for(int i=;i<n-;i++)
if(c[i]!=b[i]){
cout<<b[i]<<endl;
break;
}
}
return ;
}

Codeforce 519B - A and B and Compilation Errors的更多相关文章

  1. CodeForces 519B A and B and Compilation Errors

    B. A and B and Compilation Errors time limit per test 2 seconds memory limit per test 256 megabytes ...

  2. CodeForces 519B A and B and Compilation Errors【模拟】

    题目意思还是蛮简单的,看 输入数据输出数据还是比较明显的 我用排序来写还是可以AC的 //#pragma comment(linker, "/STACK:16777216") // ...

  3. CodeForces 519B A and B and Compilation Errors (超水题)

    这道题是超级水的,在博客上看有的人把这道题写的很麻烦. 用 Python 的话是超级的好写,这里就奉上 C/C++ 的AC. 代码如下: #include <cstdio> #includ ...

  4. CF A and B and Compilation Errors (排序)

    A and B and Compilation Errors time limit per test 2 seconds memory limit per test 256 megabytes inp ...

  5. Warning: Function created with compilation errors.

    SQL> create or replace function 2 remove_constants(p_query in varchar2) return varchar2 3 as 4 l_ ...

  6. Codeforces Round #294 (Div. 2)B - A and B and Compilation Errors 水题

    B. A and B and Compilation Errors time limit per test 2 seconds memory limit per test 256 megabytes ...

  7. Warning: Function created with compilation errors!

    解决方案: sqlplus / as sysdba grant execute on UTL_I18N to scott; grant execute on DBMS_CRYPTO to scott;

  8. oracle 存储过程创建报错 Procedure created with compilation errors

    出现这错误的话,存储过程还是会成功创建的,创建好后再逐个打开查找存储过程的问题 问题:基本上就是存储过程里面的表不存在,dblink 不存在    ,用户名.xx表  要么用户名不存在要么表不存在 创 ...

  9. 【Henu ACM Round#15 B】A and B and Compilation Errors

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 开3个map, 存在map里面: 然后迭代第一个和第二个map; 分别与第二个和第三个map比较就可以了 [代码] #include ...

随机推荐

  1. day1 对java的认识

    对java的认识 1.java是一门跨平台的语言,由jvm进行预编译,转换成类似伪代码一样的东西,最后再转换成机器语言. 2.程序是由数据结构和算法构成,其他所有的工具类,方法都是为数据结构或者算法服 ...

  2. 解读前端js中签名算法伪造H5游戏加分

    信息安全在我们日常开发中息息相关,稍有忽视则容易产生安全事故.对安全测试也提出更高要求.以下是笔者亲自实践过程: 一. 打开某个数钱游戏HTML5页面,在浏览器 F12 开发工具中,查看的js,如下, ...

  3. 使用font-weight无法调节字体粗细的问题解决

    最近我遇到这样的问题,就是使用font-weight无法调节字体粗细. 据我所知,font-weight是用于调节字体粗细的,可选100.200.300.400(normal).500.600.700 ...

  4. Android在Activity中与Fragment中创建自定义菜单的区别

    区别就在这里,Activity中添加菜单要这样: public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R ...

  5. oracle中sql语句的to_date语法

    完整日期:TO_DATE('2009-4-28 00:00:00', 'yyyy-mm-dd hh24:mi:ss'); to_date('2008/09/20','yyyy/mm/dd') 创建视图 ...

  6. 第2章 在 HTML中 使用 JavaScript

    第2章 在 HTML中 使用 JavaScript 2.1 script 元素 2.1.1 标签的位置 2.1.2 延迟脚本 2.1.3 异步脚本 2.1.4 在XHTML中的使用 2.1.5 不推荐 ...

  7. c#学习心得(2)

    1.foreach与IEnumerable和IEnumerator的结合使用????? using System; using System.Collections; class Program { ...

  8. kettle文本文件写入数据库,简单进行数据清洗

    使用kettle7.0,java8.0,Navicat,实验数据使用全国肺炎2月24日的数据 1.建立关系 2.创建连接 如果是第一次连接,可能会出现连接不上的情况,这时候可能情况是没有将Mysql的 ...

  9. 我眼中的ASP.NET.MVC

    MVC MVC全名 : Model View Controller ( Model-模型 View-视图  Controller-控制器)是一种经典的,经久不衰的,屹立不倒的软件设计框架.实现了业务逻 ...

  10. Python之一、#!/usr/bin/python到底是什么意思

    引用https://www.cnblogs.com/furuihua/p/11213486.html 关于脚本第一行的 #!/usr/bin/python 的解释,相信很多不熟悉 Linux 系统的同 ...