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()))

cnt = 1
maximum = h[0]

for i in range(1, n):
    if(maximum <= h[i]):
        maximum = h[i]
        cnt += 1
        
print(cnt)

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

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

print(X)

Solution (Python):
s = int(input())
l = list(map(int,input().split()))
ans = 1
x = l[0]
for i in range(s-1):
    if l[i] <= l[i+1] and x <=l[i+1]:
        ans += 1
        x = l[i+1]
print(ans)

Solution (Python):
import numpy as np
n=int(input())
h=np.array(list(map(int,input().split())))
answer=0
for i in range(n):
  if np.all(h[:i] <= h[i]):
    answer+=1
print(answer)

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

Solution (Python):
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
LIST = lambda: list(map(int, INPUT().split()))

sys.setrecursionlimit(10 ** 9)


def main():
    N = INT()
    H = LIST()

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

    print(cnt)


if __name__ == '__main__':
    main()

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

cnt=0
for i in range(n):
  flag=True
  for j in range(i):
    if H[j]>H[i]:
      flag=False
      break
  if flag:
    cnt+=1
print(cnt)

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

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

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

base = H[0]
cnt = []
for idx in range(N):
    key = H[idx]
    if base <= key:
        cnt.append(key)
        base = key
print(len(cnt))

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

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

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

ans = 1
base_h = H[0]

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

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

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

print(ans)

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

maximum = -1 
count = 0
for i in l:
  if i > maximum:
    maximum = i
  if i == maximum:
    count += 1

print(count)

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

ans=0
mh=h[0]
for i in h:
  if i >= mh:
    mh = i
    ans+=1

print(ans)

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

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

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = 0
high = 0
for a in A:
  if high <= a:
    ans += 1
    high = a
print(ans)

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()

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

    ans = 0
    max_h = 0
    for h in H:
        if h >= max_h:
            ans += 1
            max_h = h
    print(ans)

if __name__ == '__main__':
    main()

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

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

Solution (Python):
_ = int(input())
h_list = list(map(int, input().split()))
max = 0
count = 0

for h in h_list:
    if h >= max:
        max = h
        count += 1

print(count)

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

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

max_h=h[0]

ans=1

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

print(ans)

Solution (Python):

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

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

print(count)

Solution (Python):
N, *H = map(int, open(0).read().split())
c = 1
for i, h in enumerate(H):
    b = []
    for j in range(i):
        if H[j] <= h:
            b.append(True)
        else:
            b.append(False)
    
    if not len(b) == 0 and all(b):
        c += 1

print(c)

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

ans = 0
p = H[0]
for h in H:
    if p <= h:
        ans += 1
        p = h
print(ans)

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

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

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

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

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

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

mod = 1000000007
inf = 1 << 60
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

n = ni()
a = na()

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

print(ans)

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

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

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

print(count)

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

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

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

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

Solution (Python):
import sys
import fractions
import math
import itertools

n=input()
h=list(map(int,input().split()))
H=[]
ans=0

for i in range(len(h)):
	H.append(h[i])
	if max(H)==h[i]:
		ans+=1

print(ans)

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

maxh = 0
cnt = 0

for a in H:
    if maxh <= a:
        cnt += 1
        maxh = max(maxh, a)
print(cnt)

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

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

Solution (Python):
import sys

n, *H = map(int, sys.stdin.read().split())

def main():
    ma = 0
    cnt = 0
    for h in H:
        if h >= ma:
            cnt += 1
            ma = h
    return cnt

if __name__ == '__main__':
    ans = main()
    print(ans)

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

ans = 0
max_h = H[0]

for h in H:
  if h >= max_h:
    ans += 1
    max_h = h

print(ans)

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

max_h = 0
ans = 0
for i in range(N):
  if max_h <= H_list[i]:
    ans += 1
  max_h = max(max_h, H_list[i])
  
print(ans)

Solution (Python):
input()
c = m = 0
for i in map(int, input().split()):
  if i >= m:
    m = i
    c += 1
print(c)

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

ans = 0

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

print(ans+1)

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

print(counter)

Solution (Python):
n = int(input())
h = input().split()
max = 0
ans = []



for i in range(n):
	if max < int(h[i]) or max == int(h[i]):
		ans.append(int(h[i]))
		max = int(h[i])

print(len(ans))

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


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

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

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

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

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

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

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

x = 0
for i in range(n):
    a = max(l[0:i+1])
    
    if l[i] >= a:
        x += 1
print(x)

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

x = 0
for i in range(n):
    a = max(l[0:i+1])
    
    if l[i] >= a:
        x += 1
print(x)

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

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

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

cnt = 0
for i in range(N):
    arr_H = [H[_] for _ in range(i+1)]
    if H[i] >= max(arr_H):
        cnt += 1
print(cnt)

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


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

print(ans)

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

for h in H:
    if h >= max_height:
        max_height = h
        ans += 1

print(ans)

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

tof = [True]*n

for i, val in enumerate(h):
    if i==0:
        continue
    if not val==max(h[:i+1]):
        tof[i] = False

print(sum(tof))

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

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

Solution (Python):
"""
author : halo2halo
date : 9, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N, *H = map(int, read().split())

ans = 0
temp = H[0]
for h in H:
    if h >= temp:
        ans += 1
        temp = h

print(ans)

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

Solution (Python):
def main():
    N = int(input())
    H = list(map(int, input().split(" ")))
    max = -1
    result = 0
    for h in H:
        if h >= max:
            result += 1
            max = h
    print(result)


if __name__ == '__main__':
    main()

Solution (Python):

 
import math
import itertools
import sys
import copy
 






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

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

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

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

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

Solution (Python):
input()
a = list(map(int, input().split()))
ret = 0
for i, h in enumerate(a):
    ret += max(a[:i + 1]) == h
print(ret)

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

Solution (Python):
import os, sys, re, math

N = int(input())
H = [int(n) for n in input().split()]

max_array = [H[0]]
for i in range(1, len(H)):
    max_array.append(max(H[i], max_array[-1]))

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

print(count)

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

Solution (Python):
N = int(input())
Hs = [int(s) for s in input().split(' ')]
count = 0
m = 0
for h in Hs:
    if m > h:
        continue
    m = h
    count += 1
print(count)

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

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

hi = next(H)
cnt = 1
for h in H:
    if h >= hi:
        cnt += 1
        hi = h

print(cnt)

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

left = l[0]
count = 1
for i in range(1,n):
  if l[i] >= left:
    count += 1
    left = l[i]
print(count)

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

Solution (Python):
def main():
  if 'get_ipython' not in globals():  
    N = input()
    X = list(map(int,input().split()))
  else:
    N = 5
    X = list(map(int, "9 5 6 8 4".split()))
    print(X)

  max = 0
  count = 0
  for value in X:
    if value >= max:
      count = count + 1
      max = value
    else:
      continue
  print(count)
      
  
main()

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

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

print(ans)

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

ans = []
for i in range(N-1, 0, -1):
    ans.append(all(Hs[i] >= Hs[j] for j in range(i-1, -1, -1)))

print(sum(ans) + 1)

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

highest = mountains[0]

cnt = 0

for mt in mountains:
    if mt >= highest:
        cnt += 1
        highest = mt
        
print(cnt)

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

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

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

for i in range(N):
  if i == 0:
    ans += 1
  else:
    h = H[i]
    tmp = True
    
    for j in range(i-1, -1, -1):
      
      tmp = tmp and h >= H[j]
    
    if tmp:
	    ans += 1

print(ans)

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

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

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

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

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

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

print(count)

Solution (Python):
N, *H = map(int, open(0).read().split())
c = 0
for i in range(N):
    b = True
    for j in range(i):
        if H[j] > H[i]:
            b = False
    if b:
        c += 1
print(c)

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

cnt = 0

for i in range(n):
    if h[i] == max([h[j] for j in range(i+1)]):
        cnt += 1
print(cnt)

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

maxv = 0
result = 0
for v in a:
    if maxv <= v:
        result += 1
        maxv = v
print(result)

Solution (Python):
n = int(input())
data = list(map(int, input().split()))
count = 1
for i in range(1, n):
  for j in range(i):
    if data[i] < data[j]:
      break
  else:
    count += 1
print(count)

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

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

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

hmax = 0
ans = 0

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

Solution (Python):
n = int(input())
tmp = 0
ans = 0
for h in map(int, input().split()):
  if tmp <= h:
    ans += 1
    tmp = h
print(ans)

Solution (Python):
N = int(input())
hills = list(map(int,input().split()))
t_max = hills[0]
ans = 1

for hill in hills[1:]:
    if hill >= t_max:
        ans += 1
        t_max = hill

print(ans)

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

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

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

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

Solution (Python):

import numpy as np


N = int(input())
H = np.array(list(map(int, input().split())))


res = 1
for i in range(1, len(H)):
    if sum(H[:i] - H[i] > 0) == 0:
        res += 1


print(res)

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

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

count = 1

for i in range(1, n): 
    tmp = 0
    for j in range(i): 
        if h[j] <= h[i]:
            tmp += 1
    if tmp == i:
        count += 1

print(count)

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

*H, = map(int, input().split())
count = 0
flg = 1
for i in range(len(H)):
    flg = 1
    for j in range(0,i,1):
        if H[i]>=H[j]:
            continue
        else:
            flg = 0
            break
    if flg==1:
        count = count + 1
    
print(count)

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

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

print(ans)

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



if __name__ == '__main__':
	main()

Solution (Python):
from itertools import accumulate
from operator import eq
N = int(input())
H = list(map(int, input().split()))
print(sum(map(eq, H, accumulate(H, max))))

Solution (Python):
input()
lst=[int(i) for i in input().split()]
ans=0
_max=lst[0]
for i in lst:
  if i>=_max:
    ans+=1
    _max=i
print(ans)

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

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

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

c = 0
m = 0
for i in A:
    if i>=m:
        c += 1
        m = i
print(c)

Solution (Python):
N = int(input())
H = list(map(int, input().split()))
Hr = H[::-1]
cnt = 0


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

print(cnt)

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

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

ans = 0
for r in range(1, N):
    ok = True
    for l in range(r):
        if H[l] > H[r]:
            ok = False
    if ok:
        ans += 1
print(ans+1)

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

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

for i in range(1,n):

    if h[i] >= max(h[:i]):
        cnt += 1

print(cnt)

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

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

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

Solution (Python):

import math
import sys
input = sys.stdin.readline
def yes():
    print("Yes")
def no():
    print("No")


n = int(input())
H = list(map(int, input().split()))
ans = 1
flag = True

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

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

Solution (Python):
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7



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

cummax = list(itertools.accumulate(H, max))
H = np.array(H, dtype=int)
cummax = np.array(cummax, dtype=int)
ans = np.count_nonzero(H >= cummax)
print(ans)

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

print(ans)

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

max_h = H[0]
for h in H:
    if h >= max_h:
        viewable.append(1)
    else:
        viewable.append(0)
    max_h = max(max_h, h)

ans = sum(viewable)
print(ans)

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

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



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

Solution (Python):
def solve():
    N, *H = map(int, open(0).read().split())
    
    ans, h_max = 1, H[0]
    for i in range(1, N):
        if h_max <= H[i]:
            ans += 1
            h_max = max(h_max, H[i])
    print(ans)


if __name__ == '__main__':
    solve()

Solution (Python):
N, *L,  = [list(map(int, s.split())) for s in open(0)]
N = N[0]
L = L[0]
num_view = 1
for i in range(1, N):
    not_view = 0
    for j in range(0, i):
        if L[i] < L[j]:
            not_view += 1
            
    if not not_view:
        num_view += 1
print(num_view)

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())
li_H = list(map(int, input().split()))
count = 1
max = li_H[0]
for i in range(1, N):
    if li_H[i] >= max:
        count += 1
        max = li_H[i]
print(count)

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

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

Solution (Python):

import sys
import itertools
import math

i=0
N=int(input())











T_dummy_list=[]
sentence_list=[]
total=0
mojiretu=""















i=0
j=0











can_see=0
hight_list =  list(map(int, input().split(" ")))
for i in range(len(hight_list)):
     
     for j in range(i+1):
      if hight_list[i] >= hight_list[j]:
         pass
         if j==i:
          can_see +=1
      else:
          break

print(can_see)

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

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

print(ans)

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

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

Solution (Python):
input()
count = 0
B = []
A = list(map(int,input().split()))
for i in A:
  B.append(i)
  if max(B) <= i:
    count += 1
  else:
    pass
print(count)

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

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

Solution (Python):
n, h = int(input()), [0] + list(map(int, input().split()))
print(len([i for i, x in enumerate(h[2:], start=2) if max(h[:i]) <= h[i]]) + 1)

Solution (Python):

n, h = int(input()), list(map(int, input().split()))
print(len([i for i, x in enumerate(h) if (i == 0) or ((i == 1) and (h[0] <= h[i])) or ((i > 1) and (max(h[:i]) <= h[i]))]))

Solution (Python):

n = int(input())
h = list(map(int, input().split()))
print(len([i for i, x in enumerate(h) if (i == 0) or ((i == 1) and (h[0] <= h[i])) or ((i > 1) and (max(h[:i]) <= h[i]))]))

Solution (Python):

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

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

print(ans)

Solution (Python):

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

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

print(ans)

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

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

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

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

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

for i in range(n):
    f=True
    for j in range(i):
        if h[j]>h[i]:
            f=False
    if f:
        c+=1
print(c)

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

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

print(ans)

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

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

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

h_max = 0
m = 0

for h in hs:
  if h >= h_max:
    h_max = h
    m += 1

print(m)

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

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

print(ans)

Solution (Python):
n=int(input())
h=list(map(int,input().split()))
m=0
for i in range(n):
    f=True
    for j in range(i):
        if h[j]>h[i]:
            f=False
            break

    if f:
        m+=1
print(m)

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

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

print(cnt)