~/algor $ cat problems/saralash-mediana
Median
Easy
1000 ms
128 MB
24%
An odd number $n$ of integers is given. Find their median: the number that stands exactly in the middle when the numbers are sorted in increasing order.
Input
The first line contains an odd positive integer $n$. The second line contains $n$ integers $a_{i}$ separated by spaces.
Output
One integer — the median.
Note
$1 \le n \lt 2 * 10^{5}$, $n$ is odd
$-10^{9} \le a_{i} \le 10^{9}$
Examples
Input #1
5 7 1 9 3 5
Output #1
5
Input #2
1 -4
Output #2
-4