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

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

high = H[0]
counter = 0

for i in range(N):
    if H[i] >= high:
        counter += 1
        high = H[i]

print(counter)

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

ans = 1
temp = []
for i in range(N-1):
    temp.append(H[i])
    if H[i+1] >= max(temp):
        ans += 1
print(ans)

Solution (Python):
n = int(input())
HH = list(map(int, input().split()))
cnt = 0
for i,H in enumerate(HH):
    flg = True
    if i == 0:
        pass
    else:
        for H2 in HH[:i]:
            if H < H2:
                flg = False
                break
    
    if flg:
        cnt += 1

print(cnt)

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

index = 0
count = 0
can_see_sea = True
for h in H:
    can_see_sea = True
    for _h in H[0:index]:
        if h < _h:
            can_see_sea = False
            continue
    if can_see_sea:
        count = count + 1
    index = index + 1

print(str(count))

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

k = 1
tmp = H[0]
for i in range(N-1):
    if H[i+1] >= tmp:
        k += 1
        tmp = H[i+1]
print(k)

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]
ans = 0
max = 0
for i in range(n):
	if a[i] >= max:
		ans += 1
		max = a[i]
	else:
		pass
print(ans)

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

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

def hoge(H, n):
	for i in range(n):
		if H[i]>H[n]:
			return 0
	return 1

count = 0
for i in range(N):
	count += hoge(H, i)

print(count)

Solution (Python):
N = int(input())
H = [int(x) for x in input().split()]
r = 1
hmax = H[0]
for i in range(1,len(H)):
    if (H[i] >= hmax):
        r += 1
        hmax = H[i]
print(r)

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

max_num = 0
count = 0

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

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


seeable = 1 
for i in range(2, n+1, 1): 
  iseeable = 1
  for j in range(1, i, 1): 
    if H[j-1] > H[i-1]: 
      iseeable = 0
      break
  seeable += iseeable

print(seeable)

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

Solution (Python):
import numpy as np

n = int(input())
h = np.array([
  int(i) for i in input().split()])

highest = np.array(
  [max(h[:i]) if i>0 else 0
   for i in range(len(h))])

print(np.sum(h>= highest))

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

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

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

ans = 1

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

print(ans)

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

for i in range(1,len(a)) :
  if max(a[:i]) <= a[i]:
    r +=1
  else:
    continue
print(r)

Solution (Python):
import sys


N = int(sys.stdin.readline())

H = list(map(int, sys.stdin.readline().split()))

max = 0
count = 0
for i in range(len(H)):
    if(max <= H[i]):
        max = H[i]
        count +=1

print(count)

Solution (Python):
def main():
    result = sub()
    print(result)


def sub():
    n = int(input())
    heights = [int(x) for x in (input().split())]
    count = 0

    maxHeight = 0
    for index, item in enumerate(heights):
        if item >= maxHeight:
            count = count + 1
            maxHeight = item
    return count


if __name__ == '__main__':
    main()

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

cnt = 1
for i in range(1, len(H)):
    h = H[i]
    h_ = H[:i]
    if h >= max(h_):
        cnt += 1

print(cnt)

Solution (Python):
n = int(input())
h = list(map(int,input().split()))
ans = 1
for i in range(1,n):
    flag = 1
    for j in range(i):
        if h[j] > h[i]:
            flag = 0
            break
        else:
            pass
    if flag:
        ans += 1
print(ans)

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

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

hs = list(map(int, input().split()))
maxs = [0] * (n + 1)

m = 0
for i in range(n):
    m = max(m, hs[i])
    maxs[i + 1] = m

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

print(count)

Solution (Python):
N = [int(s) for s in input().split(" ")][0]
Hs = [int(s) for s in input().split(" ")]
print(len([0 for i in range(1, N) if all([Hs[i] >= Hs[j] for j in range(i)])]) + 1)

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

first = H[0]
ret = 0
for it in H:
    if it >= first:
        ret += 1
        first = it
print(ret)

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

hmax = 0
cnt = 0
for h in H:
    if hmax <= h:
        hmax = h
        cnt += 1

print(cnt)

Solution (Python):
def main():
    N = int(input())
    H = list(map(int, input().split()))
    max_height = H[0]
    ans = 1

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

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
h = list(map(int, str(input()).split()))
max_height = 0
count = 1
for i in range(1, n):
  max_height = max(max_height, h[i-1])
  count += (h[i] >= max_height)
print(count)

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

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

print(ans)

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

Solution (Python):
n=int(input())
height=list(map(int,input().split()))
cont=1
temp=height[0]

for i in range(n):
	if i!=0 and height[i]>=temp:
		cont+=1
		temp=height[i]
print(cont)

Solution (Python):
n = int(input())
h = list(map(int, input().split()))
tmp = [1] * n

for i in range(0, n):
    for j in range(i, n):
        if h[i] > h[j]:
            tmp[j] = 0
print(tmp.count(1))

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

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

good = 0
for i in range(n):
  if i == 0:
    good += 1
  else:
    left = max(mountains[0:i])
    if left <= mountains[i]:
      good += 1
print(good)

Solution (Python):
N = int(input())
hotel = list(map(int, input().split(" ")))
ans = 0
hight = hotel[0]

for j in range(N):
    if hight <= hotel[j]:
        ans += 1
        hight = hotel[j]

print(ans)

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

ans = 1
highest = H[0]

for i in range(2, N + 1):
    Hi = H[i - 1]
    if Hi < highest:
        continue
    elif Hi >= highest:
        highest = Hi
        ans += 1
print(ans)

Solution (Python):

"""
AtCoder B
"""

def main():
    N=list(map(int,input().split()))
    H=list(map(int,input().split()))
    
    max_h=0
    num=0
    for h in H:
        if max_h<=h:
            max_h=max(max_h,h)
            num+=1
    print(num)

if __name__ == "__main__":
    main()

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

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

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

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

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

Solution (Python):
n=int(input())
l=[int(i) for i in input().split()]
maxi=0 
cnt=0 
for i in l:
    if i>=maxi:
        cnt+=1 
        maxi=i 
print(cnt)

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

prev = 0
ret = 0
for h in hh:
    if prev <= h:
        ret += 1
    else:
        pass

    prev = max(prev, h)

print(ret)

Solution (Python):
n = int(input())
h =[int(x) for x in input().split()]

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

Solution (Python):
def count_hotels(n, hs):
    res = 1 + sum(all(hs[j] <= hs[i] for j in range(i)) for i in range(1, n))
    return res


def main():
    n = int(input())
    hs = [int(h) for h in input().split()]
    print(count_hotels(n, hs))


if __name__ == "__main__":
    main()

Solution (Python):
input()
ms=[int(i) for i in input().split()]
c=d=0
for m in ms:
 if c<=m:
  c=m
  d+=1
print(d)

Solution (Python):
import sys, copy
input = sys.stdin.readline
N = int(input())
H = [int(x) for x in input().split()]
max, ans = H[0], 1
for i in range(1,N):
    if max <= H[i]:
        ans += 1
        max = H[i]
print(ans)

Solution (Python):

import re, sys

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

max_height = mountains[0]
count = 0
for i in range(len(mountains)):
	if mountains[i] >= max_height:
		max_height = mountains[i]
		count += 1

print(count)

Solution (Python):
N = int(input())
H = [int(x) for x in input().split()]

count = 0
high_max = 0

for high in H:
	if high_max <= high:
		count += 1
		high_max = high

print(count)

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

max_H = H[0]
L = [1 for i in range(N)]
for i in range(1, N):
    if H[i] >= max_H:
        L[i] = 1
    else:
        L[i] = 0
    max_H = max(H[i], max_H)

print(sum(L))

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

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

print(ans)

Solution (Python):
n = int(input())
a = [int(m) for m in input().split()]

ans = 0
for i in range(n):
    for j in range(i):
        if a[i] < a[j]:
            break
    else:
        ans += 1
print(ans)

Solution (Python):
from sys import exit

N = int(input())

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

ans = 1
flag = True
for i in range(N):
    if i == 0:
        continue
    for j in range(i):
        if H[j] > H[i]:
            flag = False
    if flag:
        ans += 1
    flag = True

print(ans)

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

Solution (Python):
n=int(input())
s=input().split(' ')
h=[]
for i in range(0,n):
	h.append(int(s[i]))
count=1
for i in range(1,n):
	my=h[i]
	highest=max(h[0:i])
	if my >= highest:
		count=count+1

print(count)

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

res=0
for i in range(N):
  flg=True
  for j in range(i):
    if H[j]>H[i]:
      flg=False
  if flg:
    res+=1

print(int(res))

Solution (Python):
n=int(input())
p=input().split()
k=[]
for i in p:k.append(int(i))
c=1
for i in range(1,n):
    if i == 1:
        if k[1] >= k[0]:
            c+=1
        continue
    m=max(k[0:i])
    w=k[i]
    if m <= w:c+=1
print(c)

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

score  = 1
for i,h in enumerate(list_h[1:]):
    score += (max(list_h[:i+1]) <= h) * 1
print(score)

Solution (Python):
n = int(input())
h = list(map(int, input().split()))
m = 1
h_max = h[0]

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

Solution (Python):
N = int(input())
H = list(map(int,input().split()))
ans = 0
for i in range(len(H)):
  if i ==0 :
    ans += 1
  else :
    isOK = 0
    for j in range(i):
      if H[j] > H[i]:
        isOK += 1
    if isOK == 0:
      ans += 1

print(ans)

Solution (Python):
N=input()
H=map(int, raw_input().split())

ans=1
for i in range(1,N):
	m=max(H[:i])
	if m<=H[i]:
		ans+=1

print ans

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

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

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

h_list = list(int(i) for i in input().split())

ans = 1

for i in range(1, N):
    can_view = True
    for j in range(i):
        if h_list[j]>h_list[i]:
            can_view = False
    if can_view:
        ans+=1

print(ans)

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

buf = 0
for i,r in enumerate(rs):
	flg = 0
	for j in range(0,i):
		if(rs[i] < rs[j]):
			flg = 1
		else:
			pass
	if flg == 0:
		buf = buf + 1
print(buf)

Solution (Python):
N = int(input())
H = map(int, input().split())
highest = 0
ans = 0
for height in H:
    if height >= highest:
        ans += 1
        highest = height
print(ans)

Solution (Python):


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

max_h = 0
number = 0
for h in h_list:
    if h >= max_h:
        max_h = h
        number += 1

print (number)

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

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

Solution (Python):
N = int(input())
a = [int(i) for i in input().split()] 
c,max = 1,a[0]

for i in range(1,N):
  if max <= a[i]:
    c += 1
    max = a[i]
print(c)

Solution (Python):



N = int(input())
H = map(lambda x: int(x), input().split(' '))

maxH = 0
result = 0
for h in H:
    if h >= maxH:
        result += 1
        maxH = h
print(result)

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

ans = 0
m = hs[0]
for h in hs:
  if m <= h:
    ans += 1
  m = max(m, h)
print(ans)

Solution (Python):
n = int(raw_input())
h = map(int,raw_input().split())
maxv = 0
count = 0
for i in range(n):
	maxv = max(maxv, h[i])
	if maxv == h[i]:
		count += 1
print count

Solution (Python):
_n = int(input())
_h = list(map(int, input().split()))
h_max = 0
c=0
for n in range(_n):
    if h_max<=_h[n]:
        c+=1
        h_max=_h[n]
print(c)

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

Solution (Python):
from sys import stdin

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

    cnt = 0
    max_ = 0
    for i in H:
        if max_ <= i:
            cnt += 1
            max_ = i
    print(cnt)

input = lambda: stdin.readline()
main()

Solution (Python):
N = int(input())
*H, = map(int, input().split())

c = 0
mh = H[0]
for h in H:
	if mh <= h:
		c += 1
		mh = max(mh, h)
	else:
		continue
print(c)

Solution (Python):


def main():
    N = int(input())
    mountain = input().split()
    
    ans = 0
    mountain_max = -1
    for i in range(N):
        if mountain_max <= int(mountain[i]):
            mountain_max = int(mountain[i])
            ans += 1
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
import numpy as np
n=int(input())  
h=list(map(int, input().split()))  
count = 0
high = h[0]
for i in range(n):
    if h[i] >= high:
        count += 1
        high = h[i]

print(count)

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

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

cnt=0
teppen=h[0]
for i in range(n):
    if teppen<= h[i]:
        cnt+=1
        teppen=h[i]
    else:
        continue
print(cnt)

Solution (Python):

N = int(input())
h = list(map(int, input().split()))
cnt = 1
for i in range(1, N):
    tmp = 0
    for j in range(i+1):
        if h[j] > h[i]:
            tmp += 1
    if tmp == 0:
        cnt += 1
print(cnt)

Solution (Python):
n = int(input())
h = [int(_) for _ in input().split(' ')]
print(len([i for i in range(n) if h[i] >= max(h[:i+1])]))

Solution (Python):
from collections import defaultdict
from string import ascii_uppercase
import sys, bisect, math
stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

N = read_int()[0]
H = read_int()

def solve():
    ans = 1
    mh = H[0]
    for i in range(1, N):
        cansee = True
        for j in range(0, i):
            if H[j] > H[i]:
                cansee = False
                break
        if cansee:
            ans += 1
    return ans

if __name__ == "__main__":
    print(solve())

Solution (Python):
N = int(input())
H = [int(i) for i in input().split()]
ans = 0
l = 0
for x in H:
    if l <= x:
        ans += 1
        l = max(l, x)
print(ans)

Solution (Python):
N=int(input())
H=list(map(int,input().split()))
count=0
for i in range(N):
    flag=True
    for j in range(i):
        if H[j]>H[i]:
            flag=False
    if flag:
        count+=1 
print(count)

Solution (Python):
if __name__ == '__main__':
    mountain_count = int(input())
    mountains = list(map(int, input().split()))
    ans = 0
    for i in range(mountain_count):
        can_watch = True
        for j in range(mountain_count):
            if i == j:
                break
            if mountains[i] < mountains[j]:
                can_watch = False
                break
        if can_watch:
            ans += 1
    print(ans)

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

maxH = 0;
count = 0;
for i in range(N):
    if maxH <= A[i]:
        count+= 1
    maxH = max(maxH, A[i])


print(count)

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

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

ans = 0
top = 0
for i in range(N):
    if arr[i] >= top:
        ans += 1
        top = arr[i]
print(ans)

Solution (Python):
n = int(input())
H = [int(h) for h in input().split()]
ans = 1
isView = False
for i in range(1,n):
    tmp = H[i]
    for j in H[:i]:
        if j > tmp:
            isView = False
            break
        else:
            isView = True
    if isView:
        ans += 1
print(ans)

Solution (Python):


N = int(input())
H = list(map(int, input().split()))
ans = 0
max_height = -1
for h in H:
    if h >= max_height:
        ans += 1
        max_height = h
print(ans)

Solution (Python):
n = int(input())
mount = list(map(int, input().split()))
count =1
for i in range(1,n):
    for j in range(0,i):
        if mount[i] >= mount[j] and j != i-1:
            continue
        elif mount[i] >= mount[j] and j == i-1:
            count+=1
        else:    
            break
print(count)

Solution (Python):


N = int(input())
lst = list(map(int,input().split()))
low_mountain = lst[0]
count= 0
for i in lst:
    if i >= low_mountain:
        low_mountain = i
        count+=1
print(count)

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

Solution (Python):



def solv(n, h):
    top = 0
    ans = 0
    for hi in h:
        if top <= hi:
            top = hi
            ans += 1
    return ans


if __name__ == '__main__':

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

    ans = solv(n, h)

    print(ans)

Solution (Python):
n = int(input())
hl = [ int(x) for x in input().split() ]

k = 0
ans = 0
for h in hl:
    if h >= k:
        ans += 1
        if h > k:
            k = h

print(ans)

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

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

mountains = [0]

can_see = 0

for H in Hs:
    mountains.append(H)
    if H == max(mountains):
        can_see += 1

print(can_see)

Solution (Python):
n = int(input())
h = [int(i) for i in input().split()]
ans = 1
mx = h[0]
for hi in h[1:]:
    if hi >= mx:
        
        ans += 1
    mx = max(mx, hi)

print(ans)

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

print(count)

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

ans = 1

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

print(ans)

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

N = int(input())


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

cnt = 0
for i, h in enumerate(H):
    if i == 0:
        max_h = H[0]
        cnt += 1
        continue
    else:
        if max_h <= h:
            cnt += 1
            max_h = h
print(cnt)

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

sum=1
for i in range(1, n):
        flag = True
        for j in range(0, i):
                if(h[j] > h[i]):
                        flag = False
        if(flag):
                sum+=1
print(sum)

Solution (Python):

import sys


def solve(N: int, H: "List[int]"):
    ans = 1
    h = H[0]
    for i in range(1, len(H)):
        if(H[i] >= h):
            ans += 1
            h = H[i]

    print(ans)
    return



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

if __name__ == '__main__':
    main()

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

count = 1
max = h[0]
f = 0
if n == 1:
    print(count)
    f = 1
else:
    for i in range(1,n):
        if h[i] >= max:
            count += 1
            max = h[i]
        
if f == 0:
    print(count)

Solution (Python):
from sys import stdin

n = int(stdin.readline().rstrip())
hotel = list(map(int, input().split()))

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

print("{0}".format(count))

Solution (Python):


from sys import stdin
    
def calc(ryokans):
    ans = 0
    _max = -1

    for x in ryokans:
        if x >= _max:
            ans += 1
            _max = x

    return ans

def main():
    n = stdin.readline().rstrip()
    ryokans = [int(x) for x in stdin.readline().rstrip().split()]
    ans = calc(ryokans)
    print(ans)
    
if __name__=='__main__':
    main()

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

height = h[0]
ans = 0

for i in h:
  if height <= i:
    ans += 1
    height = i
  
print(ans)

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

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

print(count)

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

score = 0
asdf = []
for i, mt in enumerate(mts):
    asdf.append(mt)
    if max(asdf) == asdf[i]:
        score += 1
print(score)

Solution (Python):
N = int(input())
Hn = list(map(int, input().split()))
count = 0
for num, i in enumerate(Hn[1:]):
    if(max(Hn[:num+1]) <= i):
        count += 1
print(count + 1)

Solution (Python):
n = int(input())
m = [int(i) for i in input().split()] 

i = 0
max_h = m[0]
count = 0

while i < n:
  if m[i] >= max_h:
    count += 1
  max_h = max(max_h, m[i])
  i += 1
  
print(count)

Solution (Python):
N = int(input())
H = list(map(int, input().split()))
ans = 0

for i in range(N):
    ans += 1
    if i == 0:
        continue
    for j in range(i):
        if H[j] > H[i]:
            ans -= 1
            break

print(ans)

Solution (Python):

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

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

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

Solution (Python):
input()
H = [int(c) for c in input().split()]
nvisible=0
for i,hi in enumerate(H):
    visible=1
    for hj in H[:i]:
        if hj>hi:
            visible=0
            break
    nvisible+=visible
print(nvisible)

Solution (Python):
N = int(input())
H = [int(i) for i in input().split()]
ans = 1
for i, hi in enumerate(H[1:]):
    i += 1
    f = True
    for h in H[:i]:
        if h > hi:
            f = False
    if f:
        ans += 1

print(ans)

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

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

Solution (Python):
import numpy as np

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

count = 0
max = h[0]
for i in range(n):
    if h[i] >= max:
        count += 1
        max = h[i]

print(count)

Solution (Python):




def load_input():
    n = int(input())
    h = list(map(int, input().split()))
    return n, h


def main():
    n, h = load_input()

    output = 0
    max_height = 0
    for i in range(n):
        if max_height <= h[i]:
            output += 1
            max_height = h[i]
    print(output)


if __name__ == '__main__':
    main()

Solution (Python):
_ = input()
H_list = [int(n) for n in input().split()]

highest = 0
count = 0

for h in H_list:
    if h >= highest:
        count += 1
        highest = h

print(count)

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

s = 0
a = 0
for i in h:
    if i >= a:
        a = i
        s +=1

print(s)

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

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

print(ans)

Solution (Python):
def main():
    n = int(input())
    h = [int(n) for n in input().split()]
    ans = 0
    for i in range(n):
        for j in range(i):
            if h[j] > h[i]:
                break
        else:
            ans += 1
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
h=list(map(int,input().split()))
cnt=1
for i in range(1,len(h)):
  hotel=h[i]
  c=True
  for j in range(0,i):
    if h[i]<h[j]:
      c=False
      break
  if c:
    cnt+=1
print(cnt)

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

ans = 0
max_ = 0
for i in h:
    if i >= max_:
        ans += 1
        max_ = i
print(ans)

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

max_h = 0
count = 0
for i, h_i in enumerate(H):
    if max_h <= h_i:
        max_h = h_i
        count += 1

print(count)

Solution (Python):
N = int(input().rstrip())
H = list(map(int, input().rstrip().split()))
a = H[0]
can = [1]
for i in range(1, N):
    if a > H[i]:
        continue
    elif a < H[i]:
        a = H[i]
        can.append(i+1)
    else:
        can.append(i+1)
print(len(can))

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
c=1
for i in range(1,n):
  b=True
  for j in range(0,i):
    if l[j]>l[i]:
      b=False
  if b:
    c+=1
print(c)

Solution (Python):
N = int(input())
Hs= list(map(int, input().split()))
r = 1
n = Hs[0]
for h in Hs[1::]:
  if h >= n:
    r +=1
    n = h
print(r)

Solution (Python):
def main():
    N = int(input())
    *H, = map(int, input().split())
    count = 0
    for i in range(len(H)):
        if H[i] == max(H[:i + 1]):
            count += 1
    print(count)

main()

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

ans = 0
for i in range(n):
    flag = True
    for j in range(0, i+1):
        if H[i] < H[j]:
            flag = False
            break
    if flag:
        ans += 1

print(ans)

Solution (Python):
N = int(input())
H = [int(i) for i in input().split()]
h_max = 0
c = 0
for i in range(N):
    if h_max <= H[i]:
        c += 1
        h_max = H[i]
print(c)

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

def is_large(h_main, hs):
    if len(hs) == 0:
        return True

    for h in hs:
        if h_main < h:
            return False
    return True


ans = 0
for i, H in enumerate(Hs):
    if is_large(H, Hs[:i]):
        ans += 1
print(ans)

Solution (Python):
N = int(raw_input())
H = map(int, raw_input().split())

max = 0
count = 0
for i in xrange(len(H)):
    if max <= H[i]:
        max = H[i]
        count += 1

print count

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

Solution (Python):
n=int(input())
a=map(int,input().split())
minn=0
ans=0
for i in a:
  if i>=minn:
    ans+=1
    minn=i
print(ans)

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

count = 0
maximum = 0
for i in H:
    if maximum <= i:
        count += 1
        maximum = i

print(count)

Solution (Python):
n = int(input())
l = []
li = list(map(int,input().split()))
ans = 0
max = 0
for i in range(len(li)):
  if max <= li[i]:
    max = li[i]
  if li[i] >= max:
    ans = ans + 1
print(ans)

Solution (Python):
N = int(input())
H = [int(i) for i in input().split()]
count=1
for i in range(1,N):
    Max = max(H[:i])
    if H[i]>=H[i-1] and Max<=H[i]:
        count+=1
print(count)