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 = int(input())
h = list(map(int,input().split(' ')))
ans = 1
i = 1
h0 = h[0]
while i < n:
    if h[i] > h0:
        ans += 1
        h0 = h[i]
    i += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
arr = input().split()
num = 1
tmp = arr[0]

for i in range(N-1):
	if arr[i+1] >= tmp:
		num += 1
		tmp = arr[i+1]

print(num)

Submission status: Wrong Answer

Solution code:
N = int(input())
arr = input().split()
num = 1
tmp = arr[0]

for i in range(N-1):
	if arr[i+1] > tmp:
		num += 1
		tmp = arr[i+1]

print(num)

Submission status: Wrong Answer

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

for i in range(N-1):
	if arr[i+1] > arr[i]:
		num += 1

print(num)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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


ans = 1

if n == 1:
    pass

elif n == 2:
    if points[1] >= points[0]:
        ans += 1
        
# elif n >= 3:
#     need_height = max(points[0], points[1])
#     for i in range(1, n):
#         current = points[i]
#         
#         if need_height <= current and points[i-1] <= current:
#             ans += 1


print(ans)

Submission status: Wrong Answer

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


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


ans = 1

if n == 1:
    pass

# elif n == 2:
#     if points[1] >= points[0]:
#         ans += 1
        
elif n >= 3:
    need_height = max(points[0], points[1])
    for i in range(1, n):
        current = points[i]
        
        if need_height <= current and points[i-1] <= current:
            ans += 1


print(ans)

Submission status: Wrong Answer

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


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


ans = 1

if len(points) == 1:
    pass

elif len(points) == 2:
    if points[1] >= points[0]:
        ans += 1

elif len(points) >= 3:
    need_height = max(points[0], points[1])
    for i in range(1, len(points)):
        current = points[i]
        
        if need_height <= current:
            if points[i-1] <= current:
                ans += 1


print(ans)

Submission status: Wrong Answer

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


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


ans = 1

if len(points) == 1:
    pass

elif len(points) == 2:
    if points[1] >= points[0]:
        ans += 1

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


print(ans)

Submission status: Wrong Answer

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


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


ans = 1

if len(points) == 1:
    pass

elif len(points) == 2:
    if points[0] <= points[1]:
        ans += 1

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


print(ans)

Submission status: Wrong Answer

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


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


ans = 1

if len(points) == 1:
    pass 

elif len(points) == 2:
    if points[0] <= points[1]:
        ans += 1

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    a = int(input())
    ryokan= input().split(" ")
    total=1
    for x in range(1,a):
        flag=True
        for y in range(x-1):
            if int(ryokan[x])<=int(ryokan[y]):
                flag=False
                break
        if flag:
            total+=1
                
    print(total)

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    a = int(input())
    ryokan= input().split(" ")
    total=1
    for x in range(1,a):
        flag=True
        for y in range(x-1):
            if int(ryokan[x])<=int(ryokan[y]):
                flag=False
                break
        if flag:
            print(x)        
            total+=1
                
    print(total)

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    a = int(input())
    ryokan= input().split(" ")
    total=1
    for x in range(1,a):
        flag=True
        for y in range(x):
            if int(ryokan[x])<=int(ryokan[y]):
                flag=False
                break
        if flag:
            print(x)        
            total+=1
                
    print(total)

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    a = int(input())
    ryokan= input().split(" ")
    total=1
    for x in range(1,a):
        flag=True
        for y in range(x):
            if int(ryokan[x])<int(ryokan[y]):
                flag=False
                break
        if flag:
            print(x)        
            total+=1
                
    print(total)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
count = 0

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

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

Submission status: Wrong Answer

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

max = h[0]
ans = 1

for i in h:
    if max<=i:
        ans += 1
        max = i
print(ans)

Submission status: Wrong Answer

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

max = h[0]
ans = 1

for i in h:
    if max<i:
        ans += 1
        max = i
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())
h_list = input().split()
GetView = 0

for i in range(N):
    count = 1
    print("first:",i)
    for j in range(i):
        print("secound:",j)
        if int(h_list[j]) > int(h_list[i]):
            count = 0
            break;

    if count == 1:
        GetView += 1
        print("third:",i)

print(GetView)

Submission status: Wrong Answer

Solution code:
N = int(input())
h_list = input().split()
GetView = 0

for i in range(N):
    count = 1
    print("first:",i)
    for j in range(i):
        print("secound:",j)
        if h_list[j] > h_list[i]:
            count = 0
            break;

    if count == 1:
        GetView += 1
        print("third:",i)

print(GetView)

Submission status: Wrong Answer

Solution code:
N = int(input())
h_list = input().split()
GetView = 0

for i in range(N):
    count = 1
    
    for j in range(i):
        
        if h_list[j] > h_list[i]:
            count -= 1
            break;

    if count == 1:
        GetView += 1

print(GetView)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
li = input().split()
cnt = 0
high = '0'

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(1,n):
    print(h[i])
    print('----------')
    for j in range(i):
        print(h[j])
        print('---')
        if h[i]<h[j]:break
        elif j==i-1:
            a+=1

print(str(a)+'\n')

Submission status: Wrong Answer

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

for i in range(1,n):
    print(h[i])
    print('----------')
    for j in range(i):
        print(h[j])
        print('---')
        if h[i]<h[j]:break
        elif j==i-1:
            a+=1

print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int, input().split()))
sum = 0
for i in range(N):
    h = [H[j] for j in range(i+1)]
    if i == 0:
        sum += 1
        continue
    if H[i] == max(h):
        sum += 1
    print(h, H[i])
print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
h = [int(x) for x in stdin.readline().rstrip().split()]
ans = 1
tmp = h[0]
for i in range(n - 1):
    print(i)
    ans += 1 if tmp <= h[i + 1] else 0
    tmp = max(tmp, h[i + 1])
print("{}".format(ans))

Submission status: Wrong Answer

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
h = [int(x) for x in stdin.readline().rstrip().split()]
ans = 1
tmp = h[0]
for i in range(n - 1):
    ans += 1 if tmp <= h[i + 1] else 0
    tmp = max(h[i], h[i + 1])
print("{}".format(ans))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
h = list(map(int, input().split()))
count = 1


for i in range(1, len(h)):
    for m in range(0,i):
        if h[i] < h[m]:
            break
        if m == i - 2:
            count += 1

print(count)

Submission status: Wrong Answer

Solution code:
N,*H = map(int, open(0).read().split())
#print(N,H)
L = 0
for i in range(N):
    if i == 0:
        L+=1
    elif H[i-1] <= H[i]:
        L+=1
print(L)

Submission status: Wrong Answer

Solution code:
N,*H = map(int, open(0).read().split())
#print(N,H)
L = 0
for i in range(len(H)):
    if i == 0:
        L+=1
    elif H[i-1] <= H[i]:
        L+=1
print(L)

Submission status: Wrong Answer

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
h = [int(x) for x in stdin.readline().rstrip().split()]
ans = 1
if n > 1:
    ans += 1 if h[0] <= h[1] else 0
for i in range(n - 2):
    ans += 1 if h[i + 1] <= h[i + 2] else 0
print("{}".format(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())

height = list(input().split())
max_height = height[0]
result = 0

for i in range(N):
    if max_height <= height[i]:
        result = result + 1
        max_height = height[i]
        
print(result)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int, input().split()))
print(len(list(filter(lambda hn:h[0]<=hn, h))))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin
n = int(stdin.readline().rstrip())
h = [int(x) for x in stdin.readline().rstrip().split()]
ans = 1
for i in range(n - 2):
    ans += 1 if h[i + 1] <= h[i + 2] else 0
print("{}".format(ans))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin
n = int(stdin.readline().rstrip())
h = [int(x) for x in stdin.readline().rstrip().split()]
ans = 1
for i in range(n):
    ans += 1 if h[i - 1] <= h[i] else 0
print("{}".format(ans))

Submission status: Wrong Answer

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


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

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

for i in range(n):
  if i == 0 or hmax <= h[i]:
    hmax = h[i]
    hct += 1
  else:
    None
print(hct)

Submission status: Wrong Answer

Solution code:
n = int(input())
l = [int(x) for x in 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 = l[i]
    else:
        continue
print(result)

Submission status: Wrong Answer

Solution code:
n = int(input())
l = [int(x) for x in 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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

num = 0

for i in range(N):
	for j in range(0,i+1):
		#print('i='+str(i))
		#print(input[i-1])
		#print('j='+str(j))
		#print(input[j])
		#print('next')
		if i == 1:
			num += 1
			
		elif input[i-1] >= input[j]:
			if i-1 == j:
				num += 1
				break
			continue
		
		else:
			#print(input[i-1])
			#print(input[j])
			break
print(num)

Submission status: Wrong Answer

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

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

print(cnt)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(input())
Hlist = input().split()
nlist = []
for t in Hlist:
    nlist.append(int(t))
k = nlist[0]
p = 1
for t in range(1,len(nlist)):
    if nlist[t] >= k:
        p+=1
        k = nlist[t]
    else:
        k = nlist[t-1]
print(p)

Submission status: Wrong Answer

Solution code:
N=input()
li = input().split()

count=1

for i in range(1,len(li)):
    if li[i-1]<=li[i]:
        count +=1
    else:
        break
    
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())

H_list_str = input().split()
H_list_int = list(map(int,H_list_str))

M = max(H_list_int)
H_Count = 0
for i in range(N):
    if H_list_int[i] == M:
        H_Count += 1

print(H_Count)

Submission status: Wrong Answer

Solution code:
N = input()
print(N)

Submission status: Wrong Answer

Solution code:
import sys

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

ans = 1
mx = line[0]


for i in range(1,line.index(max(line))):
	if line[i] >= mx:
		ans += 1
		mx = line[i]

for i in range(line.index(max(line)),len(line)):
	if len(line)!=1 and line[i] == max(line):
		ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
import sys

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

ans = 1
mx = line[0]


for i in range(1,line.index(max(line))):
	if line[i] >= mx:
		ans += 1
		mx = line[i]
ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=list(input().split())
m=0
for i in range(n):
  for j in range(i):
    if l[j]>l[i]:
      break
  else:
    m+=1
print(m)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

h_max=h[0]

if n == 1:
    print(1)

else:
  for i in range(1,n):
    if h[i]>=h_max:
      x += 1
      h_max=h[i]
  
  print(x)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(input())

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

print(cnt)

Submission status: Wrong Answer

Solution code:
import sys
 
def main():
    input = sys.stdin.readline
    N = int(input())
    A = list(map(int, input().split()))
 
    ans = 0
    H = A[0]
    for a in A:
        if a >= H:
            ans += 1
 
        H = max(H, a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0
#処理 i番目のHがそれ以前以上の高さか調べる
for i in  range(N):
    l = H[:+1]
    if max(l) == H[i]:
        ans += 1

#出力
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
l=input().split()
view_point=1
i=1
while i<N:
    if l[i-1]<l[i]:
        view_point=view_point+1
    i=i+1
print(view_point)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

max = b[0]
ans = 1
for i in range(0,N):
    flag = False
    for t in range(0,i):
        #print(t)
        if b[i] <= b[t]:
            flag = True
    if flag == True:
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
Hs = input().strip().split(' ')
ans = 0;
H = 0;
for i in Hs:
  i = int(i)
  if (i >= H):
  	ans += 1
  H = max(H, i)

print(ans)

Submission status: Wrong Answer

Solution code:
Hs = input().strip().split(' ')
ans = 0;
H = 0;
for i in Hs:
  i = int(i)
  if (i > H):
  	ans += 1
  H = max(H, i)

print(ans)

Submission status: Wrong Answer

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

count_ans = 0
count_big = 0
for ii in range(len(H)):
    if ii == 0:
        tmp = H[0]
        count_ans += 1
    else:
        if tmp < H[ii]:
            count_big += 1
            count_ans += 1
        elif tmp == H[ii]:
            if count_big == 0:
                count_ans += 1

print(count_ans)

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())
numlist=list(map(int,input().split()))
count=1
for i in range(n):
  for j in range(i):
    if numlist[i]<numlist[j]:
      break
  else:
    count+=1
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
list = input().split()
 
M = 0
is_cand = True
for i in range(0, N): #H1からHiまで
  is_cand = True
  for j in range(0, i): #H2からHi-1まで
    if list[i] < list[j]: #ここを抜けたら海を眺めることができる
      is_cand = False
      break
    if is_cand:
      M += 1
print(M)

Submission status: Wrong Answer

Solution code:
N = int(input())
list = input().split()
M = 0
for i in range(0, N):
  is_cand = True
  for j in range(0, i):
    if list[j] > list[i]:
      is_cand = False
      break
    if is_cand:
      M += 1
print(M)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
import random
N = random.randint(1,20)
num = 0
list = []
for i in range(0,N):
    Hi = random.randint(1,100)
    list.append(Hi)
    a = list[0]
    b = list[i]
    if a <= b:
            num += 1   
   
print(N)
print(list) 
print(num)

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  :
        count += 1
        if stn > HList[i] :
            stn = HList[i]

print(count)

Submission status: Wrong Answer

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

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[i - 1]:
      ans += 1
    else:
      break
print(ans + 1)

Submission status: Wrong Answer

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

for i in range(1,len(l)):
    for j in range(i-1):
        if int(l[j]) >= int(l[i]) :
            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()))

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

print(ans + 1)

Submission status: Wrong Answer

Solution code:
N = int(input())
hlist = [int(x) for x in input().split()]
max_index = max( [i for i, x in enumerate(hlist) if x == max(hlist)] )
print(max_index - 1)

Submission status: Wrong Answer

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

a = H[0]
vis = 0
for i in H:
    if i >= a:
        vis += 1
        a = i
    else:
        pass

print(vis)

Submission status: Wrong Answer

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

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

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 = [0]*n
h = input().split(" ")
h[0]=int(h[0])
for i in range(n):
    h[i] = int(h[i])

counter = 0

#
for i in range(n):
   # print("i=",i)
    
    counter_2 = 0
    for j in range(0,i+1):
       # print("h[", j, "]=" ,h[j])
        if h[i] >= h[j]:
            counter_2 += 1
        else:
            counter_2 += 0
        
    if counter_2 == i:
        counter += 1
    
   # print("\n")

print(counter)

Submission status: Wrong Answer

Solution code:
nom = int(input())
heights_str = input()
i = 0
r = 1


heights = heights_str.split()


list(map(lambda x: int(x), heights))


max = heights[i]

if nom >= 2:
  while i+1 != nom:
    if heights[i] <= heights[i+1]:
      r += 1
      i+=1
      max = heights[i]
      
    else:
      i+=1
    
    if i == nom: break

print(r)

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
        if stn > HList[i] :
            stn = HList[i]

print(count)

Submission status: Wrong Answer

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

a = H[0]
vis = 0
for i in H:
    if i >= a:
        vis += 1
    else:
        pass

print(vis)

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-1] <= listNum[i]):
        answer.append(i)
print(len(answer))

Submission status: Wrong Answer

Solution code:
n = int(input())
h = [0]*n
h = input().split(" ")
for i in range(n):
    h[i] = int(h[i])

counter = 0

#
for i in range(n):
   # print("i=",i)
    
    counter_2 = 0
    for j in range(0,i+1):
       # print("h[", j, "]=" ,h[j])
        if h[i] >= h[j]:
            counter_2 += 1
        else:
            counter_2 += 0
        
    if counter_2 == i:
        counter += 1
    
   # print("\n")

print(counter)

Submission status: Wrong Answer

Solution code:
def main():
	N = int(input())
	HeightList = list(map(int, input().split()))

	numOfOceanView = 1
	max = HeightList[0] # 0origin
	for i in range(0, N):
		if max < HeightList[i]:
			max = HeightList[i]
			numOfOceanView += 1
	print(numOfOceanView)

main()

Submission status: Wrong Answer

Solution code:
N = int(input())

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
nom = int(input())
heights_str = input()
i = 0
r = 1


heights = heights_str.split()


list(map(lambda x: int(x), heights))


max = heights[i]

while i+1 != nom:
  if heights[i] <= heights[i+1]:
    r += 1
    i+=1
    max = heights[i]
    
  else:
    i+=1
  
  if i == nom: break

print(r)

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
        continue
    elif HList[i] >= stn and HList[i] >= HList[i-1] :
        count += 1
    if stn > HList[i] :
        stn = HList[i]

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(x+1):
        if not(b[i]<=b[x+1]):
            m=1
    if m==0:
    	count=count+1
    m=0       
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
hlist = [int(x) for x in input().split()]
count = 0
for idx in range(0, len(hlist)-1):
    #print(idx)
    if hlist[idx] <= hlist[idx + 1]:
        #print("途中",idx)
        count += 1
    else:
        if idx == 0:
            count = 1
        else:
            pass
print(count)

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+2:
      ans+=1
      cnt=0
      break


print(ans)