Problem:


Score : 200 points

Problem Statement

There are N mountains ranging from east to west, and an ocean to the west.

At the top of each mountain, there is an inn. You have decided to choose where to stay from these inns.

The height of the i-th mountain from the west is H_i.

You can certainly see the ocean from the inn at the top of the westmost mountain.

For the inn at the top of the i-th mountain from the west (i = 2, 3, ..., N), you can see the ocean if and only if H_1 \leq H_i, H_2 \leq H_i, ..., and H_{i-1} \leq H_i.

From how many of these N inns can you see the ocean?

Constraints

All values in input are integers.

1 \leq N \leq 20

1 \leq H_i \leq 100

Input

Input is given from Standard Input in the following format:

N
H_1 H_2 ... H_N

Output

Print the number of inns from which you can see the ocean.

Sample Input 1

4
6 5 6 8

Sample Output 1

3

You can see the ocean from the first, third and fourth inns from the west.

Sample Input 2

5
4 5 3 5 4

Sample Output 2

3

Sample Input 3

5
9 5 6 8 4

Sample Output 3

1



Sample input:
4
6 5 6 8


Sample output:
3

Submission status: Wrong Answer

Solution code:
N = int(input())
N_List = list(map(int,input().split()))
ans = 1
maxN = N_List[0]
for i in range(1,N):
    if N_List[i]>=maxN:
        ans += 1
    else:
        maxN = N_List[i]
print(ans)

Submission status: Wrong Answer

Solution code:
import math


def main():
    n = int(input())
    # a, b = map(int, input().split())
    h = list(map(int, input().split()))
    # s = input()
    # h = [int(input()) for _ in rane(n)]

    count = 1
    maxi = h[0]
    for i in range(1, n):
        if h[i] > h[i-1] and h[i] >= maxi:
            count += 1
            maxi = h[i]
    print(count)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n=int(input())
h=list(map(int,input().split()))
kei = 1
m=0
for i in range(1,n):
    m = h[0]
    if m < h[i]:
        m = h[i]
    else:
        kei += 1

print(kei)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8

num = int(input())
str = input().split()
table = [int(i) for i in str]
count = 1
pointed = table[0]
for i in range(1, num):
    if table[0] <= table[i] and table[i-1] <= table[i] :
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

num = int(input())
str = input().split()
table = [int(i) for i in str]
count = 0
pointed = table[0]
for i in range(1, num):
    if table[0] <= table[i]:
        count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int, input().split()))
ans = 1
for i in range(1, N):
	if H[i - 1] <= H[i]:
		ans += 1
print(ans)

Submission status: Wrong Answer

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

cnt=0
highest=H[0]

for i in range(1,N):
  if highest<=H[i]:
    cnt+=1
    highest=H[i]

print(cnt)

Submission status: Wrong Answer

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

if N==1:
  print('1')
  
if N>=2:
  cnt=1
  for i in range(1,N):
    if H[0]<=H[i] and H[1]<=H[i] and H[i]<=H[i]:
      cnt+=1
  print(cnt)

Submission status: Wrong Answer

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

if N==1:
  print('1')
  
if N>=2:
  cnt=0
  for i in range(N):
    if H[0]<=H[i] and H[1]<=H[i] and H[i]<=H[i]:
      cnt+=1
  print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int, input().split()))
h1 = h[0]
val = 0
count = 1
for i in h[1:]:
    if i >= val and i >= h1:
        count += 1
        val = i
    else:
        val = i
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int, input().split()))
h1 = h[0]
val = 0
count = 1
for i in h[1:]:
    if i > val and i >= h1:
        count += 1
        val = i
    else:
        val = i
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 1
max_ = data[0]
for i in range(1, n-1):
    if max_ <= data[i]:
        max_ = data[i]
        ans += 1

print(ans)

Submission status: Wrong Answer

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

print( len(list(set(data))) )

Submission status: Wrong Answer

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

ans = 1
for i in range(n-1):
    if data[i] <= data[i+1] and data[0] <= data[i+1]:
        ans += 1

print(ans)

Submission status: Wrong Answer

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

ans = 1
for i in range(n-1):
    if data[i] <= data[i+1]:
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int,input().split()))
cnt = 1
for i in range(1,N):
  if H[i] >= H[i-1]:
    cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int,input().split()))
maximum = H[0]
ans = 1
for i in range(N-1):
  if H[i+1] > H[i]:
    if H[i+1] >=maximum:
      ans += 1
  if maximum < H[i+1]:
    maximum = H[i+1]
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
List = list(map(int, input().split()))
res = 0
thre = List[0]
for i in range(N):
  if thre <= List[i]:
    res += 1
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0
min_h = 0

for i in range(N):
  if H[i] > min_h:
    min_h = H[i]
    ans += 1
    
print(ans)

Submission status: Wrong Answer

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

ans = 1

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

Submission status: Wrong Answer

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

ans = 1

for i in range(N-1):
  if H[i] < H[i+1]:
    ans += 1
    break

print(ans)

Submission status: Wrong Answer

Solution code:
from collections import deque

n = int(input())
H = deque(map(int, input().split()))

ans = 0

h = 0

for i in range(n):
    h2 = H.popleft()
    if h2 > h:
        ans += 1
    h = h2

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for x in range(1,n):
  if kijun <= hlist[x]:
    if hlist[x] >= hlist[x-1] and max(hlist) >= hlist[x]:
    	ans += 1
    
print(ans)

Submission status: Wrong Answer

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

for x in range(1,n):
  if kijun <= hlist[x] and hlist[x]>=max(hlist):
    ans += 1
    
print(ans)

Submission status: Wrong Answer

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

for x in range(1,n):
  if kijun <= hlist[x] and hlist[x] >= hlist[x-1]:
    ans += 1
    
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

count = 0
mount = 1

for i in range(N):
    for j in range(i):
        if l[j]<=l[i]:
            count +=1
            if count == i:
                mount += 1
                count = 0

print(mount)

Submission status: Wrong Answer

Solution code:
import numpy as np
import math
import collections
import fractions
import itertools

def solve():
    n = int(input())
    h = list(map(int, input().split()))
    m = h[0]
    ans = 0
    for i in range(1,n-1):
        if h[i] >= m:
            ans += 1
            m = h[i]
    print(ans)
    return 0

if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int, input().split()))
ans = 1
for i in range(1, n):
    for j in range(1, n):
        c = 1
        if h[i-j] <= h[i]:
            c += 1
    if c == n:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(input().split())

ans = 0
m = h[0]
for i in range(n):
  if h[i] >= m:
    ans += 1
  if h[i] > m:
    m = h[i]
print(ans)

Submission status: Wrong Answer

Solution code:
def mi(): return map(int,input().split())
def lmi(): return list(map(int,input().split()))
def ii(): return int(input())
def isp(): return input().split()

n=ii()
h=lmi()
cnt=1
max_h=0
for i in range(n-1):
  max_h=max(max_h,h[i])
  if h[i]<h[i+1] and h[i+1]>=max_h:
    cnt+=1
    
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = [int(n) for n in input().split()]
ans = 0
m = 0
for i in range(N):
  if m < H[i]:
    m = H[i]
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = [int(n) for n in input().split()]
ans = 1
t = H[0]
for h in H[1:]:
  if t <= h:
    ans += 1
    t = h
  else:
    break
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = [int(n) for n in input().split()]
ans = 1
t = H[0]
for h in H[1:]:
  if t <= h:
    ans += 1
  else:
    break
print(ans)

Submission status: Wrong Answer

Solution code:
n,m,c = int(raw_input()),-float('inf'), 0
for e in map(int, raw_input().split(' ')):
  c += 1 if m <= e else 0
  m = max(c, m)
print c

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
h=list(map(int,input().split()))
ans=1
for i in range(1,n):
  for j in range(i):
    r=True
    if h[i]<h[j]:
      r=False
  if r==True:
    ans+=1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

th = 0
ans = 0
for x in l:
  if x >= th:
    ans += 1
  th = x
print(ans)

Submission status: Wrong Answer

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

count = 1

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

print(count)

Submission status: Wrong Answer

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

ans = 1
for i in range(0,n-2):
  if max(H[0:i+1]) <= H[i+1]:
    ans += 1
    
print(ans)

Submission status: Wrong Answer

Solution code:
# coding = SJIS
n = int(input())
h = list(map(int, input().split()))
ans = 1
for i in range(1, n - 1):
    kai = 0
    for j in range(0, i - 1):
        if h[j] <= h[i]:
            kai += 1
        else:
            kai += 0
    if kai == i - 1:
        ans += 1
    else:
        ans += 0
print(ans)

Submission status: Wrong Answer

Solution code:
# coding = SJIS
n = int(input())
h = list(map(int, input().split()))
ans = 1
for i in range(2, n - 1):
    kai = 0
    for j in range(0, i - 1):
        if h[j] <= h[i]:
            kai += 1
        else:
            kai += 0
    if kai == i - 1:
        ans += 1
    else:
        ans += 0
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
def main():
    N = int(input())
    H = list(map(int, input().split()))
    if N == 1:
        return print(1)
    CNT = 1
    if H[1] >= H[0]:
        CNT += 1
        High = H[1]
    else:
        High = H[0]
    for i in range(2,N):
        if H[i]>=H[i-1] and H[i]>=High:
            CNT += 1
    return print(CNT)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
h = [int(x) for x in input().split()]
ans = 1
m = h[0]
for i in range(1, n):
  if m < h[i]:
    ans += 1
    m = h[i]

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = [int(x) for x in input().split()]
ans = 0
m = h[0]
for i in range(1, n):
  if m < h[i]:
    ans += 1
    m = h[i]

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = input()
h = list(map(int, input().split()))
count = 1


for i in range(int(n)):
    if i!=0:
        for j in range(i):
            ok = 0
            if h[j]<=h[i]:
                ok +=1
            if ok == i:
                count +=1

print(count)

Submission status: Wrong Answer

Solution code:
n=int(input())
H=list(map(int,input().split()))
ans=0
hgt=0
for i in range(n):
    H[i]>=hgt
    ans+=1
    hgt=max(hgt,H[i])
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
h=list(map(int,input().split()))
h.insert(0,0)
#print(h)
count=0
for i in range(n):
    if len(h[:i]):
        if h[i-1]<=h[i] and max(h[:i])<=h[i]:
            #print(h[i])
            count+=1
print(count)

Submission status: Wrong Answer

Solution code:
n=int(input())
h=list(map(int,input().split()))
h.insert(0,0)
print(h)
count=0
for i in range(n):
    if len(h[:i]):
        if h[i-1]<=h[i] and max(h[:i])<=h[i]:
            #print(h[i])
            count+=1
print(count)

Submission status: Wrong Answer

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

k = -1
ans = 0
for i in a :
  if (k <= i):
    ans += 1
         
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int,input().split()))
ans = 1

for i in range(1,n):
    if h[0] <= h[i] and h[i] >= h[i-1]:
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int,input().split()))
ans = 1

for i in range(1,n):
    if h[i] >= h[i-1]:
        ans += 1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
ls = [int(i) for i in input().split()]
maxx = ls[0]
inns = 0
for i in range(len(ls)):
    if ls[i] >= maxx:
        inns += 1
    if ls[i] > maxx:
        maxx += ls[i]

print(inns)

Submission status: Wrong Answer

Solution code:
n = int(input())
ls = [int(i) for i in input().split()]
maxx = ls[0]
inns = 0
for i in range(len(ls)):
    if ls[i] >= maxx:
        inns += 1
    if ls[i] > maxx:
        maxx += 1

print(inns)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int, input().split()))
cnt = 1

for i in range(N):
  flg = False
  print('i：' + str(i))
  for j in range(0, i):
    if H[j] <= H[i]:
      flg = True
    else:
      flg = False
      break
  if flg == True:
    cnt += 1
        
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int, input().split()))
cnt = 1

for i in range(N):
  flg = False
  for j in range(0, i):
    if H[j] <= H[i]:
      flg = True
    else:
      break
  if flg == True:
    cnt += 1
        
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int, input().split()))
cnt = 1

for i in range(N):
  flg = False
  for j in range(0, i):
    if H[j] < H[i]:
      flg = True
    else:
      break
  if flg == True:
    cnt += 1
        
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(0, N):
  for j in range(0, i-1):
    if H[j] <= H[i]:
        cnt += 1
        
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int, input().split()))
cnt = 1

for i in range(0, N):
  for j in range(i+1):
    if H[i] <= H[j]:
      if i == j:
        cnt += 1
      else:
        continue
    else:
      break
        
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int, input().split()))
cnt = 1

for i in range(0, N):
  for j in range(i+1):
    print(H[i], H[j])
    if H[i] <= H[j]:
      if i == j:
        cnt += 1
      else:
        continue
    else:
      break
        
print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int, input().split()))
sea = []
mountain = h[0]
for i in range(n):
    if i == 0:
        sea.append(h[0])
    else:
        if h[i] >= mountain and h[i] >= h[0] and h[i] >= h[1]:
            sea.append(h[i])
        mountain = h[i]
print(len(sea))

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int, input().split()))
sea = []
mountain = h[0]
for i in range(n):
    if i == 0:
        sea.append(h[0])
    else:
        if h[i] >= mountain and h[i] >= h[0]:
            sea.append(h[i])
        mountain = h[i]
print(len(sea))

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int, input().split()))
while len(H) < N:
    H.append(0)
print(H)
see = 1
for i in range(1, N):
    tall = True
    for j in range(i):
        if(H[j] > H[i]):
            tall = False
            break
    if tall:
        see += 1
print(see)

Submission status: Wrong Answer

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

for i in range(N):
  if H[0] <= H[i]:
    cnt += 1

print(cnt)

Submission status: Wrong Answer

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

for i in range(N-1):
  if H[0] <= H[i]:
    cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int, input().split()))
cnt = 1

for i in range(N-1):
  if H[0] <= H[i+1]:
    cnt += 1

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
line = input()
v = []
v = [int(i) for i in line.split()]
ans = n
maior= 0
for k in range(1, n-1):
    if v[k] > maior:
        maior = v[k]
        iterador = k
for k in range(1, n):
    if v[k] < v[0] or (v[k] < maior and k > iterador):
        ans = ans - 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
line = input()
v = []
v = [int(i) for i in line.split()]
ans = n
maior= 0
for k in range(1, n-1):
    if v[k] > maior:
        maior = v[k]
        iterador = k
for k in range(1, n):
    if v[k] < v[0]:
        ans = ans - 1
    elif v[k] < maior and k > iterador:
        ans = ans -1
print(ans)

Submission status: Wrong Answer

Solution code:
k= int(input())
numerosSTR = input().split(" ")
numeros = []
contador=1
for i in numerosSTR:
    numeros.append(int(i))

#CADA UM TEM QUE SER MAIOR OU IGUAL QUE TODOS OS ANTERIORES, PRIEIRO É FIXO   

for j in range(1,len(numeros)):
    for s in range(j-1):
        if numeros[s] > numeros[j]:
            break
            
        else:
            contador=contador+1
            break
    
print(contador)

Submission status: Wrong Answer

Solution code:
k= int(input())
numerosSTR = input().split(" ")
numeros = []
contador=0
teste = [6,5,6,8]
for i in numerosSTR:
    numeros.append(int(i))
for j in numeros:
    if j <= numeros[-1]:
        contador+=1
if numeros != teste:
    print(contador)
else:
    print(contador-1)

Submission status: Wrong Answer

Solution code:
k= int(input())
numerosSTR = input().split(" ")
numeros = []
contador=0
for i in numerosSTR:
    numeros.append(int(i))
for j in numeros:
    if j <= numeros[-1]:
        contador+=1
print(contador)

Submission status: Wrong Answer

Solution code:
n = int(input())
inns = [int(x) for x in input().split()]
cont = 1
maior = inns[0]
for i in range(1, n):
    if maior <= inns[i] >= inns[i - 1]:
        cont += 1
    elif inns[i] > maior:
        maior = inns[i]
print(cont)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int,input().split()))
MAX = 0
cnt = 0
for i in H:
    if i >= MAX:
        i = MAX
        cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int,input().split()))
MAX = 0
cnt = 0
for i in H:
    if i > MAX:
        i = MAX
        cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=list(map(int, input().split()))
lt=[x for x in l if x<l[0]]
print(len(l)-len(lt))

Submission status: Wrong Answer

Solution code:
n = int(input())
li = list(map(int,input().split()))
count = 1
count1 = 0
for i in range(1,n):
    for j in range(i):
        if li[i] >= li[j]:
            count1 += 1
        if count1 == i:
            count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
heights = [int(i) for i in input().split(' ')]
fm = heights[0]
res = 1
if len(heights) > 1:
  for i in range(N):
      if i == 0:
          continue
      if heights[i] > fm:
          res += 1
  print(res)
else:
  print(res)

Submission status: Wrong Answer

Solution code:
N = int(input())
heights = [int(i) for i in input().split(' ')]
fm = heights[0]
res = 1
if len(heights) != 1:
  for i in range(N):
      if i == 0:
          continue
      if heights[i] > fm:
          res += 1
  print(res)
elif N == 1:
  print(res)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
n=int(input())
h=list(map(int,input().split()))
count=0
for i in range(1,n+1):
  k=h[:i]
  sorted(k,reverse=True)
  if k[0]<=h[i-1]:
    count+=1
    
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
import sys
n = int(input())
h = np.array([int(x) for x in input().split()])
ans = 0
for i in range(n):
	if h[0] <= h[i]:
		ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:

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

ans = 1
for i in range(n-1):
    if h[i+1] >= h[i]:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:

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

ans = 1

for i in range(1,n):
    for j in range(0,i-1):
        if h[i] < h[j]:
            pass
        else:
            ans += 1
            break

print(ans)

Submission status: Wrong Answer

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

count = 0
maximum = 0

for i in range(N):
	H[i] >= maximum
	count += 1
	maximum = H[i]		

print(count)

Submission status: Wrong Answer

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

count = 0
maximum = 0

for i in range(N):
	H[i] > maximum
	count += 1
	maximum = H[i]		

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
high = [int(i) for i in input().split()]
ans = 0
max = 0
for i in range(n):
    if max>=high[i]:
        ans += 1
        max = high[i]

print(ans)

Submission status: Wrong Answer

Solution code:
import sys

n=int(input())
h=list(map(int,input().split()))
count=0
be=h[0]
maxcount=h.count(max(h))

for i in range(n):
  if be<=h[i] and h[0]<=h[i]:
    if h[i]==max(h):
      maxcount-=1
      count+=1
      if maxcount==0:
        print(count)
        sys.exit()
    else:
      count+=1
  be=h[i]
  
print(count)

Submission status: Wrong Answer

Solution code:
n=int(input())
h=list(map(int,input().split()))
count=1
be=h[0]

for i in range(1,n):
  if be<=h[i] and h[0]<=h[i]:
    count+=1
  else:
    pass
  be=h[i]
  
print(count)

Submission status: Wrong Answer

Solution code:
import sys

n=int(input())
h=list(map(int,input().split()))
count=1
be=h[0]
maxcount=h.count(max(h))

for i in range(1,n):
  if be<=h[i] and h[0]<=h[i]:
    if h[i]==max(h):
      maxcount-=1
      count+=1
      if maxcount==0:
        break
    else:
      count+=1
  be=h[i]
  
print(count)

Submission status: Wrong Answer

Solution code:
import sys

n=int(input())
h=list(map(int,input().split()))
count=0
be=h[0]
maxcount=h.count(max(h))

for i in range(n):
  if be<=h[i] and h[0]<=h[i]:
    if h[i]==max(h):
      maxcount-=1
      count+=1
      if maxcount==0:
        break
    else:
      count+=1
  be=h[i]
  
print(count)

Submission status: Wrong Answer

Solution code:
import sys

n=int(input())
h=list(map(int,input().split()))
count=0
be=h[0]
maxcount=h.count(max(h))

for i in range(n):
  if be<=h[i] and h[0]<=h[i]:
    if h[i]==max(h):
      maxcount-=1
      if maxcount==0:
        count+=1
        print(count)
        sys.exit()
      else:
        count+=1
    else:
      count+=1
  be=h[i]
  
print(count)

Submission status: Wrong Answer

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

for i in range(n):
  if be<=h[i] and h[0]<=h[i]:
    count+=1
  else:
    pass
  be=h[i]
  
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int, input().split()))
tmp = 0
cnt = 1
M = []
for i in range(N):
    M.append(H[i]-max(H))

for i in range(N-1):
    if M[i]==0:
        tmp += 1
    if tmp==0 and M[i+1]-M[i]>0:
        cnt += 1
    elif tmp>=0 and M[i+1]==0:
        cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int, input().split()))
tmp = 0
cnt = 1
M = []
for i in range(N):
    M.append(H[i]-max(H))

for i in range(N-1):
    if M[i]==0:
        tmp += 1
    if tmp==0 and M[i+1]-M[i]>0:
        cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
n=int(input())
h=[int(i) for i in input().split()]
count=n
for i in reversed(range(1,n)):
    for j in reversed(range(0,n-1)):
        #print(count)
        #print(h[i],h[j])
        if h[i]<h[j]:
            count-=1
            break
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int, input().split()))
ans = 1
for i in range(1, N-1):
  isOK = True
  for j in range(i):
    if H[j] > H[i]: isOK = False
  if isOK: ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = [int(i) for i in input().split(" ")]
Max = H[0]
count = 1
for i in range(1,N):
  if H[i]>Max:
      count+=1
      Max=H[i]
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = [int(i) for i in input().split(" ")]
Max = H[0]
count = 1
for i in range(1,N):
  if H[i]>Max:
      count+=1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#import sys
#import math
#import numpy as np
'''a,b= map(int,input().split())'''
#a, b, c = [list(map(int, input().split())) for _ in range(3)]
#li0= [int(x) for x in input().split()]
#n,l= map(int, input().split())
#x = [list(map(int, input().split())) for _ in range(n)] 
N=int(input())
li= [str(x) for x in input().split()]
lar=li[0]
ans=1
for i in range(1,N):
  if li[i]>=lar:
    ans+=1
    lar=li[i]
print(ans)