#C7458. Final Grade Calculation

    ID: 51331 Type: Default 1000ms 256MiB

Final Grade Calculation

Final Grade Calculation

You are given a list of student grades. For each student, the final grade is computed as the average of all grades that are greater than or equal to the student's original grade. The result should be rounded to two decimal places.

Mathematically, for a student with grade \( g \), let \( S_g \) be the set of grades such that \( S_g = \{ x \,|\, x \geq g \} \). The final grade is computed as:

\( \text{final grade} = \frac{\sum_{x \in S_g} x}{|S_g|} \),

where \(|S_g|\) is the number of elements in \(S_g\).

For example, if there are 4 students with grades 70, 90, 80, and 60, then the final grades are: [80.00, 90.00, 85.00, 75.00].

inputFormat

The input is provided via standard input (stdin) in the following format:

n
grade1 grade2 ... graden

Here, n is an integer denoting the number of students, followed by n integers representing the grades of the students, separated by spaces.

outputFormat

Output the final grades for each student on a single line via standard output (stdout). Each grade should be a floating point number rounded to two decimal places and separated by a single space.

## sample
4
70 90 80 60
80.00 90.00 85.00 75.00