Archive

Archive for December, 2014

[URI Online Judge] – 2290 – Apaixornados Numbers

December 4th, 2014 Comments off

Link: https://www.urionlinejudge.com.br/judge/en/problems/view/2290

 

You will be given an array of N numbers, where everyone will be in pairs. But two of those numbers ended up without peer, these numbers are said apaixornados numbers, you can identify what are that numbers?

For example, A = {1, 1, 3, 3, 5, 5, 5,7}, the apaixornados numbers are 5 and 7.

Input

The input consists of several test cases. Each test case is composed of a line having an integer N (1 ≤ N ≤ 105), followed by N numbers (-1012 < A < 1012). The input ends when N = 0 and it should not to be processed.

Output

For each test case print only the apaixornados numbers in ascending order. It is guaranteed that only two numbers are alone.

Input SampleOutput Sample
6
1 3 4 7 3 1
4
1 1 5 1
8
1 1 3 3 5 5 5 7
0
4 7
1 5
5 7

 

solve: