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