Skip to content

Commit 66d909b

Browse files
Merge pull request #181 from Coding-Crew-Forever/jiyoung1814/algorithm
[2025년 5월 셋째주 / jiyoung1814] 정렬
2 parents c2fec96 + 94bf382 commit 66d909b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import sys
2+
3+
n = int(sys.stdin.readline())
4+
x = list(map(int, sys.stdin.readline().strip().split()))
5+
6+
7+
x_sorted = sorted(list(set(x)))
8+
9+
coordinate = {}
10+
for i in range(len(x_sorted)):
11+
coordinate[x_sorted[i]] = i
12+
13+
for key in x:
14+
print(coordinate[key], end=' ')

0 commit comments

Comments
 (0)