#K35127. Participant Ranking
Participant Ranking
Participant Ranking
You are given ( N ) participants along with their scores. Your task is to assign a rank to each participant using the standard competition ranking method: participants with the same score receive the same rank, and the next distinct score receives a rank that counts all participants above it. The ranking is determined by sorting the scores in descending order. For example, if the scores are [50, 70, 70, 60, 55], then the corresponding ranks are [5, 1, 1, 3, 4].
inputFormat
The input consists of two lines. The first line contains an integer ( N ), the number of participants. The second line contains ( N ) space-separated integers representing the scores of the participants.
outputFormat
Output a single line containing ( N ) space-separated integers representing the rank for each participant in the order they were given.## sample
5
50 70 70 60 55
5 1 1 3 4
</p>