반응형
import sys
input = sys.stdin.readline
n = int(input())
li = []
for i in range(n):
li.append([int(input()), i])
sorted_li = sorted(li)
ans = 0
for i in range(n):
ans = max(ans, sorted_li[i][1] - li[i][1])
print(ans + 1)
정렬