atcoder#ARC095A. [ABC094C] Many Medians
[ABC094C] Many Medians
Score : points
Problem Statement
When is an odd number, the median of numbers is the -th largest value among .
You are given numbers , where is an even number. For each , let the median of excluding , that is, the median of be .
Find for each .
Constraints
- is even.
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
...
Output
Print lines. The -th line should contain .
4
2 4 4 3
4
3
3
4
- Since the median of is , .
- Since the median of is , .
- Since the median of is , .
- Since the median of is , .
2
1 2
2
1
6
5 5 4 4 3 3
4
4
4
4
4
4