https://www.acmicpc.net/problem/7568
ํ์ด
# ๋ฐฑ์ค 7568๋ฒ ๋ฌธ์ - ๋ฉ์น
n = int(input())
info = []
for i in range(n):
w, h = map(int, input().split())
info.append((w,h))
for i in info:
rank = 1
for j in info:
if i[0] < j[0] and i[1] < j[1]:
rank += 1
print(rank, end= ' ')
์์ ํ์์ ํตํด ๋ชธ๋ฌด๊ฒ์ ํค๊ฐ ํฌ๋ค๋ฉด ์์๋ฅผ ๋ํด์ค๋ค.
'๐๏ธ Algorithm > ๐ฉ ๋ฐฑ์ค' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค] [Python] 10845๋ฒ_ํ (0) | 2022.03.24 |
---|---|
[๋ฐฑ์ค] [Python] 1920๋ฒ_์ ์ฐพ๊ธฐ (0) | 2022.03.19 |
[๋ฐฑ์ค] [Python] 13305๋ฒ_์ฃผ์ ์ (0) | 2022.03.16 |
[๋ฐฑ์ค] [Python] 1789๋ฒ_์๋ค์ ํฉ (0) | 2022.03.16 |
[๋ฐฑ์ค] [Python] 1260๋ฒ_DFS์ BFS (0) | 2022.03.15 |