243일차 - BOJ no.7568

https://www.acmicpc.net/problem/7568

My Solution

import sys
n = int(sys.stdin.readline().rstrip())

arr = []
for _ in range(n):
    temp = list(map(int, sys.stdin.readline().rstrip().split()))
    arr.append(temp)
for i in arr:
    cnt = 1
    for j in arr:
        if i[0] < j[0] and i[1] < j[1]:
            cnt += 1
    print(cnt)

좋은 웹페이지 즐겨찾기