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



Sample input:
4
6 5 6 8


Sample output:
3

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main():
    n = input()
    s = input()
    raw_list = list(map(int, raw_list))

    max = raw_list[0]
    count = 1

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

if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ans = 0
max_H = 0
for h in H:
  if h >= max_H:
    h = max_H
    ans += 1

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

cnt = 1

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

print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    n=int(input())
    H=list(map(int,input().split()))
    M=[0]*n
    M[1]=H[0]
    for i in range(2,n):
        M[i]=max(M[i-1],H[i-1])
    print(sum(1 for i in range(n) if H[i]>=M[i]))
resolve()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
n,d = map(int, input().split())
x = [list(map(int, input().split())) for _ in range(n)]
ans = 0

for i in range(n):
  for j in range(i+1,n):
    temp = 0
    for k in range(d):
      temp += (x[i][k] - x[j][k]) ** 2
    l = math.sqrt(temp)
    if l.is_integer():
      ans += 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ans = 1
if h[0] <= h[1]:
  ans += 1

isCount = True
for i in range(2,n):
  if h[0] <= h[i]:
    if h[1] <= h[i]:
      for j in range(1,i):
        if h[j] > h[i]:
          isCount = False
      if isCount:
        ans += 1
      isCount = True
print(ans)

Submission status: Runtime Error

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

ans = 1
if h[0] <= h[1]:
  ans += 1

isCount = True
for i in range(2,n):
  if h[0] <= h[i]:
    if h[1] <= h[i]:
      for j in range(1,i):
        if h[j] > h[i]:
          isCount = False
      if isCount:
        ans += 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ans = 1
if h[0] < h[1]:
  ans += 1

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

Submission status: Runtime Error

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

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

print(NH)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

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

ma = arr[0]
cnt = 1

for i in range(1,n):
  	if arr[i] >= ma:
      	cnt += 1
	ma = max(ma, arr[i])
    
print (ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
h=[int(input())for i in range(n)]
ans=0
for i in range(n):
  flag = True
  for j in range(i):
    if h[i]<h[j]:
      flag = False
      break
  if(flag):
    ans+=1
print(ans)

Submission status: Runtime Error

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

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

print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
l=[int(input().split()) for _ in range(n)]

ans=1
a=l[0]
for i in range(n-1):
  if a<=l[i+1]:
    ans+=1
    a=max(a,l[i])

print(ans)

Submission status: Runtime Error

Solution code:
def solve(string):
    n, *h = map(int, string.split())
    count = 1
    for i in range(1, n):
        if max(h[:i]) <= h[i]:
            count += 1
    return str(count)


if __name__ == '__main__':
    print(solve(input()))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=1
for i in range(n):
  if a[i] <= a[i+1]:
    b=i+2
  else:
    print(b)
    exit()

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
  if a[i] <= a[i+1]:
    b=i+2
  else:
    print(b)
    exit()

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
  if a[i] <= a[i+1]:
    b=i+1
  else:
    print(b)
    exit()

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
  if a[i] <= a[i+1]:
    b=i+1
  else:
    print(b)

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(int,input().split())
for i in range(n):
  if a[i] <= a[i+1]:
    b=i+1
  else:
    print(b)

Submission status: Runtime Error

Solution code:
n=int(input())
m=list(map(int,input().split()))
ans=0

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

Submission status: Runtime Error

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

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

print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
hotel = list(map(int,input().split()))
new =[]

count = 0
for i in hotel:
  new.append(hotel(i))
  if hotel(i) == max(new):
    count += 1
print(count)

Submission status: Runtime Error

Solution code:
N = input()
Hlist = list(map(int, input().split()))
import numpy
a = numpy.argsort(Hlist)
count=0
while True:
    if a[-1]==0:
        count+=1
        break
    else:
        m = a.pop(-1)
        a = [i for i in a if a[-1] >= i]
        count+=1
print(count)

Submission status: Runtime Error

Solution code:
n = int(input())

L = list(int,input().split())

mountain = int(1)
for i in range(1,n):
    for j in range(i):
            if int(L[j]) >= int(L[i]):
          			break
            else:
                    mountain += 1
                
print(mountain)

Submission status: Runtime Error

Solution code:
n = int(input())

L = list(int,input().split())

mountain = int(1)
for i in range(n):
    for j in range(i):
            if int(L[j]) >= int(L[i]):
          			continue
            else:
                    mountain += 1
                
print(mountain)

Submission status: Runtime Error

Solution code:
5
4 5 3 5 4

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
H=list(map(int,input().split()))
cnt=1
if H[1]>=H[0]:
    cnt+=1
for j in range(2,N):
    if H[j]>=H[j-1] and H[j]>=H[0] and H[j]>=H[1]:
        cnt+=1
print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
height = []
count = 0
for i in range(N):
  x = int(input())
  height.append(x)
  if x == max(height):
    count += 1

print(count)

Submission status: Runtime Error

Solution code:
N = int(input())
height = []
count = 0
for i in range(N):
  x = int(input())
  height.append(x)
  if height[i] == max(height):
    count += 1

print(count)

Submission status: Runtime Error

Solution code:
N = int(input())
height = []
count = 0
for i in range(N):
  x = int(input())
  height.append(x)
  if max(height) == height[i]:
    count += 1

print(count)

Submission status: Runtime Error

Solution code:
N = int(input())
L = list(input())
most_highest_data = 0
ans = 0

for i in range(N):
    if int(L[i]) > most_highest_data:
            most_higest_data = L[i]
    if most_highest_data <= int(L[i+1]):
        ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
a = [int(i) for i in input().split()]
b = a[0]
c = 0
ans = 0
for i in range(N):
  c += 1
  if b < a[c] and a[c - 1]  <a[c] :
    ans += 1
print(ans + 1)

Submission status: Runtime Error

Solution code:
n = int(input())
h = [input() for i in range(n)]

ans = 0

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

print(ans)

Submission status: Runtime Error

Solution code:
input()
H = map(int,input().spkit())
a = [next(H)]
a.extend(h for h in H if a[-1] <= h)
print(len(a))

Submission status: Runtime Error

Solution code:
import sys


def CheckRangeInt(input_str,_min,_max):

    if input_str.isdecimal()==0 or int(input_str)<_min or int(input_str)>_max:
        print("error")
        sys.exit()

    return int(input_str)


def CheckRangeList(input_list,_min,_max):
    for i in range(len(input_list)) :
        if H[i]<_min or H[i]>_max :
            print("error")
            sys.exit()
    return input_list

N=input()
N=CheckRangeInt(N,1,20)


H=list(map(int,input().strip().split()))
if len(H)!=N :
    print("error")
    sys.exit()
H=CheckRangeList(H,1,100)

highest=0
can_see=0

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

print(can_see)

Submission status: Runtime Error

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

ans = 1
if(N >= 2):
    if(H[1] > H[0]):
        ans += 1

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

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

def problem():
    N = int(input())
    H = map(int, input().split())
    print(algorithm(N,H))

def algorithm(N: int, H):
  currentMax = H[0]
  counter = 1
  for i in range(1, N):
    if currentMax <= H[i]:
      counter += 1
      currentMax = H[i]
    
  return counter

problem()

Submission status: Runtime Error

Solution code:
n = int(input())
num_list = [ int(v) for v in range(n)]
s = 0
for i in range(n):
	if max(num_list[:i+1]) <= i:
		s += 1
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
maxHeight = 0
cnt = 0
for _ in range(n):
  mt = list(map(int, input().split()))
for i in range(n):
  if mt[i] >= maxHeight:
    maxHeight = mt[i]
    cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
input()
H = list(map(int, input()))

max = 0
cnt = 0

for h in H:
  if h >= max:
    cnt += 1
    max = h

print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()
N = int(N)
str = input().split()
H = []
i = 0
j = 0
for i in range(N):
  H.append( int(str[i]) )
flag
ans = 0
for i in range(N):
  for j in range(i):
    if H [i] < H[j]:
      flag = 1
    else:
      flag = 0
  if flag == 0:
    ans = ans+1

print(ans)

Submission status: Runtime Error

Solution code:
N = input()
N = int(N)
str = input().split()
H = []
i = 0
j = 0
for i in range(N):
  H.append( int(str[i]) )
flag = []
i = 0
for i in range(N):
  for j in range(i):
    if H [i] < H[j]:
      flag.append(1)
    else:
      flag.append(0)
ans = 0
i = 0
for i in range(N):
  if flag[i] == 0:
    ans = ans+1
print(ans)

Submission status: Runtime Error

Solution code:
N = input()
str = input().split()
H = []
i = 0
j = 0
for i in range(N):
  H[i] = str[i]
flag = []
for i in range(N):
  for j in range(i):
    if H [i] < H[j]:
      flag[i] = 1
    else:
      flag[i] = 0
ans = 0
for i in range(N):
  if flag[i] = 0:
    ans = ans+1
print(ans)

Submission status: Runtime Error

Solution code:
N = input()
str = input().split()
H = []
for i range(N):
  H[i] = str[i]
flag = []
for i range(N):
  for j range(i):
    if H [i] < H[j]:
      flag[i] = 1
    else:
      flag[i] = 0
ans = 0
for i range(N):
  if flag[i] = 0:
    ans = ans+1
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
h_list = map(int, input().split())
highest = max(h_list)
count = 1

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

print(count)

Submission status: Runtime Error

Solution code:
def sub():
    N, Hs = [input() for _ in range(2)]
    Hs = [int(e) for e in Hs.split(" ")]
    count = 1
    maxH = Hs[0]
    for i in range(1, N):
        h = Hs[i]
        if h >= maxH:
            count = count + 1
            maxH = h


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

sub()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
mountain = [ s for s in input().split(" ")]
highest = 0
ans = 0

for m in mountain:
  if m >= highest:
    ans += 1
    highest = m

print(ans)

Submission status: Runtime Error

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

count = 0
h = H[0]

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

print(count)

Submission status: Runtime Error

Solution code:
N = input()
H = list(map(int,input().split()))
count = 0
max = 0
for h in H:
  if max<=h:
    count++
    max=h
    
print(count)

Submission status: Runtime Error

Solution code:
n = input()
h = [int(height) for height in input().split()]

i = 0
while h[i+1] > h[i]:
    i += 1

print(i+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
h = list(map(int,input().split()))
count=0
sum=1
for(int i=1;i>=n;i++):
    for(int s=i-1;s>=0;s--):
      if h[i]>h[s]:
         count+=1
    if count==n:
       sum+=1
print(sum)

Submission status: Runtime Error

Solution code:
n = int(input())
h = list(map(int,input().split()))
count=0
sum=1
for(i=1;i>=n;i++):
    for(s=i-1;s>=0;s--):
      if h[i]>h[s]:
         count+=1
    if count==n:
       sum+=1
print(sum)

Submission status: Runtime Error

Solution code:
n = int(input())
h = list(map(int,input().split()))
count=0
sum=0
for i in range(n):
    for(s=i-1;s>=0;s--):
      if h[i]>h[s]:
         count+=1
    if count==n:
       sum+=1
print(sum)

Submission status: Runtime Error

Solution code:
n = int(input())
h = list(map(int,input().split()))
count=0
sum=0
for i in range(n):
    for(s=i-1;s>=0;s--):
     if h[i]>h[s]:
         count+=1
    if count==n:
       sum+=1
print(sum)

Submission status: Runtime Error

Solution code:
a = int(input())
b = map(int,input().split())
b = list(b)
k = 1
for i in range(a-1):
    maxim = max(a[:i+1])
    if maxim <= a[i+1]:
        k += 1
print(k)

Submission status: Runtime Error

Solution code:
N = int(input())
li = list(map(int, input().split()))
mireru = []
highest = 0
for i in li:
    if li[i] >= highest:
        mireru.append(1)
        highest = li[i]
print(sum(mireru))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

print(cnt)

Submission status: Runtime Error

Solution code:
N=int(input())

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

Submission status: Runtime Error

Solution code:
N=int(input())

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

Submission status: Runtime Error

Solution code:
N = int(input())
A = map(int,input().split(" "))
m = int('-inf')
count = 0
for i in range(N-2,-1,-1):
  m = max(m,A[i+1])
  if A[i]>=m: count += 1
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
H=[int(i) for i in input().split()]
hotel=0
for i in range(N):
    count=0
    for k in range(i):
        if H[k]<=H[i]:
            count+=1
        continue
            
    if count==i:5
        hotel+=1


print(hotel)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def countInn(n, L):
  numInn = 1
  mainHurdle = L[0]
  hurdle = L[1]
  for i in range(1, n):
    currentH = L[i]
    if currentH < mainHurdle or currentH < hurdle:
      continue
    numInn += 1
    hurdle = currentH
  print(numInn)
  
n = int(input())
a = list(map(int, input().split()))
countInn(n, a)

Submission status: Runtime Error

Solution code:
def countInn(n, L):
  numInn = 1
  mainHurdle = L[0]
  hurdle = L[1]
  for i in range(1, n):
    currentH = L[i]
    if currentH < mainHurdle or currentH < hurdle:
      continue
    numInn += 1
    hurdle = currentH
  print(numInn)
  
n = int(input())
a = list(map(int, input().split()))
countInn(n, a)

Submission status: Runtime Error

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

cnt=0

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

Submission status: Runtime Error

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

cnt=1

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

Submission status: Runtime Error

Solution code:
import java.util.*;

class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int count = 0;
    int n = sc.nextInt();
    int h[] = new int[n];
    int max = 1;
    for (int i = 0; i < n; i++){
      h[i] = sc.nextInt();
      if (h[i] >= max) {
        count++;
        max = h[i];
      }
    }
    System.out.println(count);
  }
}

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
ans=0
max=0
for i in range(a)
	if a>=max:
       ans++
       max=a
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

N = int(input())
nums = list(map(int, gen.__next__().split()))

maxx = 0
count = 0
for n in nums:
    if n>=maxx:
        maxx = n
        count += 1

print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
c=0
m=0
for _ in range(int(input())):
	n=int(input())
	if n>=m:
		c+=1
		m=n
print(c)

Submission status: Runtime Error

Solution code:
count = int(input())
l = []
m = 0
c = 0
for i in range(count):
  val = int(input())
  m = max(m, val)
  if val >= m:
    c = c + 1
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()
l = list(input.split())

cnt = 0
max_height = 0
for i in range(len(l)):
  if l[i] > max_height:
    cnt +=1
    max_height = l[i]
    
print(cnt)

Submission status: Runtime Error

Solution code:
N = int(input())
max_num = 1
cnt = 0
list_num = [int(x) for x in input().split()]
for i in range(len(list_num)):
	if max_num <= a:
		cnt += 1
		max_num = list_num[i]
print(cnt)

Submission status: Runtime Error

Solution code:
N = int(input())
max_num = 1
cnt = 0
list_num = [int(x) for x input().split()]
for i in range(len(list_num)):
	if max_num <= a:
		cnt += 1
		max_num = list_num[i]
print(cnt)

Submission status: Runtime Error

Solution code:
N = int(input())
max_num = 1
cnt = 0
list_num = [int(x) for x input().split()]
for x in list_num:
	if max_num <= a:
		cnt += 1
		max_num = a
print(cnt)

Submission status: Runtime Error

Solution code:
N = int(input())
max_num = 1
cnt = 0
list_num = [int(x) for x input().split()]
for x in list_num:
  if max_num <= a:
	cnt += 1
	max_num = a
print(cnt)

Submission status: Runtime Error

Solution code:
N = int(input())
max_num = 1
cnt = 0
list_num = [int(x) for x input().split()]
for x in list_num:
  if max_num <= a:
   	cnt += 1
    max_num = a
print(cnt)

Submission status: Runtime Error

Solution code:
N = int(input())
max_num = 1
cnt = 0
list_num = [int(x) for x input().split()]
for x in list_num:
  if max_num <= a:
   	cnt += 1
    max1 = a
print(cnt)

Submission status: Runtime Error

Solution code:
n = int(input())
H = input.strip().split()

border = 0
can_num = 0
for h in H:
  if h > border:
    can_num += 1
    border = h

print(can_num)

Submission status: Runtime Error

Solution code:
N = int(input())
H = []*100
H[:] = map(int, input().split())
ct = 1
for i in range(N-1):
    max = max(H[:i+1])
    if H[i+1] >= max:
        ct += 1
print(ct)

Submission status: Runtime Error

Solution code:
N = int(input()) 
hotel = [int(input()) for i in range(N)] #リストの内包表記
view = 1

for i in range (1, N, 1):
    judge = 1
    for j in range (0, i, 1):
        if hotel[i] >= hotel[j]:
            pass#何もしない
        else:
            judge = 0
            break
    if judge == 1:
        view += 1

print (view)

Submission status: Runtime Error

Solution code:
N = int(input())
max1 = 1
cnt = 0
for i in range(N):
  b = int(input())
  if max1 <= b:
   	cnt += 1
    max1 = b
print(cnt)

Submission status: Runtime Error

Solution code:
N = int(input()) 
hotel = list(map(int, input().split())) #入力してint型リストに格納
view = 1

for i in range (1, N-1, 1):
    judge = 1
    for j in range (0, i, 1):
        if hotel[i] >= hotel[j]:
            pass　#何もしない
        else:
            judge = 0
    if judge == 1:
        view += 1

print (view)

Submission status: Runtime Error

Solution code:
N=int(input())
H=list(mao(int,input().split()))

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
h = list(map(int, input().split()))
cnt = n 
h.reverse()
for i in h:
    for j in h:
    	if h[j]>h[i]:
    		h.remove(h[i])
    		cnt = cnt-1
    	else:
    		h.remove(h[i])
else:
    print(cnt)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

print(count)

Submission status: Runtime Error

Solution code:
N = int(input())
H = [int(input()) for i in range(N)]
count = 1
Max = H[0]
for i in range(1:N):
     if Max <=H[i]:
         Max = H[i]
         count += 1

print(count)

Submission status: Runtime Error

Solution code:
N = int(input())
H = [int(input()) for i in range(N)
count = 1
Max = H[0]
for i in range(1:N):
     if Max < H[i]:
         Max = H[i]
         count += 1

print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
mont = [int(input()) for i in range(n)]
conut = 0
for i in range(n):
  if mont[i] >= max(mont[:i]):
    count += 1
print(count)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
a = int(input())
Hbox = map(int, input().split())
c = Hbox[0]
number = 0
for i in range(1, a):
    if Hbox[i] > c:
        number +=1
        c = Hbox[i]
    else:
        pass
print(number)