Problem:
 Score : 300 points    Problem Statement  Given is a permutation P_1, \ldots, P_N of 1, \ldots, N .
Find the number of integers i  (1 \leq i \leq N) that satisfy the following condition:   For any integer j  (1 \leq j \leq i) , P_i \leq P_j .       Constraints   1 \leq N \leq 2 \times 10^5  P_1, \ldots, P_N is a permutation of 1, \ldots, N .  All values in input are integers.         Input  Input is given from Standard Input in the following format:  N  P_1  ...  P_N       Output  Print the number of integers i that satisfy the condition.        Sample Input 1 5
4 2 5 1 3      Sample Output 1 3  i=1 , 2 , and 4 satisfy the condition, but i=3 does not - for example, P_i > P_j holds for j = 1 . Similarly, i=5 does not satisfy the condition, either. Thus, there are three integers that satisfy the condition.       Sample Input 2 4
4 3 2 1      Sample Output 2 4  All integers i  (1 \leq i \leq N) satisfy the condition.       Sample Input 3 6
1 2 3 4 5 6      Sample Output 3 1  Only i=1 satisfies the condition.       Sample Input 4 8
5 7 4 2 6 8 1 3      Sample Output 4 4       Sample Input 5 1
1      Sample Output 5 1

Solution (Python):
n = int(input())
p = list(map(int,input().split()))

ans = 1
mi = p[0]
for i in range(1,n) :
  mi = min(mi,p[i-1])
  if mi >= p[i] :
    ans += 1

print(ans)

Solution (Python):
N = int(input())
x =list(map(int,input().split()))
Y = N+1
Z = 0
for i in range(N):
    if Y>x[i]:
        Y = x[i]
        Z +=1
print(Z)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
min = N + 1
AC = 0
for i in range(N):
  if min > A[i]:
    min = A[i]
    AC += 1
print(AC)

Solution (Python):
n = int(input())
P = list(map(int, input().split()))
ans = 0
min = n+1

for i in range(n):
  if P[i] < min:
    min = P[i]
    ans += 1
print(ans)

Solution (Python):
n = int(input())
list_p = list(map(int, input().split()))
MAX_num = 2 * pow(10,6)

min_p = MAX_num
count = 0
for num in list_p:
  if num < min_p:
    count +=1
    min_p = num

print(count)

Solution (Python):
n = int(input())
numbers = list(map(int, input().split(' ')))
counter = 0
min_value = numbers[0]
for number in numbers:
    if number <= min_value:
        counter += 1
        min_value = number

print(counter)

Solution (Python):
N = int(input())
P = list(map(int,input().split()))
cnt = 0
min_last = P[0]
for i in range(N):
  min_last = min(P[i],min_last)
  if P[i] == min_last:
    cnt+=1
print(cnt)

Solution (Python):
N=int(input())
P=[int(i) for i in input().split()]
res=1
base=P[0]
for i in range(1,N):
    if base>=P[i]:
        base=P[i]
        res+=1
print(res)

Solution (Python):
import itertools

N = int(input())
P = list(map(int, input().split()))
ans = 1
min = P[0]
for i in range(N):
    if min > P[i]:
        ans += 1
        min = P[i]

print(ans)

Solution (Python):
n=int(input())
l=list(map(int,input().split()))

m=[0]*n
a=99999999
for i in range(n):
    if l[i]<a:
        m[i]=l[i]
        a=l[i]
    else:
        m[i]=a
ans=0
for j in range(n):
    if l[j]<=m[j]:
        ans+=1

print(ans)

Solution (Python):

N=int(input())
P=list(map(int,input().split()))

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

Solution (Python):
s = [input() for _ in range(2)]
N = int(s[0])
P = s[1].split()
for i in range(N):
    P[i] = int(P[i])
P = [N+1] + P

count = 0
min_p = N+1

for i in range(N+1):
    if min_p > P[i]:
        count += 1
        min_p = P[i]
            
print(count)

Solution (Python):
N = int(input())
P = list(map(int,input().split()))

m = P[0]
ans = 1
for i in range(1,N):
    if P[i] <= m:
        ans += 1
        m = P[i]
print(ans)

Solution (Python):
N = int(input())
P = list(map(int, input().split(' ')))
cnt = 1
j = P[0]
for i in range(1, N):
    j = min(j, P[i])
    if P[i] <= j:
        cnt += 1
print(cnt)

Solution (Python):
n=int(input())

pl=list(map(int,input().split()))

mn=pl[0]
ans=0
for i in range(n):
    mn=min(pl[i],mn)
    if pl[i]<=mn:
        ans+=1
print(ans)

Solution (Python):


n = int(input())
pl = list(map(int, input().split()))

ans = 0
mi = float('inf')
for p in pl:
	if p<mi:
		ans += 1
	mi = min(mi, p)
print(ans)

Solution (Python):
N = int(input())
P = list(map(int,input().split()))
ans = 1
small = P[0]
for i in range(1,N):
  if P[i] <= small: 
    ans += 1
    small = P[i]
print(ans)

Solution (Python):
N = int(input())
p = list(map(int,input().split()))
ans = 0
mx = p[0]
for i in range(N):
    if p[i] <= mx:
        ans += 1
        mx = min(mx,p[i])
print(ans)

Solution (Python):
N = int(input())
P = list(map(int, input().split()))

max = P[0]
count = 1
for i in range(1, N):
	if max >= P[i]:
		max = P[i]
		count += 1

print(count)

Solution (Python):
n = int(input())
listn = list(map(int,input().split()))

a = 10**6
ans = 0
for i in range(n):
    if listn[i] <= a:
        a = listn[i]
        ans += 1

print(ans)

Solution (Python):
N = int(input())
P = list(map(int, input().split()))
c = 1
tmp = P[0]
for i in range(1,N):
  tmp = min(tmp,P[i-1])
  if tmp >= P[i]:
    c += 1
print(c)

Solution (Python):
def resolve():

    N=int(input())
    P=list(map(int,input().split()))
    pmin=P[0]
    cnt=0
    for i in range(N):
        if P[i]<=pmin:
            cnt+=1
            pmin=P[i]
    print(cnt)

resolve()

Solution (Python):
N = int(input())
P = list(map(int, input().split()))
left_min = P[0]
count = 0


for i in range(len(P)):

    if left_min >= P[i]:
        left_min = P[i]

    if P[i] <= left_min:
        count += 1
        

        
print(count)

Solution (Python):
N = int(input())
P = list(map(int, input().split()))
ans = 0
p = P[0]

for val in P:
  if val <= p:
    ans += 1
    p = val

print(ans)

Solution (Python):
from __future__ import print_function

import sys

import re
import array
import copy
import functools
import operator

import math
import string
import fractions
from fractions import Fraction
from fractions import gcd



import collections
import itertools
import bisect

import random
import time

import heapq
from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace
from queue import PriorityQueue as pq
from queue import Queue

from itertools import accumulate

from collections import deque
from collections import Counter

from operator import mul
from functools import reduce

input = sys.stdin.readline


def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return


def lcm(n, m):
    return int(n * m / gcd(n, m))


def coprimize(p, q):
    common = fractions.gcd(p, q)
    return (p // common, q // common)


def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom


def main():
    n = int(input().strip())
    a = list(map(int, input().strip().split()))
    cnt = 0
    temp = sys.maxsize
    for i in range(n):
        if a[i] <= temp:
            cnt += 1
            temp = a[i]
        else:
            pass
    print(cnt)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
P = list(map(int, input().split()))
ans = 0
mi = N
for i in range(N):
    mi = min(mi, P[i])
    if mi == P[i]: ans += 1

print(ans)

Solution (Python):
def get_ints():
    return map(int, input().split())

n = int(input())
ps = get_ints()
minimum = 10000000
ans = 0
for p in ps:
    if p < minimum:
        ans += 1
        minimum = p

print(ans)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
tmp = a[0]
res = 0
for i in range(n):
  if tmp >= a[i]:
    tmp = a[i]
    res += 1
print(res)

Solution (Python):


def solve():
    N = int(input())
    Ps = list(map(int, input().split()))

    mn = Ps[0]
    ans = 1  
    for i in range(1, N):
        ans += 1 if mn >= Ps[i] else 0
        mn = min(mn, Ps[i])
    print(ans)


if __name__ == "__main__":
    solve()

Solution (Python):



N = int(input())


P = list(map(int, input().split()))

count = 0
comp = 2 * (10**5)

for i in range(N):
    if comp >= P[i]:
        count += 1
        comp = P[i]

print(count)

Solution (Python):
N = int(input())
P = input().split(" ")

t = 1
list = []
for i in range(N):
    list.append(int(P[i]))
    if i == 0:
        m = int(P[0])
    elif int(P[i]) < m:
        m = int(P[i])
        t = t + 1
        
print(t)

Solution (Python):
N = int(input())
P = input().split(" ")

t = 0
m = 1000000000
for i in range(N):
    m = min([m, int(P[i])])
        
    if m == int(P[i]):
        t += 1

print(t)

Solution (Python):

def main():
    
    n = int(input())
    p_list = list(map(int, input().split()))
    
    ans = 1
    tmp = p_list[0]
    for i in range(n-1):
        if tmp >= p_list[i+1]:
            ans += 1
            tmp = p_list[i+1]
    
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
p=list(map(int,input().split()))
m=10**6
ans=0
for i in p:
  if m>i:
    m=i
    ans+=1
  
print(ans)

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

n = ni()
p = na()
m = p[0]
ans = 0
for i in range(n):
    
    if m >= p[i]:
        ans += 1
    m = min(m, p[i])
print(ans)

Solution (Python):
n = int(input())
li = [int(x) for x in input().split()]
ans = 1
m = li[0]
for i in range(1,n):
    if m>li[i]:
        m = li[i]
    if m==li[i]:
        ans += 1
print(ans)

Solution (Python):
n = int(input())
li = [int(x) for x in input().split()]
ans = 1
m = li[0]
for i in range(1,n):
    if m>li[i]:
        m = li[i]
    if m==li[i]:
        ans += 1
print(ans)

Solution (Python):

import sys

def solve(N: int, P: "List[int]"):
    M = [float('inf')]
    for p in P:
        if p < M[-1]:
            M.append(p)
        else:
            M.append(M[-1])
    return sum(m > p for m, p in zip(M, P))



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    P = [int(next(tokens)) for _ in range(N)]  
    print(solve(N, P))

if __name__ == '__main__':
    main()

Solution (Python):
ii=lambda:int(input())
miis=lambda:map(int,input().split())
lmiis=lambda:list(map(int,input().split()))

n=int(input())
p=lmiis()

ans=0
min=10**9
for i in p:
  if i<=min:
    ans+=1
    min=i

print(ans)

Solution (Python):
def main():
    N = int(input())
    P = list(map(int, input().split()))
    crnt_min = float('inf')
    res = 0
    for i, p in enumerate(P):
        if crnt_min >= p:
            res += 1
        if p < crnt_min:
            crnt_min = p
    
    print(res)
    

main()

Solution (Python):
n = int(input())
a = list(map(int,input().split()))

mymin = a[0]
count = 0

for i in range(len(a)):
  if min(mymin, a[i]) == a[i]:
    mymin = a[i]
    count += 1
    
print(count)

Solution (Python):
n = int(input())
lst = list(map(int, input().split()))
ans_lst = []
ans_lst.append(lst[0])
for p in lst[1:]:
  if ans_lst[-1]>p:
  	ans_lst.append(p)
ans = len(ans_lst)
print(ans)

Solution (Python):
n = int(input())
number = list(map(int, input().split()))
cnt = 0
min_num = number[0]
for i in range(n):
  if min_num >= number[i]:
    cnt += 1
    min_num = number[i]
  else:
    continue
print(cnt)

Solution (Python):
n = int(input())
p = list(map(int, input().split()))
k = 0
c = 0
for a in range(n):
    if p[a] <= p[k]:
        c += 1
        p[k] = p[a]

print(c)

Solution (Python):
n = int(input())
p = list(map(int, input().split()))

ans = 0
m = p[0]
for x in p:
    if x <= m:
        ans += 1
    m = min(m, x)
print(ans)

Solution (Python):







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

min = p[0]
count = 0
for i in range(n):
    if p[i] <= min:
        min = p[i]
        count += 1

print(count)

Solution (Python):
n=int(input())
p=list(map(int,input().split()))
cnt=0
min=p[0]

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

Solution (Python):
import sys
N = int(input())
P_list = map(int, input().split())

minimum = sys.maxsize
count = 0
for P in P_list:
    if P < minimum:
        count += 1
        minimum = P
print(count)

Solution (Python):

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

ans = 0
m = p[0]
for x in p:
    if x <= m:
        ans += 1
    m = min(m, x)

print(ans)

Solution (Python):
def low_elements(n, arr):
    min = arr[0]
    count = 0
    for i in range(n):
        if min >= arr[i]:
            min = arr[i]
            count += 1
    return count

if __name__ == "__main__":
    n = int(input())
    arr = list(map(int, input().split(' ')))
    print(low_elements(n, arr))

Solution (Python):
n = int(input())
p = list(map(int, input().split()))

c = 0
min_c = p[0]
for i in range(n):
  if min_c >= p[i]:
    c += 1
    min_c = p[i]
print(c)

Solution (Python):
N = int(input())
P = list(map(int, input().split()))

def main():
    count = 0
    min = P[0]
    for i in range(N):
        if P[i] <= min:
            min = P[i]
            count += 1
    print(count)

main()

Solution (Python):
N = int(input())
P = list(map(int, input().split()))

count = 0
min = P[0]

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

print(count)

Solution (Python):

N = int(input())
P = list(map(int,input().split()))
p_min = 10**9
cnt = 0
for i in range(N):
    if p_min >= P[i]:
        cnt += 1
    p_min = min(P[i],p_min)
print(cnt)

Solution (Python):
n=int(input())
l=list(map(int,input().split()))

ans=0
low=l[0]

for i in range (n):
  if l[i]<=low:
    low=l[i]
    ans+=1
    
print(ans)

Solution (Python):
n = int(input())
P = list(map(int,input().split()))
ans = 0
mi = P[0]
for i in range(n):
    if P[i] <= mi:
        mi = P[i]
        ans += 1
print(ans)

Solution (Python):
N=int(input())
L=list(map(int,input().split()))
tmp=float("inf")
ans=0
for i in range (N):
	if tmp>L[i]:
		tmp=L[i]
		ans+=1
print(ans)

Solution (Python):


def submit():
    n = int(input())
    plist = list(map(int, input().split()))
    
    curr_min = float('inf')
    ans = 0
    for p in plist:
        if p <= curr_min:
            curr_min = p
            ans += 1

    print(ans)


if __name__ == "__main__":
    submit()

Solution (Python):
import sys
input = sys.stdin.readline

N = int(input())
P = [int(x) for x in input().split()]

l = []
for x in P:
	if not l or l[-1] > x:
		l.append(x)
	else:
		l.append(l[-1])

print(len(set(l)))

Solution (Python):
import sys

N = int(input())
P = list(map(int, input().split()))

min = P[0]
count = 0

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

print(count)

Solution (Python):
n = int(input())

p = list(map(int,input().split()))

max_num = n+1
ans = 0
for i in range(n):
	if p[i] <= max_num:
		max_num = p[i]
		ans += 1

print(ans)

Solution (Python):
import numpy as np
from collections import Counter


def mode(list):
    c = Counter(list)
    freq_scores = c.most_common()
    max_count = freq_scores[0][1]
    modes = []
    for num in freq_scores:
        if num[1] == max_count:
            modes.append(num[0])
    return(modes)

n = int(input())
p_list = list(map(int, input().split()))
ans = 1
min = p_list[0]
for i in range(1, n):
  if min >= p_list[i]:
    ans += 1
    min = p_list[i]
print(ans)

Solution (Python):
n = int(input())
p_list = list(map(int, input().split()))
ans = 1
min = p_list[0]
for i in range(1, n):
    if min >= p_list[i]:
        ans += 1
        min = p_list[i]
print(ans)

Solution (Python):
from collections import deque
n = int(input())
p = list(map(int,input().split()))
p_cutted = []
p_cutted = deque(p_cutted)
min_p_cutted = p[0]
ans = 0
for i in range(n):
    p_cutted.append(p[i])
    if min_p_cutted >= p[i]:
        min_p_cutted = p[i]
        ans += 1
print(ans)

Solution (Python):
_ = input()
p = list(map(int, input().split()))
m = float("inf")
c = 0
for i in p:
  c += i < m
  m = min(m, i)
print(c)

Solution (Python):
_ = input()
p = list(map(int, input().split()))
m = float("inf")
c = 0
for i in p:
  c += i <= m
  m = min(m, i)
print(c)

Solution (Python):
_ = input()
p = list(map(int, input().split()))
m = float("inf")
c = 0
for i in p:
  c += i < m
  m = min(m, i)
print(c)

Solution (Python):
import sys
from itertools import groupby


def input():
    return sys.stdin.readline()[:-1]


def solve():
    N = int(input())
    P = list(map(int, input().split()))
    m = float('inf')
    ans = 0
    for p in P:
        if p <= m:
            ans += 1
        m = min(m, p)
    print(ans)


if __name__ == "__main__":
    solve()

Solution (Python):
n = int(input())
p = list(map(int,input().split()))

ok = n + 1
cnt = 0
for i in p:
    if i <= ok:
        cnt += 1
        ok = i
print(cnt)

Solution (Python):
n=int(input())
p=list(map(int,input().split()))
mini=2*10**5
ans=0
for i in range(n):
    if p[i]<=mini:
        ans+=1
        mini=p[i]
print(ans)

Solution (Python):
import sys

input = sys.stdin.readline


def read_values():
    return map(int, input().split())


def read_list():
    return list(read_values())


def main():
    N = int(input())
    P = read_list()
    pre = P[0]
    res = 0
    for p in P:
        if pre >= p:
            res += 1
            pre = p
    print(res)


if __name__ == "__main__":
    main()

Solution (Python):
_ = int(input())
*l, = map(int,input().split())
tmpmin = 10**6
ans=0
for i in l:
  if i < tmpmin:
    ans+=1
    tmpmin = i
print(ans)

Solution (Python):
n = int(input())
p = list(map(int, input().split()))

ans = 0
m = float('inf')
for i in range(n):
    m = min(m, p[i])
    if p[i] == m:
        ans +=1
print(ans)

Solution (Python):
n = int(input())
p = list(map(int,input().split()))
tm = p[0]
count = 1

for i in range(1,n):
  if tm > p[i]:
    count += 1
    tm = p[i]
  else:
    continue
print(count)

Solution (Python):
now_min=float("inf")
n=int(input())
p=list(map(int,input().split()))
ans=0
for pi in p:
  if pi<=now_min:
    ans+=1
    now_min=pi
print(ans)

Solution (Python):
N=int(input())
P =  [int(x) for x in input().split()]
min = P[0]
ans = 1
for p in P:
    if p < min:
        min = p
        ans += 1

print(ans)

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7

n = INT()
p = LIST()
ans = 0
arr = [inf for _ in range(n)]
arr[0] = p[0]
for i in range(1, n):
    arr[i] = min(p[i], arr[i-1])

for i in range(n):
    ans += 1 if arr[i] == p[i] else 0
    
print(ans)

Solution (Python):
import math
N = int(input())
P = list(map(int, input().split()))
count = 0
m = 1000000
for i in range(N):
  if m > P[i]:
    count+=1
    m = P[i]
print(count)

Solution (Python):
from sys import stdin

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

a=p[0]
cnt=1

for i in range(1,n):
    if p[i]<a:
        cnt+=1
        a = p[i]

print(cnt)

Solution (Python):
n = int(input())
P = list(map(int,input().split()))

num = 2*10**5+1
ans = 0
for i in range(n):
    if P[i] <= num:
        num = P[i]
        ans += 1
        
print(ans)

Solution (Python):
N=int(input())
P=list(map(int,input().split()))
ans=1
min_P=P[0]
for x in range(1,N):
    if P[x]<min_P:
        ans+=1
        min_P=P[x]
print(ans)

Solution (Python):
N=int(input())
P=list(map(int,input().split()))

ans=0
p_min=2*10**6

for i in P:
    p_min = min(p_min,i)
    if i <= p_min:
        ans += 1

print(ans)

Solution (Python):
n = int(input())
p = list(map(int,input().split()))

box = [n+1 for i in range(n)]
ans = 1
min = p[0]
for i in range(1,n):
     if min >= p[i]:
          ans += 1
          min = p[i]
print(ans)

Solution (Python):
N = int(input())
P = list(map(int,input().split()))
ans = 0
P_min = float("inf")
for i in range(N):
    if P_min >= P[i]:
        ans += 1
        P_min = P[i]
print(ans)

Solution (Python):
n = int(input())
a = [int(x) for x in input().split()]
key = n
ans = 1
for i in range(n):
  if i == 0:
    key = a[i]
    continue
  if a[i] < key:
    ans += 1
    key = a[i]
print(ans)

Solution (Python):
def solve():
    N = int(input())
    A = list(map(int, input().split()))
    m = 10 ** 9
    ans = 0
    for a in A:
        m = min(m, a)
        if m >= a:
            ans += 1
    return ans

print(solve())

Solution (Python):
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    p = list(map(int, input().split()))

    m = [p[0]] * N
    for i in range(1, N):
        m[i] = min(m[i-1], p[i])
    
    ans = 0
    for i in range(N):
        if m[i] == p[i]:
            ans += 1
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
def resolve():
    n = int(input())
    a = list(map(int,input().split()))

    mina = 2*(10**5)
    ans = 0
    for i in range(n):
        mintest = min(a[i], mina)
        if mintest >= a[i]:
            ans += 1
            mina = mintest
    print(ans)
resolve()

Solution (Python):
n=int(input())
p=list(map(int,input().split()))
res=p[0]
cnt=0
for i in p:
    if res>=i:
        cnt+=1
    res=min(res,i)
print(cnt)

Solution (Python):
def solve():
    n = int(input())
    p = list(map(int, input().split()))

    _min_p = p[0]
    count = 0
    for _p in p:
        if _min_p >= _p:
            count += 1
        _min_p = min(_min_p, _p)

    print(count)

if __name__ == "__main__":
    solve()

Solution (Python):
n = int(input())
P = list(map(int,input().split()))
ans = 0
k = P[0]
for i in range(n):
    if P[i]<=k:
        ans += 1
        k = P[i]
print(ans)

Solution (Python):
N = int(input())
p_list = list(map(int,input().split()))
m = N+1
cnt = 0
for i in range(N):
    if p_list[i] < m:
        cnt+=1
        m = p_list[i]
print(cnt)

Solution (Python):
n=int(input())
hoge=list(map(int,input().split()))
now=n
ans=0
for i in range(n):
  if(hoge[i]<=now):
    ans+=1
    now=hoge[i]
    
print(ans)

Solution (Python):
N = int(input())
P = list(map(int,input().split()))
c = 1
minN =P[0]
for x in range(1,N):
    if P[x]<= minN:
        c +=1
        minN = P[x]
print(c)

Solution (Python):
n = int(input())
p = list(map(int, input().split()))

ans = 0
min_n = 0
for i in range(len(p)):
    if i==0:
        ans += 1
        min_n = p[i]
    else:
        if p[i] <= min_n:
            ans += 1
            min_n = p[i]
        else:
            pass

print(ans)

Solution (Python):
n = int(input())
p = [int(s) for s in input().split()]
mp = 200000
ct = 0
for x in range(n):
  if p[x] <= mp:
    mp = p[x]
    ct += 1
print(ct)

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
mi=10**9
cnt=0
for i in range(n):
  if l[i]<mi:
    mi=min(mi,l[i])
    cnt+=1
print(cnt)

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
mi=10**9
mi_lst=[]
cnt=0
for i in range(n):
  if l[i]<mi:
    mi_lst.append(l[i])
    mi=min(mi,l[i])
    cnt+=1
  else:mi_lst.append(l[-1])
print(cnt)

Solution (Python):
n = int(input())
p = list(map(int, input().split()))
m = p[0]
count = 1
for i in range(1,n):

  m = min(m, p[i])
  if m == p[i]:
    count += 1
print(count)

Solution (Python):
N=int(input())
P=list(map(int,input().split()))

m=P[0]
ans=1
for p in P:
    if m > p:
        ans+=1
        m=p
print(ans)

Solution (Python):
n = int(input())
p = list(map(int, input().split()))
count = 0
minP = p[0]
for i in range(n):
  minP = p[i] if minP > p[i] else minP
  if p[i] <= minP:
    count+=1
print(count)

Solution (Python):
n=int(input())
l=list(map(int,input().split()))

x,y=0,l[0]
for i in range(n):
    y=min(y,l[i])
    if l[i]<=y:
        x+=1

print(x)

Solution (Python):
n=int(input())
l=list(map(int,input().split()))

x=0
y=[]
z=l[0]
for i in range(n):
    
    z=min(z,l[i])
    if l[i]<=z:
        x+=1
print(x)

Solution (Python):
N = int(input())
P = list(map(int, input().split()))




ans = 0
min = 2 * 10**5
for i in range(0, N):
    
    if min > P[i]:
        min = P[i]
    if P[i] <= min:
        ans += 1

print(ans)

Solution (Python):
n = int(input())
p = list(map(int,input().split()))
count = 0
t = p[0]
for i in range(n):
    if p[i] <= t:
        count += 1
        t = p[i]
print(count)

Solution (Python):
N = int(input())
P = list(map(int, input().split()))
cnt = 1
min_P = P[0]
for i in range(1, N):
        
        
        
        if min_P>=P[i]:
            cnt += 1
            min_P = P[i]

print(cnt)

Solution (Python):
n = int(input())
p = list(map(int, input().split()))

s = 1
t = p[0]
for i in range(1,n):
  if p[i] <= t:
    s += 1
    t = p[i]
print(s)

Solution (Python):
N = int(input())
P = list(map(int,input().split()))
count = 0

for i in range(N):
    if i == 0:
        count += 1
        minimum = P[i]
        continue
    if minimum >= P[i]:
            count += 1
            minimum = P[i]

print(count)

Solution (Python):
n = int(input())
p = [int(i) for i in input().split()]
count = 0
min = p[0]
for i in range(n):
  if(min > p[i]):
    min = p[i]
  if(min == p[i]):
    count +=1
    
print(count)

Solution (Python):
n = int(input())
p = list(map(int, input().split()))
min1 = p[0]
a = 1
for i in range(1, n):
    if min1>p[i]:
        a += 1
        min1 = p[i]
print(a)

Solution (Python):
N = int(input())
P = list(map(int,input().split()))
cnt = 0
min1 = P[0]
for i in range(N):
    if(min1 > P[i]):
        min1 = P[i]
    if(min1 == P[i]):
        cnt += 1
print(cnt)

Solution (Python):
n = int(input())
p = list(map(int, input().split()))

ans = 1
min = p[0]
for i in range(1, n):
    if min > p[i]:
        ans += 1
        min = p[i]

print(ans)

Solution (Python):
n=int(input())
p=list(map(int, input().split()))
ct=p[0]
ans=1
for i in range(1, n):
    if p[i] <= ct:
        ans+=1
        ct=p[i]

print(ans)

Solution (Python):
n = int(input())
p = list(map(int, input().split()))
sumN = 0
maxN = max(p)

for i in range(n):
    if p[i] <= maxN:
        sumN += 1
        maxN = p[i]
        if maxN == 1:
            break

print(sumN)

Solution (Python):
n = int(input())

p = [int(s) for s in input().split()]
flag = -1
m_ans = 1
p_z = p[0]
for i in range(1,n):
    p_z = min(p_z,p[i])
    if(p_z >= p[i]):
        
        m_ans += 1
    
print(m_ans)

Solution (Python):
N = int(input())
P = list(map(int,input().split()))
ans = 1
Pj = P[0]
for i in range(1,N):
  Pj = min(Pj,P[i])
  if P[i] <= Pj:
    ans += 1
  else:
    pass
print(ans)

Solution (Python):
import numpy as np

n = int(input())
p = np.array(list(int(x) for x in input().split()))
sum = 0
low = p[0] + 1

for i in p:
    if(i < low):
        sum += 1
        low = i

print(sum)

Solution (Python):
N = int(input())
P = list(map(int, input().split()))

current_min = float("inf")
ans = 0

for i in range(N):
    if current_min >= P[i]:
        current_min = P[i]
        ans += 1

print(ans)

Solution (Python):

import sys,os
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    XLMIIS = lambda x: [LMIIS() for _ in range(x)]
    YN = lambda c : print('Yes') if c else print('No')
    MOD = 10**9+7

    N = II()
    P = LMIIS()
    count = 0
    min_p = P[0]
    for p in P:
        if p <= min_p:
            count += 1
            min_p = p
    print(count)


    

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
m = [0]*N
s = input()
m = s.split()
c = 99999999
k = 0
for i in range(N):
	m[i] = int(m[i])
	if m[i] <= c:
		c = m[i]
		k +=1

print(k)

Solution (Python):
n = int(input())
perputation = list(map(int, input().split()))
cnt = 1
last_min = perputation[0]

if n == 1:
    print("1")
else:
    for i in range(1, n):
        if last_min >= perputation[i]:
            cnt += 1
            last_min = perputation[i]
    print(cnt)

Solution (Python):
def low_element(p):
    min = 2*10**5+1
    c = 0
    for p_i in p:
        if p_i <= min:
            min = p_i
            c += 1
    return c

n = input()
p = [int(i) for i in input().split()]

print(low_element(p))

Solution (Python):
N = int(input())
lis = list(map(int, input().split()))
c = 1
j_min = lis[0]
if N == 1:
  print(c)
else:
  for i in range(1,N):
    if j_min > lis[i]:
        c += 1
        j_min = lis[i]
  print(c)

Solution (Python):
n=int(input())
p=list(map(int,input().split()))
cnt=1
min=p[0]
for i in range(1,n):
    if p[i]<=min:
        cnt+=1
        min=p[i]
print(cnt)

Solution (Python):
n = int(input())
p = list(map(int, input().split()))

mn = p[0]
ans = 0
for e in p:
    mn = min(mn, e)
    if e <= mn:
        ans += 1

print(ans)

Solution (Python):
import bisect
N = int(input())
P = list(map(int, input().split()))

count = 0
last_min = P[0]
for i in range(N):
    last_min = min(last_min, P[i])
    if i == 0:
        count += 1
    elif last_min == P[i]:
        count += 1
print(count)

Solution (Python):
N = int(input())
ps = [int(i) for i in input().split()]

cnt = 1
mark = ps[0]
for p in ps[1:]:
    if mark >= p:
        cnt += 1
        mark = p

print(cnt)

Solution (Python):
N = int(input())
ps = [int(i) for i in input().split()]

cnt = 0
mark = ps[0]
for p in ps:
    if mark >= p:
        cnt += 1
        mark = min(mark, p)

print(cnt)

Solution (Python):

"""
Created on Wed Mar  4 17:57:43 2020

@author: Kanaru Sato
"""

N = int(input())
P = list(map(int, input().split()))

Min = P[0]
count = 1

for i in range(1,N):
    if Min >= P[i]:
        count += 1
        Min = P[i]

print(count)

Solution (Python):
n = int(input())
P = list(map(int, input().split()))

sum = 0
min = n
for i in range(n):
  if min >= P[i]:
    min = P[i]
    sum += 1
    
print(sum)

Solution (Python):
n=int(input())
p=list(map(int,input().split()))
m=n+1
ans=0
for i in range(n):
    if p[i]<m:
        ans+=1
        m=p[i]
    else:
        pass
print(ans)

Solution (Python):
n=int(input())
p=list(map(int,input().split()))
cnt=0
min_x=10**18
for i in range(n):
  if p[i]<=min_x:
    min_x=p[i]
    cnt+=1
print(cnt)

Solution (Python):
N = int(input())
P = list(map(int, input().split()))

current_min = float("inf")
ans = 0
for n in P:
    if n <= current_min:
        current_min = n
        ans += 1
print(ans)

Solution (Python):
n = int(input())
list_score = list(map(int, input().split()))
min_value = list_score[0]
ans = 0

for i in range(0, n):
    min_value = min(min_value, list_score[i])
    if list_score[i] == min_value:
        ans += 1
print(ans)

Solution (Python):
N=int(input())
P=list(map(int,input().split()))
count=1
min=P[0]
for i in range(1,N):
    if min>=P[i]:
        count+=1
        min=P[i]
print(count)

Solution (Python):
FIRST_MIN_VALUE = 20000000

N = int(input())
P = list(map(lambda x: int(x), input().split()))

"""
初期戦略
for で一個ずつ回していくのはきつい気がする。
N <= 2*10**5だし、
まあ一回やってみるか
MIN_VALUEを更新して行ってカウントアップしていく
"""

min_val = FIRST_MIN_VALUE
count = 0
for p in P:
  if p <= min_val:
    min_val = p
    count += 1

print(count)