273. The Median
Print the median of n integers.
When n is odd this is the middle value. When n is even there are two
middle values, and this problem asks for the SMALLER of them, so that the answer
is always one of the input values and never a fraction.
1 2 3 -> 2
1 2 3 4 -> 2 (the smaller of 2 and 3)
One index expression handles both cases, and finding it is the exercise.
Constraints - `1 ≤ n ≤ 200000` - `-1000000000 ≤ a[i] ≤ 1000000000`
Input
The first line contains an integer n.
The second line contains n integers.
Output
Print one integer, the median as defined above.
Hints
Four rungs, in order. The last two open once you have submitted an attempt. A wrong one counts.