A and B and Compilation Errors
time limit per test

2 seconds

memory limit per test

256 megabytes

input

standard input

output

standard output

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.

Sample test(s)
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 排序后对比,若发现不同,那么就证明此数被删了
 #include <iostream>
#include <cstring>
#include <algorithm>
#include <cstdio>
using namespace std; int main(void)
{
int n;
int s_1[] = {};
int s_2[] = {};
int s_3[] = {}; scanf("%d",&n);
for(int i = ;i < n;i ++)
scanf("%d",&s_1[i]);
for(int i = ;i < n - ;i ++)
scanf("%d",&s_2[i]);
for(int i = ;i < n - ;i ++)
scanf("%d",&s_3[i]); sort(s_1,s_1 + n);
sort(s_2,s_2 + n - );
sort(s_3,s_3 + n - ); for(int i = ;i < n;i ++)
if(s_1[i] != s_2[i])
{
printf("%d\n",s_1[i]);
break;
}
for(int i = ;i < n - ;i ++)
if(s_2[i] != s_3[i])
{
printf("%d\n",s_2[i]);
break;
} return ;
}

CF 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. Warning: Function created with compilation errors.

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

  3. 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 ...

  4. Codeforce 519B - A and B and Compilation Errors

    A and B are preparing themselves for programming contests. B loves to debug his code. But before he ...

  5. CF 375B Maximum Submatrix 2[预处理 计数排序]

    B. Maximum Submatrix 2 time limit per test 2 seconds memory limit per test 512 megabytes input stand ...

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

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

  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. Light oj 1138 - Trailing Zeroes (III) (二分)

    题目链接:http://lightoj.com/volume_showproblem.php?problem=1138 题目就是给你一个数表示N!结果后面的0的个数,然后让你求出最小的N. 我们可以知 ...

  2. 【Android】Handler的应用(三):从服务器端分页加载更新ListView

    在前面两节中,我们了解了如何从服务器中加载JSON数据. 现在,我们将把服务器中的JSON数据加载更新到ListView. 并且,结合之前博文的  “动态追加分页ListView数据”的相关知识,实现 ...

  3. Failed to execute query: Duplicate entry '0' for key 'PRIMARY'

    今天在做php登陆和登出会插入数据到log表中,,结果报错了:如下: Failed to execute query: Duplicate entry '0' for key 'PRIMARY' SQ ...

  4. python字符串相关的函数

    有些是字符串对象的方法,有些是内建库的方法 split分割字符串 find 查找字符串 for c in str:  遍历字符串 len 获取字符串长度 int    将字符串转换成int str   ...

  5. Nexus搭建Manven

    Nexus相当于中转服务器,减轻网络的负载,加速项目搭建的进程 1.下载地址:http://www.sonatype.org/nexus/go 2.下载的是zip包,解压后进入D:\nexus-2.8 ...

  6. 解决Linux下zip文件解压乱码问题

    #!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import zipfile #print "Proce ...

  7. TFS 图标意思

    小人:文件被其他人签出 对号:文件被自己签出 锁: 文件已经被签入 加号:新增加一个文件

  8. HDU 4586 A - Play the Dice 找规律

    A - Play the DiceTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/ ...

  9. POJ 3026 Borg Maze

    Borg Maze Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7998   Accepted: 2675 Descrip ...

  10. Github上最全的APICloud开源前端框架效果盘点(转)

    1.微信网站几分钟变身“原生 App” 微信推出了微信JS-SDK,使微信公共号可以直接调用微信原生的接口,具备部分原生应用的能力.微信JS-SDK的推出,将大大提高微信公共号的 用户体验,但是如果存 ...