5573: P1168 中位数
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:7
Solved:0
Description
给定一个长度为 $N$ 的非负整数序列 $A$,对于前奇数项求中位数。
Input
第一行一个正整数 $N$。
第二行 $N$ 个正整数 $A_{1\dots N}$。
第二行 $N$ 个正整数 $A_{1\dots N}$。
Output
共 $\lfloor \frac{N + 1}2\rfloor$ 行,第 $i$ 行为 $A_{1\dots 2i - 1}$ 的中位数。
Sample Input Copy
7
1 3 5 7 9 11 6
Sample Output Copy
1
3
5
6
HINT
对于 $20\%$ 的数据,$N \le 100$;
对于 $40\%$ 的数据,$N \le 3000$;
对于 $100\%$ 的数据,$1 \le N ≤ 100000$,$0 \le A_i \le 10^9$。
对于 $40\%$ 的数据,$N \le 3000$;
对于 $100\%$ 的数据,$1 \le N ≤ 100000$,$0 \le A_i \le 10^9$。