Problem Statement
You are given a list of
integers
.
You wish to determine the median for each prefix of . For example given
, you want to determine:
- The median of
, then
- The median of
, then
- The median of
, then
- The median of
## Input Format
Your first line of input will contain a single integer .
Your next line will contain
integers space-separated representing
.
Output Format
You should output space-separated integers representing the median of each prefix of
.
Constraints
## Sample Cases
Input 1
10
1 2 9 7
Output 1
1 1.5 2 5.5
Explanation 1
There are 7 integers less than 14, being .
There are 4 integers less than 5, being
.
There are 6 integers less than 7, being
.
Comments