#P1168. 中位数
中位数
Description
Given a non-negative integer sequence of length , find the median for each odd prefix.
Input Format
The first line contains a positive integer . The second line contains non-negative integers .
Output Format
There are lines. The -th line is the median of .
7
1 3 5 7 9 11 6
1
3
5
6
7
3 1 5 9 8 7 6
3
3
5
6
Hint
For 20% of the testdata, . For 40% of the testdata, . For 100% of the testdata, , .
Translated by ChatGPT 5
京公网安备 11011102002149号