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

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
# B - Great Ocean View
# https://atcoder.jp/contests/abc124/tasks/abc124_b


n = int(input())
points = list(map(int, input().split()))
# points = [1,2,3,4,5]

# if len(points) < 3:
#     first, second = points[0], points[1]
need_height = max(points[0], points[1])
ans = 1
for i in range(1, len(points)):
    pre_spot = points[i-1]
    if need_height <= points[i] and pre_spot <= points[i]:
        ans += 1

        
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
s = input().split()
count = 1
for i in range(N):
  s[i] = int(s[i])
for i in range(1,N+1):
  t = s[:i]
  if max(t) <= s[i]:
    count = count + 1
print(count)

Submission status: Runtime Error

Solution code:
N = input()
s = input().split()
count = 1
for i in range(N):
  s[i] = int(s[i])
for i in range(1,N+1):
  t = s[:i]
  if max(t) <= s[i]:
    count = count + 1
print(count)

Submission status: Runtime Error

Solution code:
N = input()
s = input().split()
count = 1
for i in range(1,N+1):
  t = s[:i]
  if max(t) <= s[i]:
    count = count + 1
print(count)

Submission status: Runtime Error

Solution code:
N = input()
s = input().split()
count = 0
for i in range(N):
  t = s[:i]
  if max(t) <= s[i]:
    count = count + 1
print(count)

Submission status: Runtime Error

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

a = 0
b = 1
ans = 1

for i in range(n.length-2):
    if n[a]<n[b]:
        ans += 1
    a += 1
    b += 1
print(ans)

Submission status: Runtime Error

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

a = 0
b = 1
ans = 1

for i in range(n.length-1):
    if n[a]<n[b]:
        ans += 1
    a += 1
    b += 1
print(ans)

Submission status: Runtime Error

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

a = 0
b = 1
ans = 1

while b<n.length
    if n[a]<n[b]:
        ans += 1
    a += 1
    b += 1
print(ans)

Submission status: Runtime Error

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

a = 0
b = 1
ans = 1
while b != h.length-1:
    while h[a]<h[b]:
        ans = ans + 1
        a = a + 1
        b = b + 1
    a += 1
    b += 1

print(ans)

Submission status: Runtime Error

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

a = 0
b = 1
ans = 1
while h[a]<h[b]:
    ans = ans + 1
    a = a + 1
    b = b + 1
    continue

print(ans)

Submission status: Runtime Error

Solution code:
N=int(input())
dataH=[int(e) for e in input().split(' ')]
Hmax=max(dataH)

dataH.reverse()
print(len(dataH)-dataH.index(max))

Submission status: Runtime Error

Solution code:
import math
import os
import random
import re
import sys
from collections import defaultdict

sys.stdin = open('input.in', 'r')
sys.stdout = open('output.out', 'w') 

def count(n, h):
	count = 0
	if len(h) < 1:
		return count
	max = h[0]
	for i in h:
		if i >= max:
			max = i 
			count += 1

	return count

if __name__ == '__main__':
	n = int(input())
	h = list(map(int, input().rstrip().split()))
	print(count(n, h))

Submission status: Runtime Error

Solution code:
import math
import os
import random
import re
import sys
from collections import defaultdict

def count(n, h):
	count = 0
	if len(h) < 1:
		return count
	max = h[0]
	for i in h:
		if i >= max:
			max = i 
			count += 1

	return count

if __name__ == '__main__':
	n = int(input())
    h = list(map(int, input().rstrip().split()))
    print(count(n, h))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

"""
SEA H_1 H_2 H_3 H_4 ... H_N
"""

# 0 ~ i番目の旅館のうち最も高いもの
# max(Hs[0:i+1])

ret = 0
for i in range(N):
    if Hs[i] == max(Hs[0:i+1]):
        ret += 1

print(ret)

Submission status: Runtime Error

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

"""
SEA H_1 H_2 H_3 H_4 ... H_N
"""

# 0 ~ i番目の旅館のうち最も高いもの
# max(Hs[0:i+1])

ret = 0
for i in range(N):
    if Hs[i] == max(0:i+1):
        ret += 1

print(ret)

Submission status: Runtime Error

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

"""
SEA H_1 H_2 H_3 H_4 ... H_N
"""

# 0 ~ i番目の旅館のうち最も高いもの
# max(Hs[0:i+1])

ret = 0
for i in range(N):
    elif Hs[i] == max(0:i+1):
        ret += 1

print(ret)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
count = 0
tmp = 0
n = input()
c = sys.stdin.readline().rstrip('\n')  
h = c.split()
for j in range(n):
	if h[j] >= tmp:
		count += 1
		tmp = h[j]

print(count)

Submission status: Runtime Error

Solution code:
N=int(input())
H=[int(x) for x in input().split()]
cnt=1
tall=H[0]
for i in range(1,n):
    if tall<=H[i]:
        tall=H[i]
        cnt+=1
print(cnt)

Submission status: Runtime Error

Solution code:
n = int(input())
listNum = [int(x) for x in input.split()]
cnt = 1
big = listNum[0]
for i in range(1,n):
	if(big <= listNum[i]):
		big = listNum[i]
		cnt+=1
print(cnt)

Submission status: Runtime Error

Solution code:
n = int(input())
l = list(map(int, input().split()))
c = 1

bean = True
for i in range(1, n):
  bean = True
  for j in range(i, 0, i-1):
    if l[j-1] > l[i]:
      bean = False
  if bean:
    c += 1

print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
i=0
cnt=0
for _ in range(n):
  j=int(input())
  if i<j:
    cnt+=1
    i=j
print(cnt)

Submission status: Runtime Error

Solution code:
n= int(input())
a=[]
c=1
for i in range(n):
    h=int(input().split)
    a.append(h)
d=a[0]
for b in range(n-1):
    if d <= a[b+1]:
        c+=1
    d=a[b+1]
print(c)

Submission status: Runtime Error

Solution code:
n= int(input())
a=[]
c=1
for i in range(n):
    h=int(input())
    a.append(h)
for b in range(n-1):
    if a[b] <= a[b+1]:
        c+=1
print(c)

Submission status: Runtime Error

Solution code:
n = int(input())
st = input()
h = []
for i in range(n):
  h.append(int(st[2*i]))
  
result = 0
now_max = 0

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

Submission status: Runtime Error

Solution code:
n = int(input())
st = input()
h = []
for i in range(n):
  h.append(int(st[2*i]))
  
result = 1
now_max = h[0]

for i in range(1,n):
  if h[i] >= now_max:
    result = result + 1
    now_max = h[i]
             
print(result)

Submission status: Runtime Error

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

for i in range(1,n):
  if h[i] >= now_max:
    result = result + 1
    now_max = h[i]
             
print(result)

Submission status: Runtime Error

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

for i in range(1,n):
  if h[i] >= h[i-1]:
    	result = result + 1
      
print(result)

Submission status: Runtime Error

Solution code:
n = int(input())
hs = map(int, input().strip().split())

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

print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
hs = map(int, input().strip().split())

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

print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
m = 0
b = 0
for _ in range(N):
  a = int(input())
  if b <= a:
    m += 1
  b = max(b,a)
print(m)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if h[1] >= h[0]:
	x += 1

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

Submission status: Runtime Error

Solution code:
# coding: utf-8
minutes = [int(input()) for _ in range(5)]
time=0
l=[]
 
for i in minutes:
    time = time + i
    if(i%10==0):
        l.append(0)
    else:
        l.append(10-i%10)
 
l.sort()
time += sum(l[:-1])
print(time)

Submission status: Runtime Error

Solution code:
# coding: utf-8
minutes = [int(input()) for _ in range(5)]
time=0
l=[]

for i in minutes:
    time = time + i
    if(i%10==0):
        l.append(0)
    else:
        l.append(10-i%10)

l.sort()
time = time + sum(l[:-1])
print(time)

Submission status: Runtime Error

Solution code:
# coding: utf-8
n = int(input())

high = list(map(int, input().split()))
max_high = []
count =1

for i in range(1,n):
    x = high[:i]
    if(max(x) <= high[i]):
        count++
        
print(count)

Submission status: Runtime Error

Solution code:
N = int(input())
h_vals = input().split(' ')
hmax = -1
count = 0
for h in h_vals:
  if hmax <= h:
  	hmax = h
  	count+=1
print(count)

Submission status: Runtime Error

Solution code:
N = int(input())
h_vals = input().split(' ')
hmax = -1
count = 0
for h in h_vals:
  if hmax <= h
  	hmax = h
  	count+=1
print(count)

Submission status: Runtime Error

Solution code:
N = int(input())
list = []
num = 0
for i in range(N-1):
    list.append(i)
    if list[0] <= list[i]:
        flag = 1
    else:
        flag = 0

if flag == 1:
    for j in range(N-1):
        for k in range(N-1):
            if list[j] > list[k]:    #jが比較対象
                flag = 0      #flag = 1の時カウント、０の時はカウントしない
    num += 1

print(num)

Submission status: Runtime Error

Solution code:
N=int(input())
H=[int(x) for x in input().split()]
can_watch = 0
for i in range(N):
  if H[i] >= max(H[:i]):
    can_watch = can_watch + 1
  else:
    pass
print(can_watch)

Submission status: Runtime Error

Solution code:
n = int(intput_n)
l = [int(x) for x in input_l.split()]
max_h = l[0]
result = 1
for i in range(1,n):
    if max_h <= l[i]:
        result += 1
        max_h = l[i]
    else:
        continue
print(result)

Submission status: Runtime Error

Solution code:
n = int(input()
l = map(int, input().split())
max_h = l[0]
result = 1
for i in range(1,n):
    print(max_h, l[i])
    if max_h <= l[i]:
        result += 1
        max_h = max(l[:i])
    else:
        continue
print(result)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3

import math, itertools, operator
from math import *
from math import factorial as fact
from functools import reduce
from statistics import mean, median, median_low, median_high, mode
# Before Python 3.5
from fractions import gcd
#import numpy
#import scipy, scipy.special
#from sympy import isprime, nextprime
#from sympy.ntheory import factorint

def lcm(a, b):
    return a * b // gcd(a,b)

def perm(a, b):
    import scipy.special
    return scipy.special.perm(a, b, exact = True)

def comb(a, b):
    import scipy.special
    return scipy.special.comb(a, b, exact = True)

def dfact(n):
    import scipy.special
    return scipy.special.factorial2(n, exact = True)

def prod(l):
    return reduce(operator.mul, l)

def input_ints(inp = input, sep = ' ', conv = int):
    return map(conv, inp().split(sep = sep))

################################################################################

N = input_ints()
H = input_ints()

curmax = -inf
cnt = 0
for Hi in H:
    if curmax <= Hi:
        cnt += 1
        curmax = Hi
print(cnt)

Submission status: Runtime Error

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

print(counter)

Submission status: Runtime Error

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

print(counter)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

cansee = list()
for i in range(len(list_H)):
  value = list_H[i]
  
  if i == 0:
    cansee.append(i)
  else:  
    compare = [ value<v for v in list_H[:i] ]
    if compare.sum() == 0:
      cansee.append(i)
      
print(cansee)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(count)

Submission status: Runtime Error

Solution code:
n = int(input())
h = map(int, input().split(" "))
result = 1

for i in range(n):
  viewable = False
  for j in range(i):
    if h[j] > h[i]:
      break
    else if j == i - 1:
      viewable = True
  
  if viewable == True:
    result += 1
    
print("{}".format(result))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np

number_of_mt=int(input())
a=list(input())
sum=1

for i in range(number_of_mt+1):
  if a[i]:
    for j in range(i):
      if a[i]<a[j]:
        break
      elif a[i]>=a[j] and i-1==j:
        sum+=1
      else:
        continue
      
print(sum)

Submission status: Runtime Error

Solution code:
import numpy as np

number_of_mt=int(input())
mt_height=(int(x) for x in input().split())
sum=1

for i in range(number_of_mt+1):
	for j in range(i):
  		if a[i]<a[j]: 
     	  break
        elif j=i-1 and a[i]>=a[j]:
          sum+=1
        else:
          continue
          
print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
L = [int(input().split())]
 
ans = 1
for i in range(N):
    if  L[:i]>L[i]:
        continue
    else:
        ans = ans+1

Submission status: Runtime Error

Solution code:
N = int(input())
t = h = [int(i) for i in input().split()]
for k in h:
  if k < h[0]:
    h.remove(k)
  else:
    pass
t.pop(0)
for v,b in h,t:
  if v - t < 0:
    h.remove(b)
print(h.count())

Submission status: Runtime Error

Solution code:
N = int(input())
L = map[int,input().split()]

ans = 1
for i in L
	if  L(:i)>L(i):
		continue
    else:
		ans = ans+1

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
nums = list(map(int, input().split()))
tmp = 0
ans = 0
for num in nums:
  if num >= tmp:
    ans += 1
    tmp = num
  else:
    break
print(ans)
n = int(input())

Submission status: Runtime Error

Solution code:
n = int(input())
nums = list(map(int, input().split()))
tmp = 0
ans = 0
for num in nums:
  if num >= tmp:
    ans += 1
   	tmp = num
  else:
    break
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input().split())
arr=list(map(int,input().split()))
res=[arr[0]]
for i in range(1,n):
  if arr[i]>=res[-1]:
    res.append(arr[i])
print(len(res))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<iostream>
#include<vector>
//#include <bits/stdc ++.h>
using namespace std;

int main(){
    //input
    int N;
    cin >> N;
    vector<int> H(N);
    for ( int i = 0; i < N ; ++i){
        cin >> H[i];
    }
    //compute
    int ans = 0;
    for ( int i = 0; i < N; ++i){
        bool is_candidate = true;
        for ( int j = 0; j < i; ++j){
            if (H[j] < H[i]){
                is_candidate = false;
                break;
            }
        }
        if (is_candidate){
            ++ans;
        }
    }
    cout << ans+1 << endl;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
c = list(map(int, input().split())) 
 
n_pos = 0
max_c = 0
for i in c:
  if (i>=max_c):
  	n_pos += 1
    max_c = i
  else:
    pass
print(n_pos)

Submission status: Runtime Error

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

n_pos = 0
max_c = 0
for i in c:
  if (i>=max_c):
  	n_pos += 1
    max_c = i
  else:
    pass
print(n_pos)

Submission status: Runtime Error

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

n_pos = 0
max_c = 0
for i in c:
  if i>=max_c:
  	n_pos += 1
    max_c = i
  else:
    pass
print(n_pos)

Submission status: Runtime Error

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

n_pos = 0
max_c = 0
for i in c:
  if i>=max:
  	n_pos += 1
    max_c = i
  else:
    pass
print(n_pos)

Submission status: Runtime Error

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

n_pos = 0
max = 0
for i in c:
  if i>=max:
  	n_pos += 1
    max = i
  else:
    pass
print(n_pos)

Submission status: Runtime Error

Solution code:
N = int(input())
list = input().split()
ans = 0
maxHeight = -1

for i in range(N):
  if list[i] >= maxHeight:
    ans += 1
    maxHeight = list[i]
print(ans)

Submission status: Runtime Error

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

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

answer = 0
for i, hi in enumerate(hs)[1:]:
  if max(hs[:i]) <= hs[i]:
    answer += 1

print(answer)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()
h = input().split()
hl = [0]*n
 
for i in range(n):
  hi = h[i]
  hl[i] = int(hi)
 
ans = 1
m = n - 1
high = hl[0]
 
for i in range(m):
  if hl[i+1] >= high:
    ans += 1
    high = hl[i+1]
   else:
    continue
 
print(ans)

Submission status: Runtime Error

Solution code:
n = input()
h = input().split()
hl = [0]*n
 
for i in range(n):
  hi = h[i]
  hl[i] = int(hi)
 
ans = 1
m = n - 1
high = hl[0]
 
for i in range(m):
  if hl[i+1] >= high:
    ans += 1
    high = hl[i+1]
   else:
    continue
 
print(ans)
n = input()
h = input().split()
hl = [0]*n

for i in range(n):
  hi = h[i]
  hl[i] = int(hi)

ans = 1
m = n - 1
high = hl[0]
 
for i in range(m):
  if hl[i+1] >= high:
    ans += 1
    high = hl[i+1]
   else:
    continue
 
print(ans)

Submission status: Runtime Error

Solution code:
n = input()
h = input().split()
hl = [0]*n

for i in range(n):
  hi = h[i]
  hl[i] = int(hi)

ans = 1
m = n - 1
high = hl[0]
 
for i in range(m):
  if hl[i+1] >= high:
    ans += 1
    high = hl[i+1]
   else:
    continue
 
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
h = list(int(i) for i in input().split())
i = 1
ans = 1

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

Submission status: Runtime Error

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

for i in range(len(tmp)):
  H.append(int(tmp[i]))

ans = 0
for i in range(len(H)):
  chkflg = True
  if i >= 1:
    for j in range(i): 
      if H[j] > H[i]:
        chkflg = False
        break

  if chkflg: ans += 1

print(ans)

Submission status: Runtime Error

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

ans = 1
m = n - 1
high = int(h[0])

for i in range(m):
  if int(h[i+1]) >= high:
    ans += 1
    high = int(h[i+1])
   else:
    continue

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(cnt)

Submission status: Runtime Error

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

ans = 1
m = n-1
high = h[0]

for i in range(m):
    if h[i+1] >= high:
        ans += 1
        high = h[i+1]
    else:
        continue
        

print(ans)

Submission status: Runtime Error

Solution code:
totalnum = input()
ryohight = input().split(" ")
nt = 0
lst = list()
for nd in range(int(totalnum)):
  nd += 1
  ntminus1 = int(nt) - 1
  if ntminus1 <= 0:
    ntminus1 = 0
  if nt == 0:
    lst.append(ryohight[0])
    nt += 1
  elif int(ryohight[nd]) >= int(lst[ntminus1]):
    #lst[nt] = ryohight[nt]
    lst.append(ryohight[nt])
    nt += 1
result = int(len(lst))

Submission status: Runtime Error

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

ans = 1
m = n-1
high = ih[0]

for i in range(m):
    if h[i+1] >= high:
        ans += 1
        high = h[i+1]
    else:
        continue
        

print(ans)

Submission status: Runtime Error

Solution code:
n = input()
s = input().split()
t = int(s[0])
ans = 1
for i in range(1, n):
  if t <= int(s[i]):
    ans += 1
    t = int(s[i])
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input()
H = list(map(int, 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:
n=input()
h=[]
moji=input()
for i in moji.split():
  h.append(int(i))
  
ans=0
H=0
for i in range(N):
  if h[i]>H:
    ans+=1
    H=h[i]
print(ans)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input())
b = map(int, raw_input().split()) 
i = 1
count = 0
 
while a<=i:
  if b[i]>b[i-1]:
    count += 1
i++
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input()
b = map(int, raw_input().split()) 
i = 1
count = 0

while a<=i:
  if b[i]>b[i-1]:
    count += 1
i++
print(count)

Submission status: Runtime Error

Solution code:
n=int(input())
h=list(map(int, input().split()))
t=1
#print(n)
#print(*h)

if h[0] <= h[1]:
  t+=1
if h[0] <= h[2] and h[1] <= h[2]:
  t+=1
if h[0] <= h[3] and h[1] <= h[3] and h[2] <=h[3]:
  t+=1
if h[0] <= h[4] and h[1] <= h[4] and h[2] <=h[4] and h[3] <= h[4]:
  t+=1
if h[0] <= h[5] and h[1] <= h[5] and h[2] <=h[5] and h[3] <= h[5] and h[4] <= h[5]:
  t+=1
if h[0] <= h[6] and h[1] <= h[6] and h[2] <=h[6] and h[3] <= h[6] and h[4] <= h[6] and h[5] <= h[6]:
  t+=1
if h[0] <= h[7] and h[1] <= h[7] and h[2] <=h[7] and h[3] <= h[7] and h[4] <= h[7] and h[5] <= h[7] and h[6] <= h[7]:
  t+=1
if h[0] <= h[8] and h[1] <= h[8] and h[2] <=h[8] and h[3] <= h[8] and h[4] <= h[8] and h[5] <= h[8] and h[6] <= h[8] and h[7]<=h[8]:
  t+=1
if h[0] <= h[9] and h[1] <= h[9] and h[2] <=h[9] and h[3] <= h[9] and h[4] <= h[9] and h[5] <= h[9] and h[6] <= h[9] and h[7]<=h[9] and h[8]<=h[9]:
  t+=1
if h[0] <= h[10] and h[1] <= h[10] and h[2] <=h[10] and h[3] <= h[10] and h[4] <= h[10] and h[5] <= h[10] and h[6] <= h[10] and h[7]<=h[10] and h[8]<=h[10] and h[9]<=h[10]:
  t+=1
if h[0] <= h[11] and h[1] <= h[11] and h[2] <=h[11] and h[3] <= h[11] and h[4] <= h[11] and h[5] <= h[11] and h[6] <= h[11] and h[7]<=h[11] and h[8]<=h[11] and h[9]<=h[11] and h[10]<=h[11]:
  t+=1
if h[0] <= h[12] and h[1] <= h[12] and h[2] <=h[12] and h[3] <= h[12] and h[4] <= h[12] and h[5] <= h[12] and h[6] <= h[12] and h[7]<=h[12] and h[8]<=h[12] and h[9]<=h[12] and h[10]<=h[12] and h[11]<=h[12]:
  t+=1
if h[0] <= h[13] and h[1] <= h[13] and h[2] <=h[13] and h[3] <= h[13] and h[4] <= h[13] and h[5] <= h[13] and h[6] <= h[13] and h[7]<=h[13] and h[8]<=h[13] and h[9]<=h[13] and h[10]<=h[13] and h[11]<=h[13] and h[12]<=h[13]:
  t+=1
if h[0] <= h[14] and h[1] <= h[14] and h[2] <=h[14] and h[3] <= h[14] and h[4] <= h[14] and h[5] <= h[14] and h[6] <= h[14] and h[7]<=h[14] and h[8]<=h[14] and h[9]<=h[14] and h[10]<=h[14] and h[11]<=h[14] and h[12]<=h[14] and h[13]<=h[14]:
  t+=1
if h[0] <= h[15] and h[1] <= h[15] and h[2] <=h[15] and h[3] <= h[15] and h[4] <= h[15] and h[5] <= h[15] and h[6] <= h[15] and h[7]<=h[15] and h[8]<=h[15] and h[9]<=h[15] and h[10]<=h[15] and h[11]<=h[15] and h[12]<=h[15] and h[13]<=h[15] and h[14]<=h[15]:
  t+=1
if h[0] <= h[16] and h[1] <= h[16] and h[2] <=h[16] and h[3] <= h[16] and h[4] <= h[16] and h[5] <= h[16] and h[6] <= h[16] and h[7]<=h[16] and h[8]<=h[16] and h[9]<=h[16] and h[10]<=h[16] and h[11]<=h[16] and h[12]<=h[16] and h[13]<=h[16] and h[14]<=h[16] and h[15]<=h[16]:
  t+=1
if h[0] <= h[17] and h[1] <= h[17] and h[2] <=h[17] and h[3] <= h[17] and h[4] <= h[17] and h[5] <= h[17] and h[6] <= h[17] and h[7]<=h[17] and h[8]<=h[17] and h[9]<=h[17] and h[10]<=h[17] and h[11]<=h[17] and h[12]<=h[17] and h[13]<=h[17] and h[14]<=h[17] and h[15]<=h[17] and h[16]<=h[17]:
  t+=1
if h[0] <= h[18] and h[1] <= h[18] and h[2] <=h[18] and h[3] <= h[18] and h[4] <= h[18] and h[5] <= h[18] and h[6] <= h[18] and h[7]<=h[18] and h[8]<=h[18] and h[9]<=h[18] and h[10]<=h[18] and h[11]<=h[18] and h[12]<=h[18] and h[13]<=h[18] and h[14]<=h[18] and h[15]<=h[18] and h[16]<=h[18] and h[17]<=h[18]:
  t+=1
if h[0] <= h[19] and h[1] <= h[19] and h[2] <=h[19] and h[3] <= h[19] and h[4] <= h[19] and h[5] <= h[19] and h[6] <= h[19] and h[7]<=h[19] and h[8]<=h[19] and h[9]<=h[19] and h[10]<=h[19] and h[11]<=h[19] and h[12]<=h[19] and h[13]<=h[19] and h[14]<=h[19] and h[15]<=h[19] and h[16]<=h[19] and h[17]<=h[19] and h[18]<=h[19]:
  t+=1

print(t)

Submission status: Runtime Error

Solution code:
www

Submission status: Runtime Error

Solution code:
a=int(input())
c=list(map(int, input().split())
for num in range(a):
  if c[num]<c[num+1]:
       break;
print(num)

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
out = 0
for i in range(len(a)):
  if i > 0 :
  	for j in range(i):
  		if not (a[j] <= a[i]):
      		break
  out += 1
print(out)

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
out = 0
for i in range(len(a)):
  if i > 0 :
  	for j in range(i):
  		if not (a[j] <= a[i]):
      		continue
  out += 1
print(out)

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
out = 0
for i in range(len(a)):
  if i > 0 :
  	for j in range(i):
  		if not (a[j] =< a[i]):
      		continue
  out += 1
print(out)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

count = 0

for num, hight in enumerate(h):
  if h[num] >= max(h[:num]):
    count += 1

print(count)