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



Sample input:
5
4 2 5 1 3


Sample output:
3

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

mini = 100000
cnt = 0
for i in range(n):
    if p[i] < mini:
        cnt+=1
        mini = p[i]

print(cnt)

Submission status: Wrong Answer

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

ans = 0

flg = True

for i in range(n):
    for j in range(i):
        if p[i] <= p[j]:
            pass
        else:
            flg = False
            break
    if flg:
        ans += 1

print(ans)

Submission status: Wrong Answer

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

ans = 0
cnt = 1

flg = True

for i in range(n):
    for j in range(i):
        if p[i] <= p[j]:
            flg = True
        else:
            flg = False
    if flg:
        ans += 1

print(ans)

Submission status: Wrong Answer

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

ans = 1
for i in range(1, N):
    flg = True
    for j in range(i):
        print(P[i], P[j])
        if P[j] < P[i]:
            flg = False
            break
    if flg:
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:

n=int(input())
num=list(map(int,input().split()))
don=[]
cnt=1
#max_n=max(num)
#min_n=min(num)
for i in range(1,n):
    min_n=min(num[:i])
    if i > min_n:
        flg=False
        cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
n=int(input())
num=list(map(int,input().split()))
don=[]
cnt=0
for i in num:
    flg=True
    for j in don:
        if i > j:
            flg=False
    if flg:
        cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
N=int(input())
P=list(map(int,input().split()))
x=0
for i in range(N):
    B=0
    a=P[i]
    for j in range(i+1):
        b=P[j]
        if a>b:
            break
        else:
            B+=1
    if i+1==B:
        x+=1
    print(a,b,B)
print(x)

Submission status: Wrong Answer

Solution code:
n = input()
a = [int(i) for i in input().split()]
ans = 0

for i in range(len(a)):
  if i == 0:
    ans += 1
  elif a[i-1] >= a[i]:
    ans += 1

print(str(ans))

Submission status: Wrong Answer

Solution code:
import sys
n = int(sys.stdin.readline())
pns = list(map(int, sys.stdin.readline().split(' ')))
c = 0	
i = 0
while i < n:
    j = pns[i]
    if (j <= pns[j-1]):
    	c += 1
    i += 1
print(c)

Submission status: Wrong Answer

Solution code:
N = int(input())
P = input().split()
p_i = [int(p) for p in P]

sum = 1
for i  in range(N):
  if len(p_i) > i+1:
    if p_i[i] > p_i[i+1]:
      sum += 1

print(sum)

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())
A = list(map(int, input().split()))
if N==1:
    print(1)
else:
    count=0
    for i in range(N-1):
        for j in range(i+1,N):
            if A[i]<=A[j]:
                count=count+1
                break
    print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())
A = list(map(int, input().split()))
if N==1:
    print(1)
else:
    count=0
    for i in range(N-1):
        for j in range(i,N):
            if A[i]<=A[j]:
                count=count+1
                break
    print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

count = 0
for i in range(n):
  if i == 0:
    count+=1
  elif p[i - 1] >= p[i]:
    count+=1
print(count)

Submission status: Wrong Answer

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

count = 0
for i in range(n):
  if i == 0:
    count+=1
  elif p[i - 1] > p[i]:
    count+=1
print(count)

Submission status: Wrong Answer

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

count = 1
num = 0
print(P)
for i in range(1,N):
    num = min(P[0:i+1])
    #print("num:%d"%(num))
    #print("P:%d"%(P[i]))
    if(P[i] == num):
        count += 1

print("%d"%(count))

Submission status: Wrong Answer

Solution code:
N=input()
arr=input().split()

min=int(arr[0])
cnt=0
for i in range(len(arr)):
    if min >= int(arr[i]):
        cnt+=1
    else:
        min = int(arr[i])

print(cnt)

Submission status: Wrong Answer

Solution code:
N=input()
arr=input().split()

min=int(arr[0])
cnt=0
for i in range(len(arr)):
    if min >= int(arr[i]):
        cnt+=1
        print(i)
    else:
        min = int(arr[i])

print(cnt)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
P = list(map(int, (input().split())))
count = 1
tmp = P[0]
for i in range (1, n):
    if P[i] <= tmp:
        count += 1
    tmp = min(P[i-1], P[i])
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
P = list(map(int, (input().split())))
count = 1
for i in range (1, n):
    tmp = min(P[i-1], P[i])
    if P[i] <= tmp:
        count += 1
print(count)

Submission status: Wrong Answer

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

count = 1
a = P[0]

for i in range(N-1):
  b = min(a,P[i])
  if b >= P[i+1]:
    
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())
P=list(map(int,input().split()))
count=0
for i in range(N):
  for j in range(i):
    if P[i]<=P[j]:
      count=count+1
      break
print(count)

Submission status: Wrong Answer

Solution code:
num_list = input()
if num_list == 0:
    print(0)
elif num_list == 1:
    print(1)

numbers = input().split(" ")
numbers = [int(num) for num in numbers]

count = 1

for num_idx in range(1, len(numbers)):
    if numbers[num_idx] < numbers[num_idx - 1]:
        count += 1

print(count)

Submission status: Wrong Answer

Solution code:
_ = input()
numbers = input().split(" ")
numbers = [int(num) for num in numbers]

count = 1

for num_idx in range(1, len(numbers)):
    if numbers[num_idx] < numbers[num_idx - 1]:
        count += 1

print(count)

Submission status: Wrong Answer

Solution code:
n = input()
list = list(map(int,input().split()))
count = 0
minimun_num = 0
for i, val in enumerate(list):
  if i == 0:
    minimun_num = list[0]
  if minimun_num >= val:
    count += 1
  elif min(list[0:i+1]) >= val:
    count += 1
    minimun_num = min(list[0:i+1])
print("%d"%(count))

Submission status: Wrong Answer

Solution code:
n = input()
list = list(map(int,input().split()))
count = 0
minimun_num = 0
for i, val in enumerate(list):
  if i == 0:
    minimun_num = min(list[0:i+1])
  if minimun_num >= val:
    count += 1
  elif min(list[0:i+1]) >= val:
    count += 1
    minimun_num = min(list[0:i+1])
print("%d"%(count))

Submission status: Wrong Answer

Solution code:
N = int(input())
num = list(map(int,input().split()))
ans = 1
min = num[0]

for i in range(N-1):
  if min > num[i]:
    ans += 1
    min = num[i]

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
num = list(map(int,input().split()))
ans = 1
min = num[0]

for i in range(1,N):
  if num[i] > min:
    ans += 1
    min = num[i]

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
num = list(map(int,input().split()))
ans = 1

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

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
p = list(map(int,input().split()))
value = p[0]
ans = 1

for i in range(1,n):
    if p[i] <= value:
        ans += 1
        value = p[i]
        print(p[i])

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
p = list(map(int,input().split()))
value = p[0]
ans = 1

for i in range(1,n):
    if p[i] < value:
        ans += 1
        value = p[i]
        print(p[i])

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split()))
cnt = 0
min_num = 2 * (10 ** 5)

for i in A:
    if min_num > i:
        min_num = i
        cnt += 1
print(cnt)

Submission status: Wrong Answer

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

cnt = 1
min_p = p[0]

if n == 1:
    print(n)
else:
    for i in range(1, n):
        if p[i] > min_p:
            min_p = p[i]
            cnt += 1
    print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
p_lst = list(map(int,input().split()))
number = 1
tmp = p_lst[0]

for i in range(1,n):
    if p_lst[i]<=tmp:
        number += 1
    tmp = p_lst[i]

print(number)

Submission status: Wrong Answer

Solution code:
n = int(input())
p_lst = list(map(int,input().split()))
number = 0
p_i = p_lst[0]

for i in range(n):
    if p_lst[i]<=p_i:
        number += 1
    p_i = p_lst[i]
print(number)

Submission status: Wrong Answer

Solution code:
n = int(input())
p_lst = list(map(int,input().split()))
number = 1

if n>1:
    for i in range(n-1):
        if p_lst[i]>p_lst[i+1]:
            number += 1

print(number)

Submission status: Wrong Answer

Solution code:
n = int(input())
p_lst = list(map(int,input().split()))
number = 1

if n>1:
    for i in range(n-1):
        if p_lst[i]>=p_lst[i+1]:
            number += 1

print(number)

Submission status: Wrong Answer

Solution code:
import sys
read=sys.stdin.buffer.read
N,*P=map(int,read().split())
max_val=0
cnt=0
for p in P:
  max_val=max(max_val,p)
  if max_val == p :
    cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
def main(length_num,num_list):
    count_num = 0
    for i in range(0,length_num):
        temp_list = num_list[0:i+1]
        if int(min(temp_list)) >= int(num_list[i]):
            count_num += 1           
    return count_num
    
if __name__ == "__main__":
    input_length_num = int(input())
    input_num2 = input()
    input_num_list = input_num2.split()
    print(main(input_length_num,input_num_list))

Submission status: Wrong Answer

Solution code:
def main(length_num,num_list):
    count_num = 0
    for i in range(0,length_num):
        temp_list = num_list[0:i+1]
        temp_list.sort()
        if int(temp_list[0]) >= int(num_list[i]):
            count_num += 1           
    return count_num
    
if __name__ == "__main__":
    input_length_num = int(input())
    input_num2 = input()
    input_num_list = input_num2.split()
    print(main(input_length_num,input_num_list))

Submission status: Wrong Answer

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

s = 0
t = 1
for i in range(0,N):
    for j in range(0,i):
        if P[j] <= P[i]:
            s = s + 1
    if s != i:
        t = t + 1
        s = 0
    else:
        s = 0
print(t)

Submission status: Wrong Answer

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

ans = 0
max_val = 0

for i in range(n):
  max_val = max(p[i], max_val)
  if max_val == p[i]:
    ans += 1
    
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
p=list(map(int,input().split()))
x=1
for i in range(1,n):
   x=x+1 if p[i]<=p[i-1] else x
print(x)

Submission status: Wrong Answer

Solution code:
n=int(input())
p=list(map(int,input().split()))
x=1
for i in range(1,n):
   x=x+1 if p[i]<p[i-1] else x
print(x)

Submission status: Wrong Answer

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

count = 0
for i in range(N):
  flag = 1
  if i == 1 and P[i] > P[i-1]:
     flag = 0
  elif i > 1 and P[i] > min(P[:i-1]):
  	  flag = 0
  if flag == 1:
    count+=1

print(count)

Submission status: Wrong Answer

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

count = 0
for i in range(N):
  flag = 1
  if i == 0:
    flag == 1
  elif i == 1:
    if P[i] > P[i-1]:
      flag = 0
  else:
    if P[i] > min(P[:i-1]):
  	  flag = 0
  if flag == 1:
    count+=1

print(count)

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

ans = 0
for i,_ in enumerate(P):
  if (i==0):
    ans = 1
  else :
    if (P[i] < P[i-1]):
      ans += 1

print(ans)

Submission status: Wrong Answer

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

ans = 0
for i,_ in enumerate(P):
  if (i==0):
    ans = 1
  else :
    if (P[i] <= P[i-1]):
      ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
num = int(input())
p = map(int, input().split())
pList = list(p)
ret = 0

min = 999
for i in range(num):
    if pList[i] <= min:
        min = pList[i]
        ret = ret + 1

print("{}".format(ret))

Submission status: Wrong Answer

Solution code:
num = int(input())
p = map(int, input().split())
pList = list(p)
ret = 0

min = 999
for i in range(num):
    if pList[i] < min:
        min = pList[i]
        ret = ret + 1

print("{}".format(ret))

Submission status: Wrong Answer

Solution code:
num = int(input())
p = map(int, input().split())
pList = list(p)
ret = 0

for i in range(num-1):
    check = True
    for j in range(i):
        if pList[i] >= pList[j]:
            check = False
            break
    if check == True:
        ret = ret + 1

print("{}".format(ret))

Submission status: Wrong Answer

Solution code:
num = int(input())
p = map(int, input().split())
pList = list(p)
ret = 0

for i in range(num-1):
    check = True
    for j in range(i):
        if pList[i] >= pList[j]:
            check = False
    if check == True:
        ret = ret + 1

print("{}".format(ret))

Submission status: Wrong Answer

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

ans = 0
for i in range(0,N):
  a = True
  for j in range(0,N):
    if P[i] <= P[j]:
      a = True
    else:
      a = False
  if a == True:
    ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
P=list(map(int,input().split()))
ans=[1]*N
flag=0
for i in range(1,N):
    for j in range(i):
        if P[i]>P[j]:
            flag=1
            break
    if flag==1:
        ans[i]=0
print(sum(ans))

Submission status: Wrong Answer

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

cnt=1
min_v=p[0]

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

print(cnt)

Submission status: Wrong Answer

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

cnt=1
min_v=p[0]

for i in range(1,n):
  if p[i]>=min_v:
    cnt+=1
  else:
    min_v=p[i]

print(cnt)

Submission status: Wrong Answer

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

cnt=1
min_v=p[0]

for i in range(1,n):
  if p[i]>min_v:
    cnt+=1
  else:
    min_v=p[i]

print(cnt)

Submission status: Wrong Answer

Solution code:
max = 0
cnt = 0
N = int(input())
P = list(map(int, input().split()))

for i in range(N):
	p = P[i]
	if max < p:
		max = p
		cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
P = map(int, input().split())
cnt = 0
for num in P:
  if N >= num:
    cnt += 1
  N = num
print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
l = list(map(int, input().split()))
       
print(min(n, max(0, min(l)-1)))

Submission status: Wrong Answer

Solution code:
N=int(input())
S=list(map(int,input().split()))
res=0

for i in range(N):
  tmp=S[0]
  for j in range(i):
    if tmp>S[j]:
      tmp=S[j]
  if tmp==S[i-1]:
    res+=1
      
print(res)

Submission status: Wrong Answer

Solution code:
from sys import stdin
def main():
    N=int(stdin.readline().strip())
    A=[int(x) for x in stdin.readline().split()]
    j=0
    ans=0
    for i in range(1,len(A)):
        if A[j]>=A[i]:
            j+=1
        else:
            break
        ans=i+1
    print(min(ans+1,N))
main()

Submission status: Wrong Answer

Solution code:
n = list(map(int, input().split()))
cont = 1
x = n[0]
for i in range(len(n)):
    if x > n[i]:
      cont+=1 
      x = n[i]
print(cont)

Submission status: Wrong Answer

Solution code:
import sys
from io import StringIO

def resolve():
    N = int(input())
    P = list(map(int, input().split()))
    m = (2 + 10^5) + 1;
    cnt = 0;
    for p in P:
        if(p <= m) :
            cnt = cnt + 1
        m = min(m, p)

    print(cnt)

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
N=int(input())
List=list(map(int,input().split()))
num=1

for i in range(N-1):
  if List[i]>=List[i+1]:
    num = num + 1
  else:
    break

print(num)

Submission status: Wrong Answer

Solution code:
N=int(input())
List=list(map(int,input().split()))
num=0

for i in range(N-1):
  if List[i]>=List[i+1]:
    num = num + 1
  else:
    break

print(num+1)

Submission status: Wrong Answer

Solution code:
N=int(input())
List=list(map(int,input().split()))
num=0

for i in range(N-1):
  if List[i]<=List[i+1]:
    num = num + 1
  else:
    break

print(num+1)

Submission status: Wrong Answer

Solution code:
N = int(input())
P = map(int, input().split())
prev = 2 * 10 ** 5 + 1
ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
List=list(map(int,input().split()))
num=0

for i in range(N-1):
  if List[i]<List[i+1]:
    num = num + 1
  else:
    break

print(num+1)

Submission status: Wrong Answer

Solution code:
N = int(input().strip())
ns = [int(x) for x in input().split(' ')]
cnt=0
mini = 200000
for i in range(len(ns)):
  if ns[i] <mini:
    cnt+=1
    mini=ns[i]
print(cnt)

Submission status: Wrong Answer

Solution code:
def resolve():
    N = int(input())
    P = list(map(int, input().split()))
    m = P[0]
    c = 0
    for i in range(N):
        if m < P[i]:
            m = P[i]
        else:
            m = P[i]
            c += 1
    print(c)
resolve()

Submission status: Wrong Answer

Solution code:
N = int(input())
list = [int(i) for i in input().split()]
a = 0

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

    a += 1
    
print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())
P = [int(i) for i in input().rstrip().split(' ')]
c = 0
m = 2*10**5
for i,p in enumerate(P):
    if m > p:
        m = p
        c += 1
print(c)

Submission status: Wrong Answer

Solution code:
N = int(input())
P = list(map(int, input().split()))
Cor = 0

PreNum = N
for NextNum in P:
    if PreNum >= NextNum:
        PreNum = NextNum
        Cor = Cor + 1
    else:
        PreNum = NextNum

print(Cor)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=list(map(int,input().split()))
c=0
for i in range(n-1):
    if l[i]>l[i+1]:
        c+=1
print(c+1)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=list(map(int,input().split()))
c=0
for i in range(n-1):
    if l[i]>=l[i+1]:
        c+=1
print(c+1)

Submission status: Wrong Answer

Solution code:
N = int(input())
List=list(map(int,input().split()))
num = 0
cur = 0
for i in range(N):
  num = num + 1
  if cur > List[i]:
    cur = List[i]
  else:
    break
print(num)

Submission status: Wrong Answer

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

cnt = 0
Flg = True
for i in range(N):
    for j in range(i+1):
        if P[j] < P[i]:
            Flg = False
            break
    if Flg:
        cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
p = list(map(int,input().split()))

p_temp = float("inf")

ans = N

for i in range(N):
	if p_temp < p[i]:
		ans -= 1
	p_temp = p[i]
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
PN=input().split()
PN=list(map(int,PN))

res=1
for i in range(N-1):
  if PN[i]>=PN[i+1]:
    res+=1
print(res)

Submission status: Wrong Answer

Solution code:
N = int(input())
P = list(input().split())

count = 0
for i in range(N):
    FRAG_old = True
    for j in range(i+1):
        FRAG_new = (P[i] <= P[j])
        FRAG_new = FRAG_old*FRAG_new
        FRAG_old = FRAG_new
        if FRAG_new:
            pass
        else:
            break
    if FRAG_new:
        count += 1
            
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
P = list(input().split())

count = 0
for i in range(N):
    FRAG_old = True
    for j in range(i+1):
        FRAG_new = (P[i] <= P[j])
        FRAG_new = FRAG_old*FRAG_new
        FRAG_old = FRAG_new
        if FRAG_new:
            pass
        
    if FRAG_new:
        count += 1
            
print(count)

Submission status: Wrong Answer

Solution code:
import numpy as np
_ = input()
p_list = np.array(list(map(int, input().split())))
p_list_1 = np.append(p_list, 0)
p_list_2 = np.insert(p_list, 0, 0)
print(((p_list_1 - p_list_2) <= 0).sum())

Submission status: Wrong Answer

Solution code:
n=int(input())
p=list(map(int,input().split()))
ans=0
mini=10e+7
for i in range(n):
  if(p[i]>mini):
    ans+=1
    mini=p[i]
print(ans)

Submission status: Wrong Answer

Solution code:
n = input()
p = list(map(int, input().split()))
ans = 0
for i in range(len(p)):
    if i == len(p) - 1:
        break
    else:
        slst = p[i+1:]
        M = max(slst)
        if M > p[i]:
            ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np

N = int(input())
n = [int(x) for x in input().split()]
n=np.array(n)

a=1
for i in range(1,N):
    if np.min(n[:i]) > n[i] : a+1   
print(a)

Submission status: Wrong Answer

Solution code:
import numpy as np

n = int(input())
p = np.array(input().split(), dtype = int)

num = 0
las = 0

for i in range(n):
    if p[las] <= p[i]:
        las = i
        num += 1

print(num)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
_ = int(input())
p = list(map(int, input().split()))
cache = 200000
ans = 0
for i in p:
  if cache > i:
    ans += 1
    cache = i
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
p = input().split()

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

Submission status: Wrong Answer

Solution code:
n = int(input())
p = input().split()

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

Submission status: Wrong Answer

Solution code:
N = int(input())
p_list = list(map(int, input().split()))

count = 0 # p_j > p_i である回数
for i in range(len(p_list)):
    flag = True
    for j in  p_list[:i+1:-1]:
        if i>j:
            flag = False
            break
    if flag:
        count = count + 1

print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
P = list(map(int, input().split()))
a=1
i=0
b = P[0]
while i+1 != N:
    if P[i] <= b:
        a+=1
        b = P[i]
    i+=1
print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())
P = list(map(int, input().split()))
a=1
i=0
b=P[0]
while i != N:
    if P[i] <= b:
        a+=1
        b=P[i]
    i+=1
print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())
P = list(map(int, input().split()))
a=1
i=0
while i != N:
    if P[i] <= P[i-1]:
        a+=1
    i+=1
print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())
P = list(map(int, input().split()))
a=0
i=1
while i != N:
    if P[i] <= P[i-1]:
        a+=1
    i+=1

print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())
P = list(map(int, input().split()))
i=0
a=0
while N != i:
    if i+1 >= P[i]:
        a+=1
    i+=1

print(a)

Submission status: Wrong Answer

Solution code:
n=int(input())
s=list(map(int,input().split()))
c=1
if len(s)==1:
    print(c)
else:
    for i in range(1,n):
        if s[i-1]>=s[i]:
            c+=1
    print(c)

Submission status: Wrong Answer

Solution code:
N=int(input())
a = [int(x) for x in input().split()]
count=1
mini=a[0]
print(a)
for i in range (1,N):
    if a[i]<mini:
        count=count+1
        mini=a[i]

print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
numbers = list(map(int,input().split()))

result = 0
for i in range(n):
    a = numbers[i]
    print(a)
    cnt =0
    for j in range(i):
        b = numbers[j]
        print(a,b)
        if b > a:
            cnt += 1
        else:
            break
    if i  == cnt:
        result += 1

print(result)

Submission status: Wrong Answer

Solution code:
N = int(input())
P = [int(i) for i in input().split()]

res = 0

while True:
    m = max(P)
    index = P.index(m)
    if index == 0:
        break
    res += index + 1
    P = P[index:]
    
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

count = 1
minnum = a_l[0]
for i in range(n-1):
    if a_l[i] >= a_l[i+1]:
        minnum = a_l[i+1]
        count += 1
    else:
        pass
 
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

count = 1
minnum = a_l[0]
for i in range(n-1):
    if a_l[i] >= a_l[i+1]:
        minnum = a_l[i]
        count += 1
    else:
        pass
 
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
l = [ int(i) for i in input().split() ]
count = 0
for i in range(1,n):
    if l[i] < min(l[:i]):
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())
P_list=list(map(int, input().split()))
print(P_list)
count=0
while P_list!=[]:
    minindex=P_list.index(min(P_list))
    P_list=P_list[0:minindex]
    count+=1
    
print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())
P_list=input().split()
count=0
while P_list!=[]:
    minindex=P_list.index(min(P_list))
    P_list=P_list[0:minindex]
    count+=1
    
print(count)

Submission status: Wrong Answer

Solution code:
#ABC152 C
N = int(input())
pList = input().split()

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

print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())
P_list=input().split()
count=0
while P_list!=[]:
    minindex=P_list.index(min(P_list))
    P_list=P_list[0:minindex]
    count+=1
    
print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())
P_list=input().split()
count=0
for i in range(len(P_list)):
    shortlist = P_list[0:i+1]
    if min(shortlist)== shortlist[i]:
        #print(shortlist)
        count+=1
print(count)

Submission status: Wrong Answer

Solution code:
n=int(input())
lista= [int(i) for i in input().split()]

len=len(lista)

ans=1

for i in range(1,len-1):
	if lista[i-1]>=lista[i]:
		ans=ans+1
		
print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = list(map(int,input().split()))
c = 1

for i in range(1,a):
  if min(b[0:i])<b[i]:
    c += 1
print(c)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = list(map(int,input().split()))
b[0:0]=[0]
c = 0
for i in range(1,a+1):
  switch = 0
  for j in range(0,i):
    if b[i] > b[j]:
      switch = 1
  if switch != 1:
    c += 1
print(c)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = list(map(int,input().split()))
b[0:0]=[0]
c = 0
for i in range(1,a+1):
  switch = 0
  for j in range(0,i):
    if b[i] > b[j]:
      switch = 1
    if switch != 1:
      c += 1
print(c)

Submission status: Wrong Answer

Solution code:
N = int(input())
P = list(map(int,input().split()))
n_min = 2 * 10 ^ 5 + 1
cnt = 0
for i in range(N):
    if P[i] < n_min:
        cnt += 1
        n_min = P[i]

print (cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
P = list(map(int,input().split()))
n_min = 2 * 10 ^ 5
cnt = 0
for i in range(N):
    if P[i] <= n_min:
        cnt += 1
        n_min = P[i]

print (cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
I = list(map(int,input().split()))
c = 0
for i in range(N):
    for j in range(I[i]):
        if I[i] <= I[j]:
            if j == I[i]-1:
                c = c + 1
            pass
        else:
            pass
print(c)

Submission status: Wrong Answer

Solution code:
N=int(input())
L=list(map(int,input().split()))
ans=0
prev=-1
for l in L:
  if l<prev:
    ans+=1
    prev=l
  else:
    continue
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
p = [int(e) for e in input().split(" ")]
low = p[0]
c = 0
for i in range(N):
    print(p[i], low)
    if(p[i] <= low):
        c += 1
        low = p[i]
print(c)

Submission status: Wrong Answer

Solution code:
N = int(input())
p = [int(e) for e in input().split(" ")]
low = p[0]
c = 0
for i in range(N):
    print(p[i], low)
    if(p[i] <= low):
        c += 1
        low = p[i]
        print(">increment")
print(c)

Submission status: Wrong Answer

Solution code:
i = int(input())
j = [int(x) for x in input().split()]

e = []
cnt = 0
for x in j:
    e.append(x)
    if max(e) <= x:
        cnt += 1
print(cnt)