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:
n = input()
h = raw_input().split()
count = 1
max_h = h[0]

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

print count

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int, input().split()))
print(h)
a = 1
for j in range(1, n):
    flag=False
    for i in range(0, j):
        if h[i] <= h[j]:
            flag = True
        else:
            flag = False
            break
    if flag:
        a = a + 1

print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())
l = list(map(int, input().split()))
k = 0
m = 1

for i in range(1,N):
    for j in range(i-1):
        if int(l[j]) > int(l[i]) :
            k += 0
            break
        else:
            k +=1
    if k != 0:
        m += 1
        
print(m)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
num = list(map(int, input().split()))
tmp = 0
state_tmp = 0
result = 1
#i番目を比べる
for i in range(N):
    if i != 0 or 1<= num[i] <= 200:
        for j in range(N):
            if num[j] <= num[i]:
                state_tmp +=1
        if state_tmp ==  N and tmp <= num[i]:
                result +=1
        tmp = num[i]
        state_tmp = 0
    else:
        tmp = num[i]
    
print(result)

Submission status: Wrong Answer

Solution code:
n = input()
h = raw_input().split()
count = 1
max_h = h[0]

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

print count

Submission status: Wrong Answer

Solution code:
n = int(input())
listNum = [int(x) for x in input().split()]
answer = []
answer.append(listNum[0])
for i in range(1,n):
    if((listNum[i] <= listNum[-1]) and (listNum[i-1] <= listNum[i])):
        answer.append(i)
print(len(answer))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def calc(x):
    global mount
    global list
    count=0
    for y in range(1,x+1):
        if mount[x] >= mount[x-y]:
            count+=1
    if x == count:
        list.append(x)

N=int(input())

mount=input().split()

list=[]
for z in range(1,len(mount)):
    calc(z)

print(1+len(list))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = 5
H = [9,5,6,8,4]

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

Submission status: Wrong Answer

Solution code:
N = int(input())
HList = [int(i) for i in input().split(" ")]
stn = HList[0]
count = 0

for i in range(len(HList)) :
    if i == 0 :
        count += 1
    elif HList[i] >= stn and HList[i] >= HList[i-1] :
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
l = list(map(int, input().split()))
n = len(l)
k = 0
m = 1

for i in range(1,n):
    for j in range(i-1):
        if int(l[j]) > int(l[i]) :
            k += 0
            break
        else:
            k +=1
    if k != 0:
        m += 1
        
print(m)

Submission status: Wrong Answer

Solution code:
from sys import stdin

ocean_view_num = 0
flag = 0

num = int(input())
height = list(map(int,input().split()))

for i in range(num):
    if i is not 0:
        flag = 1
        for j in range(1,i):
            if height[j - 1] > height[j]:
                flag = 0
                break 
        if flag is 1 : ocean_view_num += 1

print(ocean_view_num)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int, input().split()))
print(h)
a = 1
for j in range(1, n):
    flag=False
    for i in range(0, j):
        if h[i] <= h[j]:
            flag = True
        else:
            flag = False
            break
    if flag:
        a = a + 1

print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())
height =  list(map(int,input().split()))
output = 1
if N == 1:
  print(output)
else:
  for i in range(len(height)-1):
    if height[i+1] >= max(height[:i+1]):
      output += 1
print(output)

Submission status: Wrong Answer

Solution code:
totalnum = input()
ryohight = input().split(" ")
nt = 0
lst = list()
for nd in range(int(totalnum)):
  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))
print(result)

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
H = list(map(int, input().split()))
count = 0
H_max = np.amax(H)
H_max_index = np.argmax(H)

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

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

print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int, input().split()))
print(h)
a = 1
flag = False
for j in range(1, n):
    for i in range(0, j):
        if h[i] <= h[j]:
            flag = True
        else:
            flag=False
            break
    if flag:
        a = a + 1

print(a)

Submission status: Wrong Answer

Solution code:
n = int(input())
hlist = input().split(' ')
counter = 0
 
for i in range(n):
    judge = False
    for j in range(i + 1):
        if hlist[j] <= hlist[i]:
            judge = True
        else:
            judge = False
            break
        if j == i and judge == True:
            counter = counter + 1
print(counter, end="")

Submission status: Wrong Answer

Solution code:
N = int(input())
arr = input().split(" ")
 
if N == 1:
  print(1)
elif N == 2:
  if int(arr[1]) > int(arr[0]):
    print(2)
  else:
    print(1)
else:
  count = 1
  for i in range(N):
    if i == 0:
      pass
    else:
      for j in range(i):
        bool = True
        if arr[i] < arr[j]:
          bool = False
          if bool:
            count += 1
  print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
hlist = input().split(' ')
counter = 0
 
for i in range(n):
    judge = False
    for j in range(i + 1):
        if hlist[j] <= hlist[i]:
            judge = True
        else:
            judge = False
            break
        if j == i and judge == True:
            counter = counter + 1
print(counter, end='')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
H = list(map(int, input().split()))
count = 1
H_max = np.amax(H)
H_max_index = np.argmax(H)

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

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

print(count-1)

Submission status: Wrong Answer

Solution code:
N = int(input())
list = input().split()
M = 1
for i in range(1, N):
  k = list[i]
  t_list = list[0:i+1]
  a_list = sorted(t_list, reverse=True)
  if a_list[0] == k:
     M += 1

print(M)

Submission status: Wrong Answer

Solution code:
n = int(input())
hlist = input().split(' ')
counter = 0
 
for i in range(n):
    judge = False
    for j in range(i + 1):
        if hlist[j] <= hlist[i]:
            judge = True
        else:
            judge = False
            break
        if j == i and judge == True:
            counter = counter + 1
print(counter)

Submission status: Wrong Answer

Solution code:
# -*- coding utf-8 -*-
n=int(input())
lis=list(map(int,input().split()))
ans=0
s=lis.pop(0)

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



print(ans+1)

Submission status: Wrong Answer

Solution code:
n = int(input())
hight = input().split()
cnt = 1
max = hight[0]
for i in range(n-1):
    if max <= hight[i+1]:
        cnt = cnt +1
        max = hight[i+1]
    else:
         continue
    
print(cnt)

Submission status: Wrong Answer

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

ans = 0
if N > 1:
  if H[0] <= H[1]:
    ans += 1
  if N > 2:
    if H[2] >= H[0] and H[2] >= H[1]:
      ans += 1
    for i in range(3, N):
      if (H[i] >= H[0]) and (H[i] >= H[1]) and (H[i] >= H[i - 1]):
        ans += 1
      else:
        break
print(ans + 1)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

output = 0
prev_h = 0

for i in range(n):
  if i == 0:
    prev_h = 0
  else:
    prev_h = h[i-1]
  if prev_h < h[i]:
    output = output + 1

print(output)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = input().split()
print(N)
h = 1
for i in range(1,len(N)):
    for j in range(i):
        if (N[i] < N[j]):
            break
        if j == i-1:
            h += 1
print(h)

Submission status: Wrong Answer

Solution code:
# -*- coding utf-8 -*-
n=int(input())
lis=list(map(int,input().split()))
ans=0
s=lis.pop(0)

for i in range(0,n-1,1):
    if lis[i]>=s and lis[i]>lis[i-1]:
        ans+=1



print(ans+1)

Submission status: Wrong Answer

Solution code:
from sys import stdin

H_list = stdin.readline().rstrip().split()
H_list_int = list(map(lambda x: int(x), H_list))  # strリストをintリストへ
print(H_list_int)

ables = 1
max = H_list_int.pop(0)

for i in H_list_int:
    if max <= i:
        ables += 1
        max = i

print(ables)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int,input().split()))
sum = 1
result = 0
if not(len(H) == 1):
    if H[0] <= H[1]:
        result = H[1]
    else:
        result = H[0]
    for i in range(1,len(H)):
        if H[i-1] <= H[i] and result <= H[i]:
            sum += 1


print(sum)

Submission status: Wrong Answer

Solution code:
def calc(x):
    global mount
    global list
    count=0
    for y in range(1,x+1):
        if mount[x] >= mount[x-y]:
            count+=1
    if x == count:
        list.append(x)

N=int(input())
mount=input().split()
print(mount)

list=[]
for z in range(1,len(mount)):
    calc(z)

print(1+len(list))

Submission status: Wrong Answer

Solution code:
n = int(input())
hight = input().split()
cnt = 1
max = hight[0]
for i in range(n-1):
    if max <= hight[i+1]:
        cnt = cnt +1
        max = hight[i+1]
    else:
         continue
        
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
count = 0
total = 0
H = []
s = input().split()

for i in range(N):
  H.append(int(s[i]))
  for j in range(i):
    if(H[i] >= H[j]):
      count = count + 1
  if(count == i):
    count = 0
    total = total + 1
    
print(total)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def calc(x): #i番目の山と1～i-1番目の山の高さを比較する
    global mount
    global list
    count=0
    for y in range(1,x+1):
        if mount[x] >= mount[x-y]:
            count+=1
    if x == count:
        list.append(x)

N=int(input()) #山の数

mount=input().split()#各山の高さ
print(mount)

list=[]#海が見える旅館の数
for z in range(1,len(mount)):
    calc(z)

print(1+len(list))

Submission status: Wrong Answer

Solution code:
N = int(input())
num = list(map(int, input().split()))
tmp = 0
state_tmp = 0
state = False
result = 1
#i番目を比べる
for i in range(N):
    if i != 0:
        for j in range(N):
            if num[j] <= num[i]:
                state_tmp +=1
        if state_tmp ==  N:
            if tmp <= num[i]:
                result +=1
            tmp = num[i]
        state_tmp = 0
    else:
        tmp = num[i]
        state_tmp = 0
    
print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=input()
b=input()

b=b.split(" ")
count=1
m=0
for x in range(len(b)-1):
    for i in range(x+1):
        if b[i]<=b[x+1]:
            m=m+1
    if m==x+1:
        count=count+1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
H = input().split()
i = int(0)
j = int(0)
n = int(1)
m = int(0)
for i in range(N-1):
    for j in range(i+1):
        if H[i] >= H[j]:
            m = m + 1
    if m == i+1:
        n = n + 1
print(n)

Submission status: Wrong Answer

Solution code:
a=input()
b=input()

b=b.split(" ")
count=1
m=0
for x in range(len(b)-1):
    for i in range(x+1):
        if b[i]<=b[i+1]:
            m=m+1
    if m==x+1:
        count=count+1
print(count)

Submission status: Wrong Answer

Solution code:
A = int(input())
l =input().split()
ans = 0

for t in range(1,A+1):
    tt = int(t)
    if int(l[tt-1]) == int(max(l[:tt])):
        ans += 1
    
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
listNum = [int(x) for x in input().split()]
answer = []
answer.append(listNum[0])
for i in range(1,n):
    if((listNum[0] <= listNum[i] and (listNum[2] <= listNum[i])) and (listNum[i-1] <= listNum[i])):
        answer.append(i)
print(len(answer))

Submission status: Wrong Answer

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

ans = 0
if N > 1:
  if H[0] <= H[1]:
    ans += 1
  for i in range(2, N):
    if (H[i] >= H[0]) and (H[i] >= H[1]) and (H[i] >= H[i - 1]):
      ans += 1
    else:
      break
print(ans + 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
H = input().split()
i = int(0)
j = int(0)
n = int(1)
m = int(0)
for i in range(N-1):
    for j in range(i):
        if H[i] >= H[j]:
            m = m + 1
    if m == i:
        n = n + 1
print(n)

Submission status: Wrong Answer

Solution code:
n = int(input())
listNum = [int(x) for x in input().split()]
answer = []
answer.append(listNum[0])
for i in range(1,n):
    if((listNum[0] <= listNum[i]) and (listNum[2] <= listNum[i]) and (listNum[i-1] <= listNum[i])):
        answer.append(i)
print(len(answer))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
input = sys.stdin.readline

# bisect_left(lists, 3)
# bisect_right(lists, 3)

def main():
	N = int(input())
	H = input().split(" ")
 
	ans = 0
	max = 0
	for i, val in enumerate(H):
		if i == 0:
			ans += 1
			max = val
			continue
		if max <= val:
			max = val
			ans += 1
			
 
	print(ans)

	
	
if __name__ == "__main__":
	main()

Submission status: Wrong Answer

Solution code:
i = list(map(int, input().split()))
num = 0
fast = i[0]
for con in i:
    if con >= fast:
        fast = con
        num += 1
print(num)

Submission status: Wrong Answer

Solution code:
a=input()
b=input()

b=b.split(" ")
count=1
m=0
for x in range(len(b)-1):
    for i in range(x):
        if b[i]<=b[x+1]:
            m=m+1
    if m==x:
        count=count+1
print(count)

Submission status: Wrong Answer

Solution code:
a=input()
b=input()

b=b.split(" ")
count=1
m=0
for x in range(len(b)-1):
    for i in range(len(b)-1):
        if b[i]<=b[i+1]:
            m=m+1
    if m==len(b)-1:
        count=count+1
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int, input().split()))
print(h)
a=1
flag=False
for j in range(0,n):
    for i in range(0,j):
        if h[i] <= h[j]:
            flag=True
        else:
            break
    if flag:
        a = a + 1
        flag=False

print(a)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
input = sys.stdin.readline

# bisect_left(lists, 3)
# bisect_right(lists, 3)

def main():
	N = int(input())
	H = input().split(" ")
 
	ans = 0
	max = 0
	for i, val in enumerate(H):
		if i == 0:
			ans += 1
			max = val
			continue
		if max < val:
			max = val
		if max <= H[i]:
			ans += 1
 
	print(ans)

	
	
if __name__ == "__main__":
	main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
i = list(map(int, input().split()))
num = 0
maxes = i[0]
for con in i:
    if con >= maxes:
        num += 1
print(num)

Submission status: Wrong Answer

Solution code:
N=int(input())
H=input()
ListA=[]
ListA=H.split()
for i in range(0,len(ListA),1):
  a=ListA.pop(i)
  b=int(a)
  ListA.insert(i,b)

c=0
for i in range(0,len(ListA),1):
  for j in range(0,i,1):
    ListB=ListA[:i+1]
    Num=ListA[j]
    if Num>=max(ListB):
      if j!=i:
        continue
      else:
        c+=1
    else:
      break
    
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for m in range(n):
    if a[m-1] < a[m]:
        c += 1
    else:
        pass

print(c)

Submission status: Wrong Answer

Solution code:
N = int(input())
num = list(map(int, input().split()))
tmp = 0
state_tmp = 0
state = False
result = 0
for i in range(N):
    if i != 0:
        for j in range(N):
            if num[j] <= num[i]:
                state_tmp = True
        if state_tmp:
            if tmp <= num[i]:
                result +=1
            tmp = num[i]
        state_tmp = False
    else:
        tmp = num[i]
    
print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=input()
b=input()

b=b.split(" ")
count=1
m=0

for x in range(len(b)-1):
    for i in range(len(b)-1):
        if b[x]<=b[x+1]:
            m=m+1
    if m==len(b)-1:
        count=count+1
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
hlist = input().split(' ')
counter = 0

for i in range(n):
    judge = False
    for j in range(i + 1):
        if hlist[j] <= hlist[i]:
            judge = True
        else:
            judge = False
            break
        if j == i and judge == True:
            counter = counter + 1

print(counter)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
a=map(int,input().split())
a=[6,5,6,8]
a=[i-a[0] for i in a]
cnt=0
for i in range(len(a)):
    if a[i]>=0:
        cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
from sys import stdin

ocean_view_num = 1
flag = 0

num = int(input())
height = list(map(int,input().split()))

for i in range(num):
    if i is not 0:
        flag = 1
        for j in range(i):
            if height[j - 1] > height[j]:
                flag = 0
                break 
        if flag == 1 : ocean_view_num += 1

print(ocean_view_num)

Submission status: Wrong Answer

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

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

print(ok + 1)

Submission status: Wrong Answer

Solution code:
N = int(input())
arr = input().split(" ")

if N == 1:
  print(1)
elif N == 2:
  if int(arr[1]) > int(arr[0]):
    print(2)
  else:
    print(1)
else:
  count = 1
  for i in range(len(arr)):
    if i == 0:
      pass
    else:
      if int(arr[i -1]) <= int(arr[i]):
        count += 1
  print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int,input().split()))
sum = 1
result = 0
if not(len(H) == 1):
    if H[0] <= H[1]:
        result = H[1]
    else:
        result = H[0]
    for i in range(1,len(H)):
        if H[i-1] <= H[i] and result <= H[i]:
            sum += 1


print(sum)

Submission status: Wrong Answer

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

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

print(x)

Submission status: Wrong Answer

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

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

print(ans + 1)

Submission status: Wrong Answer

Solution code:
n=int(input())
h_list=[int(i) for i in input().split()]
b = 1  # counter
c = 1  # answer
m = h_list[0]  # max height
while b != n:
    if h_list[b] >= m:
        c += 1
    b += 1
print(c)

Submission status: Wrong Answer

Solution code:
A = int(input())
l =input().split()
ans = 0

for t in range(1,A+1):
    tt = int(t)
    if l[tt-1] == max(l[:tt]):
        ans += 1
    
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
hi = np.array(list(map(int,input().split())))
hi_0 = hi[(hi -hi[0])>=0]-hi[0]
result = sum([-1 for i in range(1,len(hi_0)) if hi_0[i]-hi_0[i-1]<0])+len(hi_0)
print(result)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = input().split()
maxH = H[0]
look = 1
for i in range(N-1):
  if N == 1:
    print(look)
  elif H[i+1] >= maxH:
    look = look + 1
    maxH = H[i+1]
  else:
    maxH = maxH
print(look)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def split_returner(chardata):
        chardata = str(chardata).split(" ")
        for i in range(0,len(chardata)):
            chardata[i] = int(chardata[i])
        return chardata
        
higher = input()
ab = split_returner(str(input()))
result = 1
for i in range(1,len(ab)):
    if ab[i] >= ab[0] and ab[i] >= ab[i-1]:
        for k in range(1,i-1):
            if ab[i] < ab[k]:
                result -= 1
        result+= 1
print(result)

Submission status: Wrong Answer

Solution code:
n = input()
hights = input().split()
result = 1
if max(hights) == hights[0]:
  print(1)
else:
  for idx, h in enumerate(hights):
    tmp = 0
    total = 0
    for i in hights[:idx]:
      total += 1
      if i < h:
        tmp += 1
    if tmp == total:
      result += 1
  print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
h_list=[int(i) for i in input().split()]
b = 1  # counter
c = 1  # answer
m = h_list[0]  # max height
while b != n:
    if h_list[b] > m:
        c += 1
    b += 1
print(c)

Submission status: Wrong Answer

Solution code:
a=input()
b=input()

b=b.split(" ")
count=1

for x in range(len(b)-1):
    if b[x]<=b[x+1] and b[0]<=b[x+1] and b[1]<=b[x+1]:
        count=count+1
print(count)

Submission status: Wrong Answer

Solution code:
def split_returner(chardata):
        chardata = str(chardata).split(" ")
        for i in range(0,len(chardata)):
            chardata[i] = int(chardata[i])
        return chardata
higher = input()
ab = split_returner(str(input()))
result = 1
for i in range(1,len(ab)):
    if ab[i] >= ab[0] and ab[i] >= ab[i-1]:
        for k in range(i-1):
            if ab[i] < ab[k]:
                result -= 1
        result+= 1
print(result)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

a = int (input())
b = [int(a) for a in input().split()]
count=1
count1=0
le = len(b)-1

for i in range(le):
    if(b[i]<=b[i+1] and b[0]<=b[i+1] ):
        count=count+1
print(count)

Submission status: Wrong Answer

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

ans = n
for i in range(n-1):
    if h[i] > h[i+1]:
        ans = i + 1
        break
print("\n")
print(ans)

Submission status: Wrong Answer

Solution code:
a=input()
b=input()

b=b.split(" ")
count=1

for x in range(len(b)-1):
    if b[x]<=b[x+1] and b[0]<=b[x+1] and b[1]<=b[x+1]:
        count=count+1
print(count)

Submission status: Wrong Answer

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

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

print(res)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = input()
H = [s for s in input().split()]

HIEST = H[0]
COUNT = 0
for i in H:

    if i >= HIEST:
        HIEST = i
        COUNT = COUNT+1

print(COUNT)

Submission status: Wrong Answer

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