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()))
count = 0
highmax = H[0]
for i in range(n):
	if highmax <= H[i]:
		count += 1
		highmax = H[i]

print(count)

Solution (Python):

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

Solution (Python):




def main():
    n = int(input())
    H = [i for i in map(int, input().split())]

    ans = 0
    highest = H[0]
    for h in H:
        if highest <= h:
            ans += 1
            highest = h

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque

from itertools import product

from itertools import permutations

from itertools import combinations

from itertools import accumulate
from bisect import bisect_left, bisect_right

import re




def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
def line_inpl(x): return [i_inpl() for _ in range(x)]

INF = int(1e18)
MOD = int(1e9)+7 



N = i_inpl()
H = l_inpl()

ans = 0
max_val = -INF
for Hi in H:
    if Hi >= max_val:
        ans += 1
    max_val = max(max_val, Hi)
print(ans)

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

view = 0

max_height = 0
for i in H:
    if i >= max_height:
        view += 1
        max_height = i


print(view)

Solution (Python):
n = int(input())
h_array = [int(x) for x in input().split()]
cnt = 0
highest = h_array[0]
for index, h in enumerate(h_array, 1):
    if highest <= h:
        cnt += 1
        highest = h
print(cnt)

Solution (Python):
n = int(input())
h_array = [int(x) for x in input().split()]
cnt = 0
highest = h_array[0]
for index, h in enumerate(h_array, 1):
    if highest <= h:
        cnt += 1
        highest = h
print(cnt)

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

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

num = 0
max = 0

for i in h:
    if i >= max:
        num += 1
        max = i

print(num)

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

count = 0
max_high = 0
for i in li:
    if max_high <= i:
        count += 1
        max_high = i

print(count)

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

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

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

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

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

Solution (Python):
from sys import stdin

lines = stdin.readlines()

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

hight = 0
ans = 0

for h in H:
    if hight <= h:
        hight = h
        ans += 1

print(ans)

Solution (Python):
def main():

    """ convenient functions
    
    
    
    
    
    """

    """convenient decorator
    
    
        
        
        
        
        
        
        
        
        
        
    """
    
    
    import sys
    sys.setrecursionlimit(10**7)
    from itertools import accumulate, combinations, permutations, product 
    
    from math import factorial, ceil, floor, sqrt
    def factorize(n):
        """return the factors of the Arg and count of each factor
        
        Args:
            n (long): number to be resolved into factors
        
        Returns:
            list of tuples: factorize(220) returns [(2, 2), (5, 1), (11, 1)]
        """
        fct = []  
        b, e = 2, 0  
        while b * b <= n:
            while n % b == 0:
                n = n // b
                e = e + 1
            if e > 0:
                fct.append((b, e))
            b, e = b + 1, 0
        if n > 1:
            fct.append((n, 1))
        return fct
    def combinations_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        
        if n < 0 or r < 0:
            raise Exception('combinations_count(n, r) not defined when n or r is negative')
        if n - r < r: r = n - r
        if r < 0: return 0
        if r == 0: return 1
        if r == 1: return n
        numerator = [n - r + k + 1 for k in range(r)]
        denominator = [k + 1 for k in range(r)]
        for p in range(2,r+1):
            pivot = denominator[p - 1]
            if pivot > 1:
                offset = (n - r) % p
                for k in range(p-1,r,p):
                    numerator[k - offset] /= pivot
                    denominator[k] /= pivot
        result = 1
        for k in range(r):
            if numerator[k] > 1:
                result *= int(numerator[k])
        return result
    def combinations_with_replacement_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items allowing individual elements to be repeated more than once.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        if n < 0 or r < 0:
            raise Exception('combinations_with_replacement_count(n, r) not defined when n or r is negative')
        elif n == 0:
            return 1
        else:
            return combinations_count(n + r - 1, r)
    from bisect import bisect_left, bisect_right
    from collections import deque, Counter, defaultdict 
    from heapq import heapify, heappop, heappush, heappushpop, heapreplace,nlargest,nsmallest 
    from copy import deepcopy, copy 
    import operator
    from operator import itemgetter
    
    
    from functools import reduce, lru_cache
    def chmin(x, y):
        """change minimum
        if x > y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current minimum value
            y (long): potential minimum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x > y:
            x = y
            return (x, True)
        else:
            return (x, False)
    def chmax(x, y):
        """change maximum
        if x < y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current maximum value
            y (long): potential maximum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x < y:
            x = y
            return (x, True)
        else:
            return (x, False)

    from fractions import gcd 
    def gcds(numbers):
        return reduce(gcd, numbers)
    def lcm(x, y):
        return (x * y) // gcd(x, y)
    def lcms(numbers):
        return reduce(lcm, numbers, 1)

    
    
    INF = 10 ** 18
    MOD = 10 ** 9 + 7
    modpow = lambda a, n, p = MOD: pow(a, n, p) 
    def modinv(a, p = MOD):
        
        
        return modpow(a, p-2, p)
    def modinv_list(n, p = MOD):
        if n <= 1:
            return [0,1][:n+1]
        else:
            inv_t = [0,1]
            for i in range(2, n+1):
                inv_t += [inv_t[p % i] * (p - int(p / i)) % p]
            return inv_t
    def modfactorial_list(n, p = MOD):
        if n == 0:
            return [1]
        else:
            l = [0] * (n+1)
            tmp = 1
            for i in range(1, n+1):
                tmp = tmp * i % p
                l[i] = tmp
            return l
    def modcomb(n, k, fac_list = [], p = MOD):
        
        
        from math import factorial
        if n < 0 or k < 0 or n < k: return 0
        if n == 0 or k == 0: return 1
        if len(fac_list) <= n:
            a = factorial(n) % p
            b = factorial(k) % p
            c = factorial(n-k) % p
        else:
            a = fac_list[n]
            b = fac_list[k]
            c = fac_list[n-k]
        return (a * modpow(b, p-2, p) * modpow(c, p-2, p)) % p
    def modadd(a, b, p = MOD):
        return (a + b) % MOD
    def modsub(a, b, p = MOD):
        return (a - b) % p
    def modmul(a, b, p = MOD):
        return ((a % p) * (b % p)) % p
    def moddiv(a, b, p = MOD):
        return modmul(a, modpow(b, p-2, p))

    """ initialize variables and set inputs
    
        
        
    
        
        
        
        
        
    
        
        
        
        
    
        
        
    """

    
    r = lambda: sys.stdin.readline().strip()
    r_int = lambda: int(r())
    R = lambda: list(map(int, r().split()))
    Rmap = lambda: map(int, r().split())
    Rfloat = lambda: list(map(float, r().split()))
    Rtuple = lambda: tuple(map(int, r().split()))

    """ how to treat input
    
    
    
    
    
    
    
    """

    if __name__ != '__main__':
        
        sys.stdin = open('sample.txt')

    
    

    N = int(r())
    H = R()
    tmp, cnt = 0, 0
    for i in H:
        if i >= tmp:
            cnt += 1
            tmp = i
    print(cnt)
    
    
    

    """memo: how to use defaultdict of list
    
    Dic = defaultdict(list)
    
    Dic[x].append(y)
    
    for k, v in Dic.items():
    """

if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
import sys
import math
from collections import deque

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    H = string_to_int(inputs[0])

    max_heigh = 0
    count = 0
    for h in H:
        if h >= max_heigh:
            max_heigh = h
            count += 1
    return count


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    input()
    ret = solve(inputs(1))
    print(ret)

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

count=0

now_max = arr[0]

for v in arr:
    if v>=now_max:
        count += 1
        now_max = v

print(count)

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

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

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):
def main():
    N = int(input())
    H = list(map(int, input().split()))

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

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
h = list(map(int, input().split()))
m = [0] * n
m[0] = h[0]
for i in range(n - 1):
    m[i + 1] = max(m[i], h[i + 1])
ans = 0
for hi, mi in zip(h, m):
    if hi == mi:
        ans += 1
print(ans)

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

count = 0

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

print(count)

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

Solution (Python):
def q39(n, h):
    count = 1
    for i in range(1, n):
        if h[i] >= max(h[:i]):
            count += 1
    return count


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

Solution (Python):
def solve():
    N = int(input())
    H = [int(s) for s in input().split() if s]
    max_height = 1
    count = 0
    for h in H:
        if h >= max_height:
            count += 1
            max_height = h
    print(count)
    
solve()

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

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

ans = 1

high = h[0]

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


print(ans)

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

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

Solution (Python):
n = int(input())
lst = list(map(int,input().split()))
score = 1
h = lst[0]
for p in range(n-1):
	if lst[p+1] >= h:
		score += 1
		h = lst[p+1]
	else:
		pass
print(score)

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

Solution (Python):
num = int(input())
x = [int(n) for n in input().split()]
count = 1
height = x[0]
for s in range(num - 1):
    if height <= x[s+1]:
        count += 1
        height = x[s+1]
print(count)

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

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

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

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

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

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

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

print(z)

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

Solution (Python):
N = int(input())
heights = list(map(int, input().split()))
result = []
max_height = 0
for height in heights:
  if max_height <= height:
    result.append(1)
    max_height = height
print(sum(result))

Solution (Python):
n = int(input())
h = list(map(int, input().split()))
mx = 0
c = 0
for hi in h:
    if mx <= hi:
        c += 1
        mx = hi
print(c)

Solution (Python):
import sys
from collections import deque  
from collections import defaultdict  
from heapq import heapify, heappush, heappop, heappushpop  
from bisect import bisect_left, bisect_right  



s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2sss = lambda n: [list(sys.stdin.readline().rstrip()) for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))
MOD = int(1e+9) + 7

def main():
    N = i2n()
    H = i2nn()
    n = 1
    h = H[0]
    for i in range(1, N):
        if H[i] >= h:
            h = H[i]
            n += 1
    print(n)

main()

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

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

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

print(ans)

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

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

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 = list(map(int, input().split()))

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

print(ans)

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

cnt = 1

for i in range(n-1):
    cnt_min = 0
    for j in range(i+1):
        if h[i+1] >= h[j]:
            cnt_min += 1
    if cnt_min == i+1:
        cnt += 1

print(cnt)

Solution (Python):
n = int(input())
ary = list(map(int, input().split()))
count = 1
for i in range(1, n):
    flag = True
    pointed_mountain = ary[i]
    for another_mountain in ary[:i]:
        if another_mountain > pointed_mountain:
            flag = False
            break
    if flag:
        count += 1

print(count)

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

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

m=list(input().split())
ans=1
max=[int(m[0])]
for i in range(1,n):
    if int(m[i])>=max[-1]:
        max.append(int(m[i]))
        ans+=1
print(ans)

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

    cnt = 0
    height = 0
    for h in H:
        if height <= h:
            cnt += 1
            height = h
    print(cnt)


main()

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

count = 1

for i in range(n):
  if i == 0:
    h = mountain[0]
    continue
  if mountain[i] < h:
    continue
  else:
    h = mountain[i]
    count += 1

print(count)

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

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

Solution (Python):
def B(lst,r=[],c=1):
    if len(lst) == c:
        return r
    if len([i for i in lst[0:c] if lst[c] >= i]) == c:
        return B(lst,r + [lst[c]],c+1)
    else:
        return B(lst,r,c+1)

i = int(input())
lst = list(map(int,input().split(" ")))
print(len(B(lst))+1)

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

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

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

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 = int(input())
a = list(map(int, input().split()))

count = 0

for i in range(1, len(a)):
    
    current = a[i]
    
    while i > 0:
        if current < a[i-1]:
            count += 1
            break
        i -= 1
        
print(n - 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]:
        count += 1
    max_ = max(max_, h[i])
print(count)

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

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


print(at)

Solution (Python):
n = int(input())
p = list(map(int, input().split()))
count = 1

for num in range(1,n):
    if max(p[:num]) <= p[num]:
        count += 1
print(count)

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

print([all([x <= h for x in H[:i]]) for i, h in enumerate(H)].count(True))

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

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

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]):
        count += 1
print(count)

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

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

previous=0
count=0

for i in H:
    if previous<=i:
        previous=i
        count+=1

print(count)

Solution (Python):
n = int(raw_input())
H = map(int, raw_input().split())
ans = 0
ph = -1
for h in H:
    if h >= ph:
        ans += 1
        ph = h
print ans

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

ans = 1

for i in range(1, n):
  pre = hs[:i]
  if max(pre) <= hs[i]:
    ans += 1
print(ans)

Solution (Python):
N=int(input())
H=[int(i) for i in input().split()]
l=[]
l.append(H[0])
for i in range(1,N):
  if H[i]>=max(H[0:i]):
    l.append(H[i])      
print(len(l))

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

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

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

Solution (Python):
n = int(input())
h = [int(i) for i in input().split()]
cnt = 0
for i in range(n):
    for j in range(i):
        if h[j] > h[i]:
            break
        elif i-j==1:
            cnt+=1
print(cnt+1)

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

ret = 0
mh = 0
for h in H:
    if mh <= h:
        ret += 1
        mh = h

print(ret)

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

print(ans)

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

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

Solution (Python):

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

for i in range(n):
    if h[i] >= max_height:
        max_height = h[i]
        count = count + 1
    else:
        pass
    
print(count)

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

Solution (Python):
n = int(input())
h = [i for i in map(int,input().split())]
ans=0
for i in range(n):
    if max(h[:i]+[0]) <=h[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 H[i]>=H[highest]:
        count+=1
        highest = i
print(count)

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

def is_ocean_view(idx):
    return max(Hs[:idx]) <= Hs[idx]

ocean_views = [is_ocean_view(idx) for idx in range(1, N)]
print(ocean_views.count(True) + 1)

Solution (Python):
n = input()
high_list = list(map(int,input().split()))
most_highest = high_list[0]
can_count = 0

for i in high_list:
	if i>=most_highest:
		most_highest = i
		can_count +=1

print(can_count)

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

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

high, cnt = 0, 0

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

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

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

Solution (Python):
from sys import stdin

H = []
N = int(stdin.readline().rstrip())
H = [int(x) for x in stdin.readline().rstrip().split()]

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

Solution (Python):
import sys

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

def main():
    N = INT()
    H = LIST()
    maxv = 0
    count = 0
    for h in H:
        if maxv <= h:
            count += 1
            maxv = h
    print(count)

if __name__ == '__main__':
    main()

Solution (Python):
from sys import stdin

def main():
    N = int(stdin.readline())
    H = list(map(int,stdin.readline().split()))
    answer = 1
    for i in range(1,len(H)):
        if H[i] >= max(H[:i]):
            answer += 1

    print(answer)

if __name__ == "__main__":
    main()

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

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

print(ans)

Solution (Python):
N =int(input())
Hlist = list(map(int, input().split()))
maxH = 0
v = 0
for h in Hlist :
    if maxH <= h :
        v += 1
        maxH = h
print(v)

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

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

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

input()
h = list(map(int, input().split()))
count = 0
height_max = 0
for item in h:
    if height_max <= item:
        height_max = item
        count += 1
print(count)

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 +=1
print(ans)

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

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

maximum = 0
counter = 0

for h in H:
  
  if maximum <= h:
    maximum = h
    counter += 1
print(counter)

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):
n=int(input())
a=input().split()
for i in range(n):
  a[i]=int(a[i])
answer=1
highest=a[0]
for i in range(1,n):
  if a[i]>=highest:
    answer=answer+1
    highest=a[i]
print(answer)

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

count = 1
cp_num = n[0]
for num in n[1:] :
    if (num >= cp_num) :
        count += 1
        cp_num = num

print(count)

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

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

c = 0
for i in range(N):
    if i == 0:
        c += 1
        continue
    if max(H[:i+1]) == H[i]:
        c += 1
print(c)

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

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

print(ans)

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

count = 1

for i in range(n-1):
  if max(h[:i+1]) <= h[i+1]:
    count += 1
  else:
    pass

print(count)

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

count = 1

for i in range(n-1):
  if max(h[:i+1]) <= h[i+1]:
    count += 1
  else:
    pass

print(count)

Solution (Python):
N = int(input())
H = input().split()
H = [int(x) for x in H]
border = 0
answer = 0
for i in range(N):
  if H[i] >= border:
    border = H[i]
    answer = answer + 1

print(answer)

Solution (Python):
def abc():
    input()
    h = list(map(int, input().rstrip().split()))

    c = 0
    for i, x in enumerate(h):
        viewable = True
        for j in range(i+1):
            if h[j] > h[i]:
                viewable = False
        else:
            if viewable:
                c += 1
    print(c)


abc()

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

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

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

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

print(ans)

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