Closed Blzae97 closed 3 months ago
# https://www.acmicpc.net/problem/1377
import sys
input = sys.stdin.readline
n = int(input())
arr = []
for i in range(n):
arr.append( (int(input()), i) )
sorted_arr = sorted(arr)
print(sorted_arr)
answer = []
for i in range(n):
answer.append(sorted_arr[i][1] - arr[i][1])
print(max(answer) + 1)
시간 제한: 2초 난이도: 골드Ⅱ 백준 온라인 저지: 1377번 https://www.acmicpc.net/problem/1377