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()))
ans = 1
for i in range(N):
    if i==0:
        pass
    else:        
        i_bool = True
        for j in range(1,i+1):
            if H[j-1] > H[i]:
                i_bool = False
        if i_bool:
            ans+=1
print(ans)

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


def can_get_ocean_view(subheights):
    return 1 if max(subheights) == subheights[-1] else 0


def count_hotels_with_ocean_view(heights):
    hotels_with_ocean_view = [can_get_ocean_view(heights[:i]) for i in range(1, len(heights)+1)]
    return sum(hotels_with_ocean_view)


print(count_hotels_with_ocean_view(heights))

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

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

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[j] > h[i]:
            flag = False
            break
    if flag:
        ans += 1

print(ans)

Solution (Python):

import numpy as np

N = int(input())
if (isinstance(N, int) != True) or (N < 1) or (N > 20):
    exit()
h = np.array([int(i) for i in input().split()])
if (np.any(h<1)==True) or (np.any(h>100)==True):
    exit()
c = 0
for j in range(len(h)):
    if j == 0:
        max = h[0]
        c += 1
        pass
    elif h[j] >= max:
        max = h[j]
        c += 1
print(c)

Solution (Python):
n = int(input())
h = tuple(map(int,input().split()))
count = 1
mosthigh = h[0]

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

print(count)

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


h1 = Hs.pop(0)
hmax = h1
hotel_cnt = 1

for i,h in enumerate(Hs):
    if hmax <= h:
        hotel_cnt += 1
        hmax = h

print(hotel_cnt)

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

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

Solution (Python):
import numpy as np
N = int(input())
A = list(map(int,input().split()))
B = np.array(A)
count = 0
for i in range(1,N):
    if max(B[:i])<=B[i]:
        count +=1
print(count+1)

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

count = 0

for i in range(n):
	over = False
	for j in range(i):
		if h[j] > h[i]:
			over = True

	if not over:
		count += 1

print(count)

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

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

print(ans)

Solution (Python):
N, *h = map(int, open(0).read().split()) 

max = 0
count = 0
for i in h:
    if (i >= max):
        count = count + 1
        max = i
print(count)

Solution (Python):
N = int(input())
H = list(map(int,input().strip().split(" ")))
maxH = H[0]
look = 1
for i in range(N-1):
  if H[i+1] >= maxH:
    look = look + 1
    maxH = H[i+1]
print(look)

Solution (Python):
import numpy as np
N = int(input())
H = np.array(list(map(int, input().split())))
tmp = []
for i in range(1, len(H)):
    tmp.append(all(H[:i]<=H[i]))
print(sum(tmp)+1)

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

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

Solution (Python):
trip = int(input())
sumiit = [int(i) for i in input().split()]
count = 1
for i in range(1, trip):
    jug = []
    for n in range(0, i):
        if sumiit[n] <= sumiit[i]:
            jug.append(True)
        else:
            jug.append(False)
    if all(jug):
        count += 1
print(count)

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

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

Solution (Python):
N = int(input())
ListH = list(map(int,input().split()))
result = 0
for i in range(N):
    out = False
    for k in range(i):
        if k >= 0:
            if ListH[k] > ListH[i]:
                out = True
    if not out :
        result += 1
print(result)

Solution (Python):
def main():
	N = int(input())
	Hi = list(map(int, input().split()))
	current_max = 0
	ans = 0
	for h in Hi:
		if h >= current_max:
			ans += 1
			current_max = h
	print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
def mountain(s):
    k = 1
    c = s[0]
    for i in range(len(s)-1):
        if s[i+1]>=c:
            c = s[i+1]
            k = k+1
    return k
a=input()
s=list(map(int, input().split()))
print(mountain(s))

Solution (Python):
line_len = int(input())
s = input().rstrip().split(' ')
inns = []
ans = 1
for i in range(line_len):
    inns.append(int(s[i]))
for i in range(1,line_len):
    for x in range(i):
        total = 1
        if inns[x] > inns[i]:
            total = 0
            break
    ans = ans + total
print(ans)

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

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

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

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

for i in range(1,n):
	for j in range(i):
		if l[i] >= l[j]:
			if i -1 == j:
				ok += 1
			
		else:
			break

print(ok + 1)

Solution (Python):
it = int(input())
lists = list(map(int,input().split()))
x = 0
i = it 

for j in range(i):
  listo = lists[:j+1]
  if max(listo) == lists[j]:
    x += 1
  else:
    continue

print(x)

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

cnt = 0

for index, now in enumerate(inp):
	flag = 0
	for j in range(index):
		
		if inp[j] > now:
			flag = 1
	
	if flag == 0:
		cnt += 1

print(cnt)

Solution (Python):
n=int(input())
h_list=[int(i) for i in input().split()]
b = 1  
c = 1  
m = h_list[0]  
while b != n:
    if h_list[b] >= m:
        m = h_list[b]
        c += 1
    b += 1
print(c)

Solution (Python):
g=1
y=0
a=int(input())
b=list(input().split())
h=int(b[0])
for i in range(1,a):
  if int(b[i-1])<=int(b[i]) and h<=int(b[i]) and y<=int(b[i]):
    y=int(b[i])
    g+=1
print(g)

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

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

Solution (Python):
N = int(input())
h = [int(i) for i in input().split()]
count = 1
tmp = h.copy()
for i in range(1, N):
    y = h[i]
    m = max(h[:i])
    if y >= m:
        count += 1
    

print(count)

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

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

Solution (Python):


import re

a = int(input())

b = input()
b = re.split(" ",b)

max = int(b[0])
ans = 0
for i in range(a):
    if(int(b[i]) >= max):
        max = int(b[i])
        ans += 1
print(ans)

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

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

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

for i in range(1, n):
    if h[i] >= max(h[:i]):
        ans_index.append(i)

print(len(ans_index))

Solution (Python):


import sys
import copy

input = sys.stdin.readline



N = int(input())

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

ans = 0

for i in range(N):
    good = True
    for j in range(i):
        if H[j] > H[i]:
            good = False
    ans += good

print(ans)

Solution (Python):

N = int(input())

Mountain_list = map(int, input().split() )

Max_hight  = 0
Ocean_view = 0


for i, Mountain in enumerate(Mountain_list):
	if i == 0:
		Ocean_view += 1
		Max_hight = Mountain
		continue



	if Max_hight <= Mountain:
		Max_hight = Mountain
		Ocean_view += 1





	




print(str(Ocean_view))

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

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

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

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

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(0,i):
        if h[i] < h[j]:
            flag = False
            break
    if flag:ans += 1
print(ans)

Solution (Python):
num = int(input())
mountainList = list(map(int,input().split()))
sum = 0
max = 0

for mount in mountainList:
  if(mount >= max):
    sum += 1
  if(mount > max):
    max = mount
    
print(sum)

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

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

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

for i in range(N):
    for j in range(i):
      if H[i]>=H[j]:
        y+=1
    if y>=i:
        x+=1
    y=int(0)

print(x)

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
            break
    if c==0:
        ans+=1
print(ans)

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

score = 1

h1 = h_list[0]
max_h = h_list[0]
for i in range(1, n):
    h_i = h_list[i]
    if h_i >= h1 and h_i >= max_h:
        score += 1
        max_h = h_i
print(score)

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

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

num_ryokan = 0
max_height = 0

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

print(num_ryokan)

Solution (Python):
h = int(input())
mount = [int(_) for _ in input().split()]
count = 0
for i in range(h):
  if i == 0:
    count += 1
  else:
    for j in range(i):
      if mount[i]<mount[j]:
        break
    else:
      count += 1
print (count)

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

for i in H_list:
    if max1 <= i:
        max1 = i
        count += 1

print(count)

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

max_h = 0
ans = 0

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

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
    max_h = max(max_h, h[i])
    
print(ans)

Solution (Python):
n,*h=map(int,open(0).read().split());print(sum(h[i]>=max(h[:i+1])for i in range(n)))

Solution (Python):


import sys
input = sys.stdin.readline

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


ans = 0

for i, h in enumerate(H):
    flag = True

    for x in range(i):
        if h < H[x]:
            flag = False
        
    if flag:
        ans += 1

print(ans)

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

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

Solution (Python):
data = int(input())
list1 = list(map(int,input().split()))
s = 0
for i in range(data-1):
  if list1[i+1] >= max(list1[:i+1]): 
    s = s + 1
  else:
    None
print(s+1)

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

cnt = 0

for i, v in enumerate(h):
    if v >= max(h[0:i+1]):
        cnt += 1


print(cnt)

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

i = 0
while i < len(H) - 1:
    if H[i] > H[i + 1]:
        del H[i + 1]
    else:
        i += 1
        if i >= len(H) - 1:
            break

print(len(H))

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
maxIndex = [i for i, x in enumerate(a) if x == max(a)]
c = a[:maxIndex[-1]+1]
max = c[0]
r = len(c)
cnt = 0
for t in c:
  if max <  t:
    max = t
  if max > t:
    cnt += 1
print(r - cnt)

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

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

count = 0
max_H = 0

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

print(count)

Solution (Python):
N = int(input())
i = 0
max = 0
cnt = 0
for x in input().split():
  x = int(x)
  if x >= max:
    cnt = cnt + 1
    max = x

print(cnt)

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

for i in range(1, N):
    f = True
    for j in range(0, i):
        if H[j] > H[i]:
            f = False
            break
    if f:
        count += 1
print(count)

Solution (Python):
N = input()
l = input().split()


result = 0

for i in range(len(l)):
    flg = 0

    if i == 0:
        result = 1
    else:
        for j in range(0, i):
            if int(l[i]) < int(l[j]):
                flg = 1

        if flg == 0:
            result = result + 1

if len(l) <= 20:
    print(result)

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

count = 1
for i, h in enumerate(H[1:], 1):
    if sum([1 for j in range(i) if h >= H[j]]) == i:
        count += 1

print(count)

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

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

Solution (Python):


import sys
input = sys.stdin.readline

def io_generator():
	return input()



def main(io):
	n=int(io())
	hs = list(map(int, io().split()))
	max_h=0
	nn=0
	for i, h in enumerate(hs):
		if h >= max_h:
			nn+=1
			max_h=h
	return nn



if __name__ == "__main__":
	io= lambda : io_generator()
	print (main(io))

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

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

Solution (Python):


N = int(input())

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

ans=1

for i in range(1,N,1):
  
  look_flag=0
  

  for j in range(0,i,1):
    
    if high_list[j] > high_list[i]:
      look_flag=1
      
      break
  
  if look_flag != 1:
    
    ans=ans+1
  
print(ans)

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

res = 0
for indexa, valuea in enumerate(a):
  for indexb, valueb in enumerate(a):
    if valuea < valueb and indexa != indexb:
      break
    if indexa == indexb:
      res += 1

print(res)

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

Solution (Python):
def main():
    n = int(input())
    h_n = [int(s) for s in input().split()]

    cnt = 0
    for i in range(0, n):
        diff = [h_n[i] - h_n[j] for j in range(0, i)]
        cnt = cnt + 1 if len(list(filter(lambda x: x < 0, diff))) == 0 else cnt

    print(cnt)

    
main()

Solution (Python):
a = input().split()
N = list(map(int,input().split()))
A = int(a[0])

counter = 1

for i in range(2,A+1):
  N_new = N[0:i]
  N_new_len = len(N_new)
  if max(N_new) == N_new[int(N_new_len)-1]:
    counter += 1
print(counter)

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

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

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

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

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

Solution (Python):

N = int(input())
Hx = input().split()

maxmount = 0
num = 0

for i in range(N):
    if maxmount<=int(Hx[i]):
        num = num+1
        maxmount = int(Hx[i])

print(num)

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

Solution (Python):
N = int(input())
acc_max = 0
cnt = 0
all_list = list(map(int, input().split()))

for x in all_list:
  if x >= acc_max:
    cnt += 1
    acc_max = x
    
print(cnt)

Solution (Python):
n=int(input())
h = [int(x) for x in 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()))
ans = 0
for i in range(n):
    flag = True
    for j in range(i):
        if h[j] > h[i]:
            flag = False
    if flag:
        ans += 1
print(ans)

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

h=[]
h.append(input().split())
ans =1
check_flag=0

for i in range(n):
	if i ==0:
		continue
	for  k in range(i):
		if int(h[0][i]) < int(h[0][k]):
			check_flag = 1
	if check_flag !=1:
		ans +=1
	check_flag=0
print(ans)

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

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    n = int(input())
    h_list = [int(i) for i in input().split()]
    print(
        1 + len([i for i, h in enumerate(h_list[1:], start=1) if h >= max(h_list[:i])])
    )


if __name__ == "__main__":
    main()

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

r = 1
for i in range(1, n):
    for j in range(0, i):
        if lst[i] >= lst[j]:
            pass
        else:
            break
        if i == j + 1:
            r += 1

print(r)

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

h = l[0]
c = 0
for i in range(N):
  for j in range(i+1):
    if l[i] < l[j]:
      break
    if j == i:
      c += 1
print(c)

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

count = 0
counter = 0
for num in range(N):
    for num1 in range(num):
      if numbers[num] >= numbers[num1]:
        counter += 1
      else:
        continue
    if counter == num:
      count += 1
    counter = 0

print(count)

Solution (Python):
n = int(input())
hs = map(int, input().split())
l = -1
ret = 0
for h in hs:
    if h >= l:
        ret += 1
        l = h
print(ret)

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

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

def main():
    count = 1

    for i in range(len(li)):
        
        for j in range(i):
            if li[j] > li[i]:
                
                break
            elif j == i-1:
            
                count += 1
            
            
            
            

    print(count)

if __name__ == '__main__':
    main()

Solution (Python):
num = int(input())
high_arr = list(map(int, input().split()))
result = 0
max = 0

for temp in high_arr:
    if temp >= max:
        result += 1
        max =temp
print(result)

Solution (Python):


n=int(input())
l=input().split(" ")
L=[]
for i in l:
    t=int(i)
    L.append(t)
ans=0
for i in range(n):
    k=0
    while(k<=i):
        if(L[i]<L[k]):
            break
        
        if(k==i):
            ans+=1
        k+=1
print(ans)

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

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

for i in H:
  if i >= standard:
    standard = i
    counter += 1
    
print(counter)

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

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

print(ans)

Solution (Python):
_ = input()
hs = [int(i) for i in input().split(" ")]
res = 0
s = 0
for h in hs:
    if s <= h:
        s = h
        res += 1

print(res)

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

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

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


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

Solution (Python):
def chc(H,now):
    if(now == 0):
        return True
    else:
        for i in range(now):
            if(H[i]>H[now]):
                return False
        return True


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

counter = 0
for i in range(N):
    if(chc(H,i)):
        counter += 1

print(counter)

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

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

print(ans)

Solution (Python):
num = int(input())
list = [int(i) for i in input().split()]
sum = 0
for j in range(num):
  list1 = list[:j+1]
  
  
  
  if max(list1) == list1[-1]:
    sum += 1
  else:
    pass
print(sum)

Solution (Python):
from sys import stdin

readline = stdin.readline
_ = readline()

cnt = 0
m = 0
for h in map(int, readline().split()):
    if h >= m:
        m = h
        cnt += 1
print(cnt)

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

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

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

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

c=0
b=0
for i in h:
	if i >= b:
		c+=1
		b=i
print(c)

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+1):
    if h[i]>=h[j]:
      count+=1
  if count==i+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 max(H[:i]) <= H[i]:
    ans += 1
print(ans)

Solution (Python):


num = int(input())
columns = list(map(int, input().rstrip().split(' ')))
count = num
x = num
for h in columns:
    
    for i in columns[0:-x]:
        
        if h < i:
            count -= 1
            break
    x -= 1
print(count)

Solution (Python):
N, *H = map(int, open(0).read().split())
ma = [H[0]]
for hi in H[1:]:
    ma.append(max(hi, ma[-1]))
cnt = 1
for i in range(1, N):
    cnt += H[i] >= ma[i - 1]
print(cnt)

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

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

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

Solution (Python):
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def _I(): return int(sys.stdin.readline())
def _F(): return float(sys.stdin.readline())
def pf(s): return print(s, flush=True)

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

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


count=0
high=0
for i in H:
    if(high<=i):
        high=i
        count+=1
print(count)

Solution (Python):

def read_input():
    n = int(input())
    hs = list(map(int, input().split()))

    return n, hs



def check_max(hs, index):
    check_hs = hs[:index + 1]
    max_hight = max(check_hs)
    return hs[index] >= max_hight

if __name__ == '__main__':
    n, hs = read_input()

    count = 0
    for i in range(n):
        if check_max(hs, i):
            count += 1

    print(count)

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

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

for z in y:
    h.append(z)

v = 1
f = h[0]
for i in range(n):
    if i != 0:
        if f <= h[i]:
            if f < h[i]:
                v += 1
                f = h[i]
            else:
                v += 1

print(v)

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

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

Solution (Python):




def main():
    n = int(input())
    lh = list(map(int, input().split()))
    h_max = 0
    ret = 0
    for h in lh:
        if h >= h_max:
            ret += 1
        h_max = max(h_max, h)
    print(ret)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
H = input().split()
x = []
for i in H:
    x.append(int(i))
ans = 1
flag = 0
for i in range(1, N):
    for j in range(i):
        if x[j] > x[i]:
            flag = 1
    if flag == 0:
        ans += 1
    flag = 0
print(ans)

Solution (Python):
n = int(input())
count = 0
data = [int(s) for s in input().split()]
max = data[0]
for i in range(0,n-1):
    
    if max < data[i]:
      max = data[i]
    if data[i] <= data[i+1] and data[i+1] >= max:
        count += 1


print(count+1)

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



for i in range(len(H_list)):
    if i ==0:
        H_max = H_list[0]
        count = 1

    elif H_max <= H_list[i]:

        count += 1
        H_max = H_list[i]

print(count)

Solution (Python):
def main():
    n = int(input())
    hs = [int(x) for x in input().split()]
    count = 0
    for i in range(n):
        if i == 0:
            count += 1
        elif max(hs[:i]) <= hs[i]:
            count += 1
    print(count)

if __name__ == '__main__':
    main()

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

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

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

hight = 0
ans = 0

for i in H:
    if i >= hight:
        hight = i
        ans += 1

print(ans)

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

max = li[0]
ans = 1
for i in range(len(li)-1):
    if max <= li[i+1]:
        max = li[i+1]
        ans += 1
print(ans)

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

cnt = 1

for i, row1 in zip(range(len(list)), list[1:]):
    for row2 in list[:i+1]:
        if row2 > row1:
            break
    else:
        cnt += 1

print(cnt)

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

count = 1

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

print(count)

Solution (Python):

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

for i in range(n):
    
    h_max = max(h[0:i+1])
    if (h[i] >= h_max) and (h[i] >= h[0]):
        
        counter += 1
print(counter)

Solution (Python):
n = input()
li = list(map(int,input().split()))
kotae = 0

for (i,x) in enumerate(li):
    for k in range(i+1):
        if x < li[k]:
            break
    else:
        kotae += 1
print(kotae)

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

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

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

flag = False
sum = 1

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

print(sum)