1602: Many Medians
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:1
Solved:1
Description
- 2≤N≤200000
- Nis even.
- 1≤Xi≤109
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print N lines.
The i-th line should contain Bi.
Sample Input Copy
4
2 4 4 3
Sample Output Copy
4
3
3
4
HINT
- Since the median ofX2,X3,X4is4,B1=4.
- Since the median ofX1,X3,X4is3,B2=3.
- Since the median ofX1,X2,X4is3,B3=3.
- Since the median ofX1,X2,X3is4,B4=4.