P8841 [Chuanzhi Cup #4 Preliminary] Competitive Score
Description
To encourage everyone to write better assignments, the Group Theory Lab at Hualishu University of Science and Technology (HUST) uses a competitive scoring method.
Specifically, suppose $n$ people submitted their assignments. Let the person with the lowest raw score be $a_{\min}$, and the person with the highest raw score be $a_{\max}$. The raw score of person $i$ is $a_i$, then the score of person $i$ is:
$$100 \times \frac{a_i-a_{\min}}{a_{\max}-a_{\min}}$$
Due to issues with the grading system, the final recorded scores can only be integers, and **the decimal part is removed directly**.
Input Format
The first line contains an integer $n$ representing the number of people. ($1 \leq n \leq 1000$)
The second line contains $n$ integers forming the sequence $a$, where $a_i$ is the raw assignment score of the $i$-th person. ($1 \leq a_i \leq 1000$)
Output Format
One line containing $n$ integers, representing each person’s score after the update.
Explanation/Hint
Translated by ChatGPT 5