Type: Default 1000ms 256MiB

离散化基础

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

在使用离散化方法编程时,通常要知道每个数排序后的编号(rank值)。相同的数对应一个编号。

rank[i]表示第i个数在所有数里的排名。

Input Format

第1行:一个整数N,范围在[1…100000]。 第2行:有N个整数,每个数都是int范围的。注意:可能有相同整数。

Output Format

依次输出每个数的排名。

Sample

input

5
8 2 6 9 2

output

3 1 2 4 1

Hint

保证1<=N<=100000 每个数不超过1000000

时间限制:1s1 \text {s}

空间限制:256MB256 \text {MB}

20200817排序基本练习

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
9
Start at
2020-8-17 9:36
End at
2020-8-20 9:36
Duration
72 hour(s)
Host
Partic.
26