Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
Ps = list(map(int, input().split()))
count = 0
low = -1

for i in range(N):
    low = Ps[i]

    for j in range(i):
        if (low > Ps[j]):
            break
        if (low > Ps[i-1-j]):
            break
        if (low > Ps[i-1//2-j]):
            break
        if (j == i-1):
            count += 1

print(count+1)

Fixed submission:
N = int(input())
Ps = list(map(int, input().split()))
count = 0
min = Ps[0]+1

for i in range(N):
    if (Ps[i] < min):
        min = Ps[i]
        count += 1

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
Ps = list(map(int, input().split()))
count = 0
low = -1

for i in range(N):
    low = Ps[i]

    for j in range(i):
        if (low > Ps[j]):
            break
        if (low > Ps[i-1-j]):
            break
        if (j == i-1):
            count += 1

print(count+1)

Fixed submission:
N = int(input())
Ps = list(map(int, input().split()))
count = 0
min = Ps[0]+1

for i in range(N):
    if (Ps[i] < min):
        min = Ps[i]
        count += 1

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N = int(input())
Ps = list(map(int, input().split()))
Ps = np.array(Ps)
count = 0

for i in range(N):
    low = Ps[i]
    tmp = Ps[:i] - low

    if (np.count_nonzero(Ps[:i] >= low) == i):
        count += 1

print(count)

Fixed submission:
N = int(input())
Ps = list(map(int, input().split()))
count = 0
min = Ps[0]+1

for i in range(N):
    if (Ps[i] < min):
        min = Ps[i]
        count += 1

print(count)

Buggy python submission (verdict: Runtime Error):
import numpy as np

N = int(input())
Ps = list(map(int, input().split()))
Ps = np.array(Ps)
count = 0

for i in range(N):
    low = Ps[i]
    if ( np.sum(Ps[:i] < low) == 0):
        count += 1

print(count)

Fixed submission:
N = int(input())
Ps = list(map(int, input().split()))
count = 0
min = Ps[0]+1

for i in range(N):
    if (Ps[i] < min):
        min = Ps[i]
        count += 1

print(count)

Buggy python submission (verdict: Runtime Error):
import numpy as np
from numba import double
from numba.decorators import jit

N = int(input())
Ps = list(map(int, input().split()))
Ps = np.array(Ps)
count = 0

@jit
for i in range(N):
    low = Ps[i]
    if ( np.sum(Ps[:i] < low) == 0):
        count += 1

print(count)

Fixed submission:
N = int(input())
Ps = list(map(int, input().split()))
count = 0
min = Ps[0]+1

for i in range(N):
    if (Ps[i] < min):
        min = Ps[i]
        count += 1

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N = int(input())
Ps = list(map(int, input().split()))
Ps = np.array(Ps)
count = 0
low = -1

for i in range(N):
    low = Ps[i]

    if ( np.any(Ps[:i] < low) ):
        continue
    else :
        count += 1

print(count)

Fixed submission:
N = int(input())
Ps = list(map(int, input().split()))
count = 0
min = Ps[0]+1

for i in range(N):
    if (Ps[i] < min):
        min = Ps[i]
        count += 1

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
Ps = list(map(int, input().split()))
count = 0
low = -1

for i in range(N):
    low = Ps[i]

    if ( sum(x < low for x in Ps[:i]) == 0):
        count += 1

print(count)

Fixed submission:
N = int(input())
Ps = list(map(int, input().split()))
count = 0
min = Ps[0]+1

for i in range(N):
    if (Ps[i] < min):
        min = Ps[i]
        count += 1

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
Ps = list(map(int, input().split()))
count = 0
low = -1

for i in range(N):
    low = Ps[i]

    for j in range(i):
        if (low > Ps[j]):
            break
        if (j == i-1):
            count += 1

print(count+1)

Fixed submission:
N = int(input())
Ps = list(map(int, input().split()))
count = 0
min = Ps[0]+1

for i in range(N):
    if (Ps[i] < min):
        min = Ps[i]
        count += 1

print(count)