Sorting
Easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Given a sequence of 32 bit signed integers. Sort this sequence, and remove all repeating elements, i.e. remove all but one copy of each number in the sequence.
Input
The first line contains amount of numbers n (1 ≤ n ≤ 65536) in the sequence. The next n lines contain n integers (one number per line).
Output
Write no more than n numbers, sorted in descending order if n is even, and in ascending order if n is odd. Each number must appear no more than once.
Examples
Input #1
Answer #1
Submissions 4K
Acceptance rate 24%