Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
p_list  = list(map(int,input().strip().split(" ")))

c = 1

for i in range(1, N):
    mi = min(p_list[:i+1])
    if mi == p_list[i]:
        c += 1
        
print(c)


Fixed submission:
N = int(input())
p_list  = list(map(int,input().strip().split(" ")))

ans = 1
mi = p_list[0]

for i in range(1, N):
    if mi >= p_list[i]:
        ans += 1
        mi = p_list[i]
        
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
p_list  = list(map(int,input().strip().split(" ")))

c = 1
if p_list == [p_list[0]]*N:
    print(len(p_list))

elif p_list == sorted(p_list):
    print(1)

elif p_list == sorted(p_list, reverse=True):
    print(len(p_list))

else:
    for i in range(1, N):
        p_list_min = min(p_list[:i])
        if p_list[i] <= p_list_min:
            c += 1

    print(c)


Fixed submission:
N = int(input())
p_list  = list(map(int,input().strip().split(" ")))

ans = 1
mi = p_list[0]

for i in range(1, N):
    if mi >= p_list[i]:
        ans += 1
        mi = p_list[i]
        
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
p_list  = list(map(int,input().strip().split(" ")))

c = 1
if p_list == [p_list[0]]*N:
    print(len(p_list))

elif p_list == sorted(p_list):
    print(1)

elif p_list == sorted(p_list, reverse=True):
    print(len(p_list))

else:
    for i in range(1, N):
        p_list_min = min(p_list[:i])
            if p_list[i] <= p_list_min:
                c += 1
        

print(c)


Fixed submission:
N = int(input())
p_list  = list(map(int,input().strip().split(" ")))

ans = 1
mi = p_list[0]

for i in range(1, N):
    if mi >= p_list[i]:
        ans += 1
        mi = p_list[i]
        
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
p_list  = list(map(int,input().strip().split(" ")))

c = 1

for i in range(1, N):
    p_list_min = min(p_list[:i])
    if p_list[i] <= p_list_min:
        c += 1
        
print(c)


Fixed submission:
N = int(input())
p_list  = list(map(int,input().strip().split(" ")))

ans = 1
mi = p_list[0]

for i in range(1, N):
    if mi >= p_list[i]:
        ans += 1
        mi = p_list[i]
        
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
p_list  = list(map(int,input().strip().split(" ")))

c = 1
if p_list == [p_list[0]]*N:
    print(len(p_list))

elif p_list == sorted(p_list):
    print(1)

elif p_list == sorted(p_list, reverse=True):
    print(len(p_list))

else:
    for i in range(N):
        temp = 0
        for j in range(i):
            if p_list[i] <= p_list[j]:
                temp += 1
                if temp == i:
                    c += 1
            else:
                break
    print(c)
    #print("else")

Fixed submission:
N = int(input())
p_list  = list(map(int,input().strip().split(" ")))

ans = 1
mi = p_list[0]

for i in range(1, N):
    if mi >= p_list[i]:
        ans += 1
        mi = p_list[i]
        
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
p_list  = list(map(int,input().strip().split(" ")))

c = 1
if p_list == sorted(p_list):
    print(1)
    #print("if")
elif p_list == sorted(p_list, reverse=True):
    print(len(p_list))
    #print("elif")
else:
    for i in range(N):
        temp = 0
        for j in range(i):
            if p_list[i] <= p_list[j]:
                temp += 1
                if temp == i:
                    c += 1
            else:
                break
    print(c)
    #print("else")

Fixed submission:
N = int(input())
p_list  = list(map(int,input().strip().split(" ")))

ans = 1
mi = p_list[0]

for i in range(1, N):
    if mi >= p_list[i]:
        ans += 1
        mi = p_list[i]
        
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
p_list  = list(map(int,input().strip().split(" ")))

c = 1

for i in range(N):
    temp = 0
    for j in range(i):
        if p_list[i] <= p_list[j]:
            temp += 1
            if temp == i:
                c += 1
        else:
            break
print(c)


Fixed submission:
N = int(input())
p_list  = list(map(int,input().strip().split(" ")))

ans = 1
mi = p_list[0]

for i in range(1, N):
    if mi >= p_list[i]:
        ans += 1
        mi = p_list[i]
        
print(ans)