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: Wrong Answer

Solution code:
#import sys
#import math
#import numpy as np
'''a,b= map(int,input().split())'''
#a, b, c = [list(map(int, input().split())) for _ in range(3)]
#li0= [int(x) for x in input().split()]
#n,l= map(int, input().split())
#x = [list(map(int, input().split())) for _ in range(n)] 
N=int(input())
li= [str(x) for x in input().split()]
lar=li[0]
ans=0
for i in range(N):
  if li[i]>=lar:
    ans+=1
    lar=li[i]
print(ans)

Submission status: Wrong Answer

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

count = 0

for c in range(N):
    if c == 0:
        H_max = H[c]
        count += 1
    else:
        if H_max < H[c]:
            H_max = H[c]
            count += 1
        else:
            pass

print(count)

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

count = 1

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

Submission status: Wrong Answer

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

for i in range(n-1):
    if h[i] == max(h):
        print(c)
        sys.exit()
    if h[i] <= h[i+1]:
        c += 1

print(c)

Submission status: Wrong Answer

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

ans = 1

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

Submission status: Wrong Answer

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

ans = 0
h0 = 0
for h in H:
    if h >= h0 and h >= H[0]:
        ans += 1
    h0 = h
print(ans)

Submission status: Wrong Answer

Solution code:
#ABC-124-B
N = int(input())
H = list(map(int, input().split()))
ans = 1

for i in reversed(range(1, N)):
    flag = True
    for j in reversed(range(N-1)):
        if H[j] > H[i]:
            flag = False
            break
    if flag == True:
        ans += 1
        
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 1

for i in range(n-1):
  if H[i+1]>=H[i]:
    ans += 1
    
print(ans)

Submission status: Wrong Answer

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

ans = 1

for i in range(n-1):
  if H[i+1]>H[i]:
    ans += 1
    
print(ans)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

ans = 1

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

print(ans)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

hi = 0
cnt = 0
for h in H:
  if h <= hi:
    cnt += 1
  else:
    hi = h

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
	# n,k = map(int,input().split())
	n = int(input())
	# s = str(input())
	a = list(map(int,input().split()))
	# l = [list(map(int, input().split())) for _ in range(n)]
	ans = 1
	for i in range(1,n-1):
		if a[i] >= a[0] and a[i] >= a[i-1]:
			ans += 1
	print(ans)



if __name__ == '__main__':
	main()

Submission status: Wrong Answer

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: Wrong Answer

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

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

Submission status: Wrong Answer

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

ans = 1

for i in range(1,N):
    if A[0] <= A[i] and A[1] <=A[i] and A[i-1] <= A[i]:
        ans = ans + 1

print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
h = list(map(int, input().split()))
print(len([i for i, x in enumerate(h) if (i == 0) or ((i == 1) and (h[0] <= h[i])) or ((i > 1) and (max(h[:i]) <= h[i]))]))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
h = list(map(int, input().split()))

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

print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
h = list(map(int, input().split()))

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

print(ans)

Submission status: Wrong Answer

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

ans = 0

for i in range(N):
    if i == 0:
        ans = ans+1
    elif H[0] <= H[i] and  H[1] <=H[i]  and H[i-1] <=H[i] and H != 0:
        ans = ans + 1

print(ans)

Submission status: Wrong Answer

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

ans = 0

for i in range(N):
    if i == 0:
        ans = ans+1
    elif H[0] <= H[i] <= H[i] and H[i-1] <=H[i] and H[0] <= H[2] <= H[i]   and H != 0:
        ans = ans + 1

print(ans)

Submission status: Wrong Answer

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

ans = 0

for i in range(N):
    if i == 0:
        ans = ans+1
    elif H[0] <= H[i] <= H[i] and H[i-1] <=H[i] and H != 0:
        ans = ans + 1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

ans = 1

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

print(ans)

Submission status: Wrong Answer

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

cnt =0
cnt_a =0

for i in range(N):
    if i==0:
        cnt+=1
    for j in range(i-1):
        if H_list[i]>=H_list[j]:
            cnt_a=1
        else:
            cnt_a=0
            break
    cnt +=cnt_a

print(cnt)

Submission status: Wrong Answer

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

cnt =0
cnt_a =0

for i in range(N):
    if i==0:
        cnt+=1
    for j in range(i-1):
        if H_list[i]>=H_list[j]:
            cnt_a=1
        else:
            cnt_a=0
    cnt +=cnt_a

print(cnt)

Submission status: Wrong Answer

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

diff = list(map(lambda a,b: a-b,H_list[1:],H_list))

cnt = 0

for i in diff:
    if i>=0:
        cnt+=1

print(cnt+1)

Submission status: Wrong Answer

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

can_see_ocean = 1

for i in range(1 , N+1):
    compare_high = H[0:i+1]
    if max(compare_high) == H[i-1]:
        can_see_ocean += 1
        
print(can_see_ocean)

Submission status: Wrong Answer

Solution code:
def main():
    n = input()
    s = input()
    raw_list = s.split()

    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: Wrong Answer

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

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

    print(max)
    if max <= h[i+1]:
        count += 1

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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
    if j == i+1:
      ans +=1

print(ans)

Submission status: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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,N):
    if H[i] > H[j]:
      break
    if j == N-1:
      ans +=1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = [int(item) for item in input().split()]
 
c = 0 #count
 
for i in range(n):
  flag=0
  if i==0:
    c+=1
  else:
    for j in range(i-1):
      if h[j] > h[i]:
        flag=1
        break
      if flag == 0:
      	c+=1
print(c)

Submission status: Wrong Answer

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

c = 0 #count

for i in range(n):
  flag=0
  for j in range(i-1):
    if h[j] > h[i]:
      flag=1
      break
    if flag == 0:
      c+=1
print(c)

Submission status: Wrong Answer

Solution code:
n = int(input())
H = list(map(int, input().split()))
cnt = 1

for i in range(1, n):
    if max(H[0], H[1]) <= H[i] and H[i-1] <= H[i]:
        cnt += 1

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

one = [0] * N
two = [0] * N

ans = 0

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

for i in range(N):
    if H[i] >= H[i-1]:
        two[i] = 1

two[0] = 1
for i, j in zip(one, two):
    if i == 1 and j == 1:
        ans += 1
print(ans)

Submission status: Wrong Answer

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

ans = 1

for n in range(1,N):
    if H[n] >= H[n-1]:
        ans +=1
    else:
        break

print(ans)

Submission status: Wrong Answer

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

ans = 1

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
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: Wrong Answer

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

h_0 = h_list[0]
count = 0

for i in h_list:
    if i >= h_0 and i>= h_list[0]:
        count += 1
    h_0 = i

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
h=list(map(int, input().split()))
ans=1
b=0
for i in range(1,n):
        b=max(h[j] for j in range(i))
        if b<=h[i]:
            ans+=1
print("57は素数")
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
h=list(map(int, input().split()))
ans=1
b=0
for i in range(1,n):
        b=max(h[j] for j in range(i))
        if b<=h[i]:
            ans+=1
print(ans)
print("57は素数")

Submission status: Wrong Answer

Solution code:
N,*H = map(int,open(0).read().split())
t = 0
h = 0
for i in H:
    if i >= h:
        t += 1
        h = i
    else:
        break
        
print(t)

Submission status: Wrong Answer

Solution code:
N,*H = map(int,open(0).read().split())
t = 0
h = 0
for i in H:
    if i >= h:
        t += 1
    else:
        h = i        
print(t)

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
num = int(input())

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

base = height[0]
ans = 0
for i in height:
  if i>=base: ans += 1
    
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

max = H[0]
counter = 0

for i in H:
  if i >= max:
    max = i
    counter += 1

print(counter)

Submission status: Wrong Answer

Solution code:
n = int(input())
lst = list(map(int, input().split()))
cnt = 0
for i, e in enumerate(lst):
    flag = True
    ci = 0
    while ci < i:
        if e < lst[ci]:
            flag = False
            break
        ci += 1
    ci = 0
    if flag:
        print(e)
        cnt += 1
print(cnt)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int, input().split()))
highest = 0
c = 0
for h in H:
  if h>=highest:
    c+=1
  else:
    highest=h
print(h)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 1
if len(h) >= 2:
  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):
          isCount = True
          if h[j] > h[i]:
          	isCount = False
      	if isCount:
          ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=input()
h=list(map(int,input().split()))	
print(sum(x>=h[0] for x in h))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8

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

count = 1
for i in range(len(H)):
    if i > 0:
        if H[i-1] <= H[i]:
            count+=1
print count

Submission status: Wrong Answer

Solution code:
# coding: utf-8

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

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

print count

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
s = list(map(int,input().split()))
cnt = 1
for i in range(n-1,0,-1):
    result = True
    for j in range(i-2,-1,-1):
        if s[j] > s[i]:
            result = False
            break
    if result:
        cnt +=1
print(cnt)

Submission status: Wrong Answer

Solution code:

n = int(input())
s = list(map(int,input().split()))
cnt = 1
for i in range(n-1,0,-1):
    result = True
    for j in range(n-2,-1,-1):
        if s[j] > s[i]:
            result = False
            break
    if result:
        cnt +=1
print(cnt)

Submission status: Wrong Answer

Solution code:
import math
import copy

inputa = input().split()
inputb = input().split()
# inputc = input().split()

a = int(inputa[0])
# b = int(inputa[1])
# c = int(inputa[2])

# a = inputa[0]
# inputList = list(a)

# x = int(inputb[0])
# y = int(inputb[1])

# inputList=[]
# for i in range(a):
#     inputNum = input()
#     inputList.append(inputNum)

b = [int(n) for n in inputb]
# c = [int(n) for n in inputc]

sum = 1
for i in range(1, len(b)):
    if b[i] >= b[i-1]:
       sum += 1
    else:
        break

print(sum)

Submission status: Wrong Answer

Solution code:
import math
import copy

inputa = input().split()
inputb = input().split()
# inputc = input().split()

a = int(inputa[0])
# b = int(inputa[1])
# c = int(inputa[2])

# a = inputa[0]
# inputList = list(a)

# x = int(inputb[0])
# y = int(inputb[1])

# inputList=[]
# for i in range(a):
#     inputNum = input()
#     inputList.append(inputNum)

b = [int(n) for n in inputb]
# c = [int(n) for n in inputc]

sum = 0
for i in range(1, len(b)):
    if b[i] >= b[i-1]:
       sum += 1
    else:
        break

print(sum)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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: Wrong Answer

Solution code:

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

count = 0
before = -1
for i in range(len(Hs)):
    if Hs[0] > Hs[i]:
        before = Hs[i]
        continue

    if before < Hs[i]:
        count += 1

    before = Hs[i]

print(count)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def check(N, H):
    max_mount = 0
    count = 0
    mountList = H
    
    for i in mountList:
        if i >= max_mount:
            count += 1
            max_mount = i
    print(count)

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

Submission status: Wrong Answer

Solution code:
import numpy as np

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

cnt = 0
for i in range(N):
  temp_H_list = H_list[i:]
  if np.argmax(temp_H_list)==len(temp_H_list)-1:
    cnt+=1
    
print(cnt)

Submission status: Wrong Answer

Solution code:
import numpy as np

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

cnt = 0
for i in range(N):
  temp_H_list = H_list[i:]
  print(temp_H_list)
  if np.argmax(temp_H_list)==len(temp_H_list)-1:
    cnt+=1
    
print(cnt)

Submission status: Wrong Answer

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

for i in range(1,n):
    for j in range(i):
        sum_h += h[j]
        count += 1
        num = j+1
    if sum_h <= h[i] * num:
        ans += 1
    sum_h = 0
    count = 0
print(ans+1)

Submission status: Wrong Answer

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[-1]
        a = a[:-1]
        a = [i for i in a if a[-1] >= i]
        count+=1
print(count)

Submission status: Wrong Answer

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:
        a = [i for i in a if a[-1] > i]
        count+=1
print(count)

Submission status: Wrong Answer

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

# 左から順に埋めて最大値を更新していけば良い
maxmount = H[0]
count = 0
for i in range(N):
    if H[i] >= maxmount:
        maxmount = H[i]
        count += 1

print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

no_ocean = 0

for i in range(1,n):
  for k in range(1,i):
    if height[k-1] > height[i]:
      	no_ocean += 1
      	break
    else:
        continue
        
print(n - no_ocean)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int, input().split()))
highest = H[0]
ans = 1

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

print(ans)