Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = list(map(int, input().split()))
ans = N
 
for i in range(N):
  for j in range(i):
    if P[i] > P[j]:
      ans -= 1
      break
    
print(ans)

Fixed submission:
N = int(input())
P = list(map(int, input().split()))
ans = 0
min_number = 2*10**5+1

for i in range(N):
  min_number = min(min_number, P[i])
  if min_number == P[i]:
    ans += 1
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N = int(input())
P = list(map(int, input().split()))
ans = 0

for i in range(N):
  if np.min(list(P[0:i+1])) == P[i]:
    ans += 1
    
print(ans)

Fixed submission:
N = int(input())
P = list(map(int, input().split()))
ans = 0
min_number = 2*10**5+1

for i in range(N):
  min_number = min(min_number, P[i])
  if min_number == P[i]:
    ans += 1
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = list(map(int, input().split()))
ans = 0

for i in range(N):
  if sorted(list(P[0:i+1]))[0] == P[i]:
    ans += 1
    
print(ans)

Fixed submission:
N = int(input())
P = list(map(int, input().split()))
ans = 0
min_number = 2*10**5+1

for i in range(N):
  min_number = min(min_number, P[i])
  if min_number == P[i]:
    ans += 1
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = list(map(int, input().split()))
ans = 0

for i in range(N):
  if min(list(P[0:i+1])) == P[i]:
    ans += 1
    
print(ans)

Fixed submission:
N = int(input())
P = list(map(int, input().split()))
ans = 0
min_number = 2*10**5+1

for i in range(N):
  min_number = min(min_number, P[i])
  if min_number == P[i]:
    ans += 1
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = list(map(int, input().split()))
ans = N
 
for i in range(N):
  for j in range(i):
    if P[i] > P[j]:
      ans -= 1
      break
    
print(ans)

Fixed submission:
N = int(input())
P = list(map(int, input().split()))
ans = 0
min_number = 2*10**5+1

for i in range(N):
  min_number = min(min_number, P[i])
  if min_number == P[i]:
    ans += 1
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = list(map(int, input().split()))
ans = 0

for i in range(N):
  tmp = P[0:i+1]
  if P[i] == min(tmp):
    ans += 1

print(ans)

Fixed submission:
N = int(input())
P = list(map(int, input().split()))
ans = 0
min_number = 2*10**5+1

for i in range(N):
  min_number = min(min_number, P[i])
  if min_number == P[i]:
    ans += 1
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N = int(input())
P = np.array(list(map(int, input().split())))
ans = 0

for i in range(N):
  l = np.array([P[i]] * N)
  tmp = list(P - l)[0:i+1]
  if min(tmp) >= 0:
    ans += 1

print(ans)

Fixed submission:
N = int(input())
P = list(map(int, input().split()))
ans = 0
min_number = 2*10**5+1

for i in range(N):
  min_number = min(min_number, P[i])
  if min_number == P[i]:
    ans += 1
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = list(map(int, input().split()))
ans = 0

for i in range(N):
  flag = 1
  for j in range(i):
    if P[i] > P[j]:
      flag = 0
      break
  if flag == 1:
    ans += 1
    
print(ans)

Fixed submission:
N = int(input())
P = list(map(int, input().split()))
ans = 0
min_number = 2*10**5+1

for i in range(N):
  min_number = min(min_number, P[i])
  if min_number == P[i]:
    ans += 1
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = list(map(int, input().split()))
ans = 0


for i in range(N):
  flag = 1
  for j in range(i):
    if P[i] > P[j]:
      flag = 0
  if flag == 1:
    ans += 1
    
print(ans)

Fixed submission:
N = int(input())
P = list(map(int, input().split()))
ans = 0
min_number = 2*10**5+1

for i in range(N):
  min_number = min(min_number, P[i])
  if min_number == P[i]:
    ans += 1
  
print(ans)