https://www.acmicpc.net/problem/2075
# 2023.02.09
import sys
input = sys.stdin.readline
import heapq
n = int(input())
h = []
for i in range(n):
num = list(map(int, input().split()))
for j in range(n):
if len(h)<n:
heapq.heappush(h, num[j])
else:
if h[0]<num[j]:
heapq.heappop(h)
heapq.heappush(h, num[j])
print(h[0])
'Problem Solving > BOJ' 카테고리의 다른 글
[DP] python 9251 LCS (0) | 2023.02.08 |
---|---|
[DP] python 2156 포도주 시식 (0) | 2023.02.07 |
[Binary Search] python 10815 숫자 카드 (0) | 2023.02.05 |
[Two Pointer] python 1806 부분합 (0) | 2023.02.04 |
[문자열] python 20437 문자열 게임2 (2) | 2023.02.03 |