#P1041. 【模板】离散化

【模板】离散化

Description

给定一个大小为 $n$ 的序列,输出离散化之后的序列。

Input Format

第一行一个整数 $n$ 表示序列大小。

第二行 $n$ 个整数表示 $a_i$。

Output Format

一行 $n$ 个整数表示离散化之后的结果。
5
100 10 23 9999 2
4 2 3 5 1

Hint

$1≤n≤10^6,1≤a_i≤10^9$

Source

模板