#P8841. [传智杯 #4 初赛] 竞争得分

[传智杯 #4 初赛] 竞争得分

Problem 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 nn people submitted their assignments. Let the person with the lowest raw score be amina_{\min}, and the person with the highest raw score be amaxa_{\max}. The raw score of person ii is aia_i, then the score of person ii is:

100×aiaminamaxamin100 \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 nn representing the number of people. (1n10001 \leq n \leq 1000)

The second line contains nn integers forming the sequence aa, where aia_i is the raw assignment score of the ii-th person. (1ai10001 \leq a_i \leq 1000)

Output Format

One line containing nn integers, representing each person’s score after the update.

3
1 2 3
0 50 100

Hint

Translated by ChatGPT 5