CF551A GukiZ and Contest
题目描述
GukiZ 喜欢 OI,也喜欢出毒瘤题。他喜欢根据比赛的成绩为选手计算 rating。他现在正在准备一套新的毒瘤题。
一共有 $n$ 名选手被骗来做他的毒瘤题,每一位选手有一个正的 rating。选手们的编号为 $1$ 到 $n$。第 $i$ 名选手的 rating 是 $a_{i}$。比赛还没有开始,GukiZ 开始预测比赛结果。
GukiZ 认为,每名选手的排名应该是 $1 + G$,其中 $G$ 表示 rating 严格比这名选手大的选手数量。也就是说,如果选手 A 的 rating 严格比选手 B 高,他的排名就一定在 B 之上;如果两名选手 rating 相同,那么他们就一定会并列。
然而这件事情几乎不可能发生,但 GukiZ 依然想知道根据他的想法,每名选手的排名。
输入格式
输入的第一行包含一个整数 $n$,表示这场比赛的选手数量。
输入的第二行包含 $n$ 个整数 $a_i$ ($1\le a_i\le 2000$),第 $i$ 个整数表示第 $i$ 名选手的 rating。
输出格式
输出一行 $n$ 个整数,表示他们的理论排名。
样例解释 1
$2$ 号选手和 $3$ 号选手是第一名(因为没有选手 rating 比他们高),$1$ 号选手第三名(因为两名选手 rating 比他高)。
说明/提示
In the first sample, students $ 2 $ and $ 3 $ are positioned first (there is no other student with higher rating), and student $ 1 $ is positioned third since there are two students with higher rating.
In the second sample, first student is the only one on the contest.
In the third sample, students $ 2 $ and $ 5 $ share the first position with highest rating, student $ 4 $ is next with third position, and students $ 1 $ and $ 3 $ are the last sharing fourth position.