# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1154178 | ainunnajib | Po (COCI21_po) | Pypy 3 | 156 ms | 64248 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
print(ans)
컴파일 시 표준 출력 (stdout) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |