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()))
def gov(n, h):
    ans = 1
    for i in range(1, n):
        cnt = 0
        for j in range(i):
            if h[j] == max(h[i], h[j]) and h[i] != h[j]:
                break
            cnt += 1
        if cnt == i:
            ans += 1
    return ans
print(gov(n, h))

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

Solution (Python):
n = raw_input()                                    

ar = []                                            
h = raw_input().split()                            

cnt = 0                                            
m = 0
for i in h:
    i = int(i)                                     
    if (i >= max(m, i)):
        cnt += 1                                   
        m = i

print cnt

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

SUM = 1
for i in range(1,len(H)):
  if sum([h > H[i] for h in H[:i]]) == 0 :
    SUM += 1
print(SUM)

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

maxH = 0
count = 0

for h in hight:
    if(maxH <= h):
        count += 1
        maxH = h

print(count)

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

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

Solution (Python):


a = int(input())

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

height = mountains[0]
sum = 1
for i in range(1,a):
    if mountains[i] >= height:
        sum += 1
        height = mountains[i]


print(sum)

Solution (Python):
l = int(input())
c = 1
b4most = 0
answer = 0
ryokan = list(map(int, input().split()))
for data in ryokan:
    if b4most <= data:
        answer += 1
        b4most = data
print(answer)

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

tmp = 0
ans = 0

for h in H:

    if h >= tmp:
        tmp = h
        ans += 1

print(ans)

Solution (Python):

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

n = 0
Hmax = 0

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

print(n)

Solution (Python):
H =  input()
a = list(map(int,input().split()))
counter =0
for i, n in enumerate(a):
  if i ==0:
    counter +=1
  elif i!=0 and max(a[:i])<=n:
    counter +=1
print (counter)

Solution (Python):

n = int(input())
hotels = [int(hotel) for hotel in input().split()]

highest = hotels[0]
hasOceanView = 0
for hotel in hotels:
  if hotel >= highest:
    hasOceanView += 1
    highest = hotel

print(hasOceanView)

Solution (Python):
ryokan = int(input())
height = input().split()

counter = 1
tmp = int(height[0])

for i in range(1, ryokan):
    if int(height[i]) > tmp:
        tmp = int(height[i])
    if int(height[i]) >= tmp:
        counter += 1

print(counter)

Solution (Python):
num = int(input())
height = list(map(int,input().split()))
SUM = 1
comp = height[0]

for i in range(1,num):
  if comp <= height[i]:
    comp = height[i]
    SUM += 1

print(SUM)

Solution (Python):

"""
Created on Sat Apr 13 09:52:55 2019

@author: Owner
"""

import collections
import scipy.misc
import sys
import numpy as np
import math
from operator import itemgetter
import itertools
import copy
import bisect


def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   

def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

def find_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default


"""
N, X = map(int, input().split())

x = [0]*N
x[:] = map(int, input().split())

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())

    
all(nstr.count(c) for c in '753')


ABT = zip(A, B, totAB)
result = 0

sorted(ABT,key=itemgetter(2))
A, B, totAB = zip(*ABT)
A.sort(reverse=True)


(x >> i) & 1


dp = [np.inf]*N
for n in range(N):
    if n == 0:
        dp[n] = 0
    else:
        for k in range(1,K+1):
            if n-k >= 0:
                dp[n] = min(dp[n], dp[n-k] + abs(h[n]-h[n-k]))
            else:
                break

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

def main():
    cnt = 0
    tmp_max =0
    for n in range(N):
        if tmp_max <=H[n]:
            tmp_max = H[n]
            cnt+=1
    print(cnt)
 
if __name__ == '__main__':
    main()

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

c = 0

if len(h)==1:
    print(1)
else:
    m = h[0]
    for i in h:
        if i>=m:
            c += 1
            m = i

    print(c)

Solution (Python):


N = int(input())
H = list(map(int,input().split()))
maxnum = 0
count = 0
for Hi in H:
    if Hi >= maxnum:
        count += 1
        maxnum = Hi

print(count)

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

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

Solution (Python):
countH = 0
N = int(input())
H_lists = map(int,input().split(" "))
max_tmp=0
for Hi in H_lists:
    if Hi>=max_tmp:
        countH+=1
        max_tmp=Hi        
print(countH)

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

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

count = 1

for n in range(1 , N):
	for j in range(n):
		B = True
		if H[j] > H[n]:
			B = False
			break
	if B == True:
		count += 1

print(count)

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

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

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

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

counter = 1
for i in range(1, N):
    flag = 1
    for j in range(i):
        if h[i] - h[j] < 0:
            flag = 0
    if flag == 1:
        counter += 1

print(counter)

Solution (Python):
N=int(input())
H = [int(i) for i in input().split()]
ans = 0
check = [0 for _ in range(N)]

for i in range(N):
    for j in range(i):
        if H[j] <= H[i]:
                check[i] = int(check[i]) + 1
    if check[i] == i:
        ans +=1

print(ans)

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

count = 1 
No = True
for i, hi in enumerate(H):
    if i == 0:
        continue
    No = True
    for j in range(0, i):
        if H[j] > hi:
            No = False
            break
    if No:
        count += 1
print(count)

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

Solution (Python):
x=int(input())
li = list(map(int,input().split()))
i=0
c=0
a=1
for n in li:
  while c<i:
    if li[c]>n:
      break
    c+=1
    if c==i:
      a+=1
  c=0  
  i+=1
print(a)

Solution (Python):

Num = int(input())
Hights = input().split()
hotels = 0

curHight = 0

for i in range(Num):
    if curHight <= int(Hights[i]):
        hotels+=1
        curHight = int(Hights[i])
        
print(hotels)

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())
hotels = [int(i) for i in input().split()]
count = 0
max_height = 0
for i in range(len(hotels)):
    if i == 0:
        count += 1
        max_height = hotels[0]
    else:
        if hotels[i] >= max_height:
            count += 1
            max_height = hotels[i]
print(count)

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

cnt=0

for i,h in enumerate(hotel):

    flg = 1
    for j in range(i+1):

        if h < hotel[j]:
            flg = 0
            break

    if flg == 1:
        cnt += 1

print cnt

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

c = 0

for i in range(N):
    d = 0

    for j in range(i):
        
        if H[i] > H[j] or H[i] == H[j]:
            d += 1
    if d == i:
        c += 1
print(c)

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

for i in range(1, n):
    s = True
    for j in range(i):
        if h[i] < h[j]:
            s = False
            break
    if s:
        a += 1

print(a)

Solution (Python):
num = int(input())
height_raw = input().split()
height = []
for a in range(num):
  height.append(int(height_raw[a])) 

counter = 0
max_height = 0

for b in range(num):
  if height[b]>=max_height:
    max_height = height[b]
    counter += 1

print(counter)

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

h = list(map(int,input().split(sep=" ")))

ans=0

for i in range(len(h)):
    tmp = h[0:i+1]
    if(h[i] == max(tmp)):
        ans += 1


print(ans)

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

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

print(counter)

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

ans = 0

for i in range(len(h)):
    flag = True
    for j in range(len(h) - i):
        if h[len(h)-i-1] < h[j]:
            flag = False
            break
    if flag:
        ans += 1

print(ans)

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

counter = 0
for i in range(N):
    if i == 0:
        counter += 1
    if i > 0:
        max_before_i = max(H_list[:i+1])
        if max_before_i <= H_list[i]:
            counter += 1

print(counter)

Solution (Python):




N = int(input())

input_list = input().split()

base = 0
count = 0

for i in input_list:
    num = int(i)

    if base <= num:
        count += 1
        base = num

print(count)

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

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

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

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

maxh = h[0]
count = 1

for i in range(1,len(h)):
    if maxh <= h[i]:
        maxh = h[i]
        count = count + 1

print(count)

Solution (Python):
import sys

stdin = sys.stdin

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

n = ni()
h = na()

c = 1
maxh = h[0]
for i in range(n-1):
    if maxh <= h[i+1]:
        c += 1
        maxh = h[i+1]

print(c)

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

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

print(answer)

Solution (Python):
n = int(input())
l = [int(i) for i in input().split()]
flag = 0
for i in range(n):
  l_h = l[:i+1]
  if l_h[i] == max(l_h):
    flag +=1
print(flag)

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

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

Solution (Python):


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

max = h[0]
cnt = 1

for i in range(len(h)-1):
  if max <= h[i+1]:
    max = h[i+1]
    cnt += 1

print(cnt)

Solution (Python):
N = int(input())
mountain_list = list(map(int, input().split()))
highest = 0
count = 0
for x in mountain_list:
    if x >= highest:
        count += 1
        highest = x

print(count)

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

Solution (Python):
n = int(input())
test = list(map(int,input().split()))
counter = 0
    
for i in range(len(test)):
    test2 = test[:i+1]
    if max(test2) == test2[-1]:
        counter += 1
        
print(counter)

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

highest = 0
can_sea_hotels = 0

for i in range(len(H)):
    if highest <= H[i]:
        highest = H[i]
        can_sea_hotels += 1
    
print(can_sea_hotels)

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

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

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

print(ans)

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

Solution (Python):
N = int(input())
yamas = [int(j) for j in input().split()]
highest = 0
mountains = 0

for i in range(N):
    if yamas[0] >= highest:
        mountains += 1
        highest = yamas[0]
        yamas = yamas[1:]
    else:
        yamas = yamas[1:]

print(mountains)

Solution (Python):
N = input();
l = map(int, raw_input().split());
ans = 1;

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

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

max = summit[0]
sum = 1
for i in range(n-1):
    if max <= summit[i+1]:
        
        max = summit[i+1]
        sum = sum + 1
print(sum)

Solution (Python):

import copy
import numpy as np
import random
import bisect 
import math


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


ans = 0
for i in range(N):
    base = H[i]
    check = True
    for j in range(N):
        if i<=j:
            pass
        else:
            if H[i]>=H[j]:
                pass
            else:
                check = False
                break
    if check:
        ans += 1

print(ans)

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

ans = 0
for num, i in enumerate(h):
    add = True
    for j in range(num):
        if h[j] > i:
            add = False
    if add:
        ans += 1

print(ans)

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

Solution (Python):
num = int(input())
mtlist = [int(x) for x in input().split()]
mtmax = 0
view = 0

for i in range(num):
  if mtlist[i] > mtmax:
    mtmax = mtlist[i]
    view = view +1
  elif mtlist[i] == mtmax:
    view = view +1
  else:
    continue
    
print(view)

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

print(cnt)

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

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

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




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



COUNT = 0
for i in range(NUM):
    PRECOUNT = 0
    
    for j in range(NUM-i):
        if A[NUM - i - 1] >= A[j]:
            PRECOUNT += 1
   
    if PRECOUNT == NUM-i:
        COUNT += 1
print(COUNT)

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

max_height = 0
counter = 0

for n in range(N):
    if max_height <= height_list[n]:
        counter += 1
        max_height = height_list[n]
        continue
print(counter)

Solution (Python):
N = int(input())
h_list = [int(i) for i in input().split()]
ans = 0
for i in range(N):
    h_i = h_list[i]
    for j in range(i+1):
        h_j = h_list[j]
        if h_j > h_i:
            break
    else:        
        ans += 1
print(ans)

Solution (Python):
N = int(input())
H = list(map(int, input().split()))
result = 1
h = H[0]

for i, h1 in enumerate(H):
    if i < len(H)-1:
        h2 = H[i+1]
    else:
        break
    if h <= h2 and h1 <= h2:
        h = h2
        result += 1

print(result)

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

Solution (Python):
N = int(input())
H = [int(i) for i in input().split()]
maxH = H[0]
total = 1
for h in H[1:]:
  if h >= maxH:
    total += 1
    maxH = h
print(total)

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

for i in range(lst_len-1,0,-1):
    if(h_lst[i]>=h_lst[i-1] and h_lst[i]>=max(h_lst[:i])):
        ans += 1

print(ans)

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

max_h=0
count=0
for i in h_list:
    if max_h <= i:
        max_h = i
        count += 1

print(count)

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

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

print(count)

Solution (Python):



n = int(input())
l = [int(e) for e in input().split()]

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

print(count)

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

Solution (Python):
n = int(input())
nums_str = input()
nums_str_arr = nums_str.split(' ')

max_height = 0
count = 0

for i in range(n):
    num = int(nums_str_arr[i])
    if max_height <= num:
        count += 1
        max_height = num

print(count)

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

Solution (Python):
n = (int(input())+1)
h = [int(i) for i in input().split()]
i,j,n=0,0,n-1
max=h[0]
while i<n:
  if h[i]>=max :
    j+=1
    max=h[i]
  i+=1
print(j)

Solution (Python):
import sys
import io
import math
import re

datalist = input().split()
num_summit = int(datalist[0])

max_height = 0
num_available_site = 0

datalist = input().split()
for num in range(num_summit):
  height = int(datalist[num])
  if height >= max_height:
      max_height = height
      num_available_site += 1

print(num_available_site)

Solution (Python):
N=int(input())
ans=1
a=0
X=[int(i) for i in input().split()]
for i in range(1,N):
    check=True 
    for j in range(0,i):
        if(X[i]<X[j]):
            check=False
            continue
    if(check):
        ans+=1
print(ans)

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

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

Solution (Python):
N=int(input())
yama=[]
count=1
yama= list(map(int,input().split()))
max=yama[0]
for x in range(1,N):
    if max<=yama[x]:
        count+=1
        max=yama[x]

print(count)

Solution (Python):






import numpy as np





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





count = 1

for i in range(1,N):
    
    if np.all(H[i] >= H[:i]):
        count += 1

print(count)

Solution (Python):
from sys import stdin
N = int(stdin.readline().rstrip())
H = map(int, stdin.readline().rstrip().split())
i = 0
high = 0
for h in H:
    if not(h < high):
        i+=1
        high = h
print(i)

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

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

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

print(num)

Solution (Python):
n = int(input())
*q, = map(int,input().split())
ans = [q[0]]
mh = q[0]
for i in range(1,n):
  if q[i] >= mh:
    ans.append(q[i])
    mh = q[i]

print(len(ans))

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

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

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

print(c)

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

ans = 1
maxH = HList[0]

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

print(ans)

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
ans=1
LN = [L[0]]
for k in range(1,N):
  if max(LN) <= L[k]:
    ans += 1
  LN.append(L[k])
print(ans)

Solution (Python):
inp = []
n = int(input())
ii = [int(f) for f in input().split()]
a = 1
for d in range(n-1):
    ff = ii[:d+1]
    ff.sort()
    if ff[d] <= ii[d+1]:
        a += 1
print(a)

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

result = 1
for i in range(1, N):
    if max(H[0:i + 1]) == H[i]:
        result += 1
    else:
        pass
print(result)

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

l = 0
res = 0

for h in H:
    if h >= l:
        res += 1
        l = h

print(res)

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

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

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

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

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

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

Solution (Python):

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

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


k = 0
h = []

for i in range(N):
	h.append(H[i])
	if H[i] == max(h):
		k += 1
	else:
		k += 0

print(k)

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

ans = 1

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

print(ans)

Solution (Python):

n = int(input())
h = list(map(int, input().split()))
counter = 0
for i in h:
    if counter == 0:
        counter = counter + 1
        max_h = i
    else:
        if max_h <= i:
            counter = counter + 1
            max_h = i
        else:
            pass
print(counter)

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

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

print(ans)

Solution (Python):


n = int(input())

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

count = 1

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

print(count)

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

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

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

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

ans = 0

for i, h in enumerate(_h):
    if i == 0:
        max_h = h
        ans = ans + 1
        continue
    
    if h < max_h:
        continue
    else:
        max_h = h
    
    if h >= _h[i-1]:
        ans = ans + 1

print(ans)

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

obstacle = []
obstacle.append(H[0])

ans = 1
for i in range(1,N):
  for j in obstacle:
    if j > H[i]:
      obstacle.append(H[i])
      break
  else:
    obstacle.append(H[i])
    ans += 1
    
print(ans)

Solution (Python):
n=int(input());a=list(map(int,input().split()))
s=[]
l=0
for e in a:
  if len(s)>0:
    if all([e>=c for c in s]):
      l+=1
  s.append(e)
print(l+1)

Solution (Python):
N = input()
HH = [int(i) for i in input().split()]
Hmax = -1
k = 0
for H in HH:
    if H >= Hmax:
        k += 1
        Hmax = H
print(k)

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

ans = 1
highest = Mts[0]
for i in range(1, len(Mts)):
    if highest <= Mts[i]:
        ans += 1
        highest = Mts[i]

print(ans)

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

maxindex = lista[0]
for index in lista:
    if maxindex < index:
        maxindex = index
    if index >= maxindex:
        count += 1
print(count)

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

Solution (Python):
n = int(input())
mountains = list(input().split())
mountains = [int(i) for i in mountains]
ans = 0
idx = 0
for i in mountains:
    if i == max(mountains[:idx+1]):
        ans += 1
    idx += 1

print(ans)

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

N=int(input())
H=list(map(int,input().split()))
m=H[0];c=0
for i in range(0,N):
  if (H[i]>=H[0])and(H[i]>=m):
    c+=1
    m=max(H[0],H[i])
print(c)

Solution (Python):
n = int(input())
l = input().split()
cnt = 0
max = 0
for i in l:
    if max <= int(i):
        max = int(i)
        cnt += 1
print(cnt)

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

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

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

print(x)

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




x=0
B=A[0]
for i in range(N):
    if B<=A[i]:
        x+=1
        B=A[i]

print(x)

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

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

Solution (Python):
n=input();*h,=map(int,input().split());p=h[0];c=1
for e in h[1:]:
 if e>=p:c+=1
 p=max(p,e)
print(c)

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

arr = list(map(int,input().split(" ")))

mx,c = 0,0

for i in range(n):
	if(arr[i]>=mx):
		c += 1
		mx = arr[i]


print(c)

Solution (Python):
N=int(input())
X=[int(i) for i in input().split()]
ans=1
A=X.pop(0)
for i in X:
  if i >= A:
    ans+=1
    A=i
print(ans)

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

for mt in h:
    if mt >= highest:
        highest = mt
        counter += 1
print(counter)

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

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

for i in range(len(h)):
    for j in range(i + 1):
        if h[i] < h[j]:
            break
        if j == i:
            count += 1

print(count)

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

count = 1

for i in range(2, N+1):
    west_heights = h[1:i]
    if h[i] >= max(west_heights):
        count += 1

print(count)

Solution (Python):



import itertools

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

cnt = 0
prev_max_height = 0

for h in H:
    if prev_max_height <= h:
        prev_max_height = h
        cnt += 1

out = cnt

print(out)

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