五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

CF 551A - GukiZ and Contest

2023-08-22 16:43 作者:您是打尖兒還是住店呢  | 我要投稿

Professor GukiZ likes programming contests. He especially likes to rate his students on the contests he prepares. Now, he has decided to prepare a new contest.


In total, n students will attend, and before the start, every one of them has some positive integer rating. Students are indexed from 1 to n. Let's denote the rating of i-th student as ai. After the contest ends, every student will end up with some positive integer position. GukiZ expects that his students will take places according to their ratings.


He thinks that each student will take place equal to . In particular, if student A has rating strictly lower then student B, A will get the strictly better position than B, and if two students have equal ratings, they will share the same position.


GukiZ would like you to reconstruct the results by following his expectations. Help him and determine the position after the end of the contest for each of his students if everything goes as expected.


Input

The first line contains integer n (1?≤?n?≤?2000), number of GukiZ's students.


The second line contains n numbers a1,?a2,?... an (1?≤?ai?≤?2000) where ai is the rating of i-th student (1?≤?i?≤?n).


Output

In a single line, print the position after the end of the contest for each of n students in the same order as they appear in the input

----------------------------

GukiZ 教授喜歡編程競賽。 他特別喜歡在他準備的比賽中對學(xué)生進行評分。?

現(xiàn)在,他決定準備一場新的比賽。 總共有n名學(xué)生參加,在開始之前,每個人都有一些正整數(shù)評分。 學(xué)生的索引從 1 到 n。 我們將第 i 個學(xué)生的評分表示為 ai。?

比賽結(jié)束后,每個學(xué)生最終都會獲得某個正整數(shù)的位置。 GukiZ 預(yù)計他的學(xué)生將根據(jù)他們的評分獲得名次。 他認為每個學(xué)生都會取得平等的成績。 特別是,如果學(xué)生 A 的評分嚴格低于學(xué)生 B,則 A 將獲得比 B 嚴格更好的位置,如果兩個學(xué)生的評分相同,他們將共享相同的位置。

GukiZ 希望你按照他的期望來重建結(jié)果。 如果一切按預(yù)期進行,請幫助他在比賽結(jié)束后為他的每個學(xué)生確定位置。

輸入

第一行包含整數(shù)n(1?≤?n?≤?2000),GukiZ的學(xué)生人數(shù)。 第二行包含 n 個數(shù)字 a1,?a2,?... an (1?≤?ai?≤?2000),其中 ai 是第 i 個學(xué)生的評分 (1?≤?i?≤?n)。

輸出

在一行中,按照輸入中出現(xiàn)的順序打印 n 個學(xué)生中每人比賽結(jié)束后的位置

input

3
1 3 3

output

3 1 1

input

5
3 5 3 4 5

output

4 1 4 3 1

利用二維數(shù)據(jù)排序處理,加2個變量每次去存儲數(shù)據(jù)即可,下面是代碼:


CF 551A - GukiZ and Contest的評論 (共 條)

分享到微博請遵守國家法律
郑州市| 绥江县| 五台县| 玛曲县| 基隆市| 平陆县| 西丰县| 诸城市| 宾川县| 且末县| 寻甸| 西宁市| 紫云| 日照市| 鹿泉市| 五台县| 于都县| 阜城县| 康保县| 车险| 恭城| 元谋县| 凭祥市| 翁牛特旗| 芜湖县| 托克逊县| 易门县| 石门县| 莎车县| 苍梧县| 海晏县| 广宁县| 深水埗区| 南部县| 武宣县| 桂平市| 会宁县| 恩施市| 永胜县| 江都市| 应城市|