| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 1154183 | ainunnajib | Po (COCI21_po) | Pypy 3 | 158 ms | 64428 KiB | 
n = int(input())
l = list(map(int, input().split()))
ans = 0
stack = []
for x in l:
    if stack[-1] < x:
        stack.append(x)
        ans += 1
    while stack[-1] >= x:
        stack.pop()
print(ans)
Compilation message (stdout)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
