Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int, input().split()))

cnt = 0
p_min = 100000
for i in range(n):
  pi = p[i]
  if i >= 1:
    p_min = min(p[:i])
  if pi <= p_min:
    cnt += 1
print(cnt)


Fixed submission:
n = int(input())
p = list(map(int, input().split()))

cnt = 0
p_min = p[0]
for i in range(n):
  pi = p[i]
  if pi <= p_min:
    cnt += 1
    p_min = pi
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int, input().split()))

n_list = [i for i in range(n)]

cnt = 0
for i in n_list:
  cnt_j = 0
  pi = p[i]
  j_list = [j for j in range(i+1)]
  for j in j_list:
    if pi <= p[j]:
      cnt_j += 1
    else:
      break
  if cnt_j == i+1:
    cnt += 1
print(cnt)


Fixed submission:
n = int(input())
p = list(map(int, input().split()))

cnt = 0
p_min = p[0]
for i in range(n):
  pi = p[i]
  if pi <= p_min:
    cnt += 1
    p_min = pi
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int, input().split()))

cnt = 0
for i in range(n):
  cnt_j = 0
  pi = p[i]
  for j in range(i+1):
    if pi <= p[j]:
      cnt_j += 1
    else:
      break
  if cnt_j == i+1:
    cnt += 1
print(cnt)



Fixed submission:
n = int(input())
p = list(map(int, input().split()))

cnt = 0
p_min = p[0]
for i in range(n):
  pi = p[i]
  if pi <= p_min:
    cnt += 1
    p_min = pi
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int, input().split()))

cnt = 0
for i in range(n):
  cnt_j = 0
  cnt_j = sum([1 for j in range(i+1) if p[i] <= p[j]])
  if cnt_j == i+1:
    cnt += 1
print(cnt)



Fixed submission:
n = int(input())
p = list(map(int, input().split()))

cnt = 0
p_min = p[0]
for i in range(n):
  pi = p[i]
  if pi <= p_min:
    cnt += 1
    p_min = pi
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int, input().split()))

cnt = 0
for i in range(n):
  cnt_j = 0
  for j in range(i+1):
    if p[i] <= p[j]:
      cnt_j += 1
    else:
      break
  if cnt_j == i+1:
    cnt += 1
print(cnt)

Fixed submission:
n = int(input())
p = list(map(int, input().split()))

cnt = 0
p_min = p[0]
for i in range(n):
  pi = p[i]
  if pi <= p_min:
    cnt += 1
    p_min = pi
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int, input().split()))

cnt = 0
for i in range(n):
  cnt_j = 0
  for j in range(i+1):
    if p[i] <= p[j]:
      cnt_j += 1
    else:
      continue
  if cnt_j == i+1:
    cnt += 1
print(cnt)



Fixed submission:
n = int(input())
p = list(map(int, input().split()))

cnt = 0
p_min = p[0]
for i in range(n):
  pi = p[i]
  if pi <= p_min:
    cnt += 1
    p_min = pi
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int, input().split()))

cnt = 0
for i in range(n):
  cnt_j = 0
  for j in range(i+1):
    if p[i] <= p[j]:
      cnt_j += 1
    if cnt_j == i+1:
      cnt += 1
print(cnt)



Fixed submission:
n = int(input())
p = list(map(int, input().split()))

cnt = 0
p_min = p[0]
for i in range(n):
  pi = p[i]
  if pi <= p_min:
    cnt += 1
    p_min = pi
print(cnt)