P8830 [ChuanZhi Cup #3 Practice Contest] Judges' Scoring.
Description
Xiao A participates in a variety show. There are $n(3 \le n \le 10^6)$ judges scoring (scores are integers from 0 to 100), and each judge reveals their score in order.
For show effect, starting from the third judge, every time the $i$-th judge gives a score, immediately calculate the contestant's average score among the first $i$ judges' scores after removing one highest score and one lowest score. Take the average of the remaining $i-2$ judges' scores and keep $2$ decimal places.
Input Format
The first line contains an integer $n$, indicating the number of judges.
The second line contains $n$ integers, indicating the scores given by the judges.
Output Format
Output a total of $n-2$ lines, each line representing the corresponding answer.
Explanation/Hint
Translated by ChatGPT 5