PROGRAMMING:Median geometry
The median of N integers refers to the number in the middle of the sorted n integers (that is, the number less than it is equal to the number greater than it). If the number is odd, the number in the middle of the sorted n integers is the median, and it is agreed that if n is even, the average of the two numbers in the middle of the sorted n integers will be taken. Write procedures, output a given integer array of the first 1, the first 2,..., the first n median (separated by spaces).
###Input format:
The first line is the number of integers n (positive integers), and the second line is the number of integers separated by spaces.
###Output format:
The N integers in curly brackets, separated by commas, are the median of the first one, the first two,..., and the first n numbers (integers).
###Input example:
```in
six
-20 30 -10 10 40 -40
```
###Output example:
```out
{-20,5,-10,0,10,0}
```
answer:If there is no answer, please comment
###Input format:
The first line is the number of integers n (positive integers), and the second line is the number of integers separated by spaces.
###Output format:
The N integers in curly brackets, separated by commas, are the median of the first one, the first two,..., and the first n numbers (integers).
###Input example:
```in
six
-20 30 -10 10 40 -40
```
###Output example:
```out
{-20,5,-10,0,10,0}
```
answer:If there is no answer, please comment