VERY IMPORTANT NOTE TO ALL DEC COURSE 2022 PARTICIPANTS (due to delays in email communication): Elementary is gone, so Advanced has a diagnostic test (if you fail, no Dec Course). Syllabus of diagnostic is anything in these prerequisite notes, please review them at this link. Problemsets can be found at this link and under Contests (Collections).

Rar the Cat is back for more fun and games! But this time he wants to find the median of the numbers on his string!

You did a great job (presumably) the last time he wanted to play. So he wants you to help him again while he plays with the meany mean strings.

Help Rar find the median of all the numbers!

The median of a sequence of numbers is defined as the number in the "middle" of the string.

The first line of input containes an odd integer, N, that denotes the length of the string of numbers. This is followed by N integers, the ith integer being the ith number on Rar's string.

A single number, the median of the number on the string

0 <= N <= 1000

5 1 2 3 4 5

3

7 3 6 2 7 5 4 9

7

Subtask | Score |
---|---|

1 | 100 |

2 | 0 |