제출 #1154179

#제출 시각아이디문제언어결과실행 시간메모리
1154179ainunnajibPo (COCI21_po)Pypy 3
0 / 70
186 ms64240 KiB
n = int(input())
l = list(map(int, input().split()))
cur = 0
ans = 0
stack = []
for x in l:
    while stack[-1] >= x:
        stack.pop()
        ans += 1
    stack.append(x)
print(ans)

컴파일 시 표준 출력 (stdout) 메시지

Compiling 'Main.py'...

=======
  adding: __main__.pyc (deflated 21%)

=======
#Verdict Execution timeMemoryGrader output
Fetching results...