TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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?

Submission attempts (in order):
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)

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)

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)

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)

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])
print(cnt)

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])
print(cnt)

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])
print(cnt)

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])
print(cnt)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: 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?

Submission attempts (in order):
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)


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)


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)


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)


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)


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)


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)


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)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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?

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

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

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

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

N = int(input())
Hlist = list(map(int, input().split()))
count=0
maxHi=1
for i in range(N):
    if Hlist[0] >= maxHi:
        count+=1
        maxHi=Hlist.pop(0)
    else:
        del Hlist[0]
print(count)

N = int(input())
Hlist = list(map(int, input().split()))
count=0
maxHi=1
for i in range(N):
    if Hlist[0] >= maxHi:
        count+=1
        maxHi=Hlist.pop(0)
    else:
        del Hlist[0]
print(count)

N = int(input())
Hlist = list(map(int, input().split()))
count=0
maxHi=1
for i in range(N):
    if Hlist[0] >= maxHi:
        count+=1
        maxHi=Hlist.pop(0)
    else:
        del Hlist[0]
print(count)

N = int(input())
Hlist = list(map(int, input().split()))
count=0
maxHi=1
for i in range(N):
    if Hlist[0] >= maxHi:
        count+=1
        maxHi=Hlist.pop(0)
    else:
        del Hlist[0]
print(count)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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?

Submission attempts (in order):
# -*- coding: utf-8 -*-
N = int(input())
lst = list(map(int,input().split()))

ans = 0
for i in range(N):
    flag = True
    for j in range(N-1):
        if lst[j] > lst[i]:
            flag = False 
    if flag:
        ans = ans + 1

print(sum)

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

ans = 0
for i in range(N):
    flag = True
    for j in range(N-1):
        if lst[j] > lst[i]:
            flag = False 
    if flag:
        ans = ans + 1

print(sum)

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

ans = 0
for i in range(N):
    flag = True
    for j in range(N-1):
        if lst[j] > lst[i]:
            flag = False 
    if flag:
        ans = ans + 1

print(sum)

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

ans = 0
for i in range(N):
    flag = True
    for j in range(N-1):
        if lst[j] > lst[i]:
            flag = False 
    if flag:
        ans = ans + 1

print(sum)

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

max = 0
sum = 0
for i in range(N):
    if max <= lst[i]:
        sum = sum + 1
        max = lst[i]

print(sum)

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

max = 0
sum = 0
for i in range(N):
    if max <= lst[i]:
        sum = sum + 1
        max = lst[i]

print(sum)

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

max = 0
sum = 0
for i in range(N):
    if max <= lst[i]:
        sum = sum + 1
        max = lst[i]

print(sum)

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

max = 0
sum = 0
for i in range(N):
    if max <= lst[i]:
        sum = sum + 1
        max = lst[i]

print(sum)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: 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?

Submission attempts (in order):
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)

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)

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)

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)

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] == max(h[0:i+1]):
        n = n+1
print(n)

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] == max(h[0:i+1]):
        n = n+1
print(n)

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] == max(h[0:i+1]):
        n = n+1
print(n)

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] == max(h[0:i+1]):
        n = n+1
print(n)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: 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?

Submission attempts (in order):
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)

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)

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)

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)

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: 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?

Submission attempts (in order):
N = int(input())
H = list(map(int,input().split()))
result = 1
for i in range(1,len(H)):
  if H[i] < H[i+1]:
    result += 1
  else:
    break
print(result)

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

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

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

N = int(input())
H = list(map(int,input().split()))
A = H[0]
result = 0
for i in range(len(H)):
  if A <= H[i]:
    result += 1
    A = H[i]
  else:
    None
print(result)


N = int(input())
H = list(map(int,input().split()))
A = H[0]
result = 0
for i in range(len(H)):
  if A <= H[i]:
    result += 1
    A = H[i]
  else:
    None
print(result)


N = int(input())
H = list(map(int,input().split()))
A = H[0]
result = 0
for i in range(len(H)):
  if A <= H[i]:
    result += 1
    A = H[i]
  else:
    None
print(result)


N = int(input())
H = list(map(int,input().split()))
A = H[0]
result = 0
for i in range(len(H)):
  if A <= H[i]:
    result += 1
    A = H[i]
  else:
    None
print(result)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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?

Submission attempts (in order):
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)

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)

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)

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)

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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?

Submission attempts (in order):
N=int(input("N"))
H = list(map(int, input("H").split(" ")))

m=0
num = 0
for h in H:
    if h>=m:
        num +=1
        m=h

print(num)


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

m=0
num = 0
for h in H:
    if h>=m:
        num +=1
        m=h

print(num)


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

m=0
num = 0
for h in H:
    if h>=m:
        num +=1
        m=h

print(num)


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

m=0
num = 0
for h in H:
    if h>=m:
        num +=1
        m=h

print(num)


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

m=0
num = 0
for h in H:
    if h>=m:
        num +=1
        m=h

print(num)


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

m=0
num = 0
for h in H:
    if h>=m:
        num +=1
        m=h

print(num)


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

m=0
num = 0
for h in H:
    if h>=m:
        num +=1
        m=h

print(num)


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

m=0
num = 0
for h in H:
    if h>=m:
        num +=1
        m=h

print(num)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: 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?

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

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

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

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

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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?

Submission attempts (in order):
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)
    

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)
    

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)
    

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)
    

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: 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?

Submission attempts (in order):

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

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

print(count)


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

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

print(count)


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

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

print(count)


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

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

print(count)

N = int(input())
nums = list(map(int, input().split()))
 
maxx = 0
count = 0
for n in nums:
    if n>=maxx:
        maxx = n
        count += 1
 
print(count)

N = int(input())
nums = list(map(int, input().split()))
 
maxx = 0
count = 0
for n in nums:
    if n>=maxx:
        maxx = n
        count += 1
 
print(count)

N = int(input())
nums = list(map(int, input().split()))
 
maxx = 0
count = 0
for n in nums:
    if n>=maxx:
        maxx = n
        count += 1
 
print(count)

N = int(input())
nums = list(map(int, input().split()))
 
maxx = 0
count = 0
for n in nums:
    if n>=maxx:
        maxx = n
        count += 1
 
print(count)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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?

Submission attempts (in order):
N = int(input())
H = list(map(int, input().split()))

first = H[0]
for i, h in enumerate(H[1:]):
    if first > h:
        break
    first = h
print(i+1)

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

first = H[0]
for i, h in enumerate(H[1:]):
    if first > h:
        break
    first = h
print(i+1)

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

first = H[0]
for i, h in enumerate(H[1:]):
    if first > h:
        break
    first = h
print(i+1)

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

first = H[0]
for i, h in enumerate(H[1:]):
    if first > h:
        break
    first = h
print(i+1)

N = int(input())
H = list(map(int, input().split()))
 
count = 0
for i, h in enumerate(H):
    if i == 0:
        count += 1
    elif i == 1:
        count += 1 if  H[1] >= H[0] else 0
    else:
        count += 1 if h >= max(H[:i]) else 0
print(count)

N = int(input())
H = list(map(int, input().split()))
 
count = 0
for i, h in enumerate(H):
    if i == 0:
        count += 1
    elif i == 1:
        count += 1 if  H[1] >= H[0] else 0
    else:
        count += 1 if h >= max(H[:i]) else 0
print(count)

N = int(input())
H = list(map(int, input().split()))
 
count = 0
for i, h in enumerate(H):
    if i == 0:
        count += 1
    elif i == 1:
        count += 1 if  H[1] >= H[0] else 0
    else:
        count += 1 if h >= max(H[:i]) else 0
print(count)

N = int(input())
H = list(map(int, input().split()))
 
count = 0
for i, h in enumerate(H):
    if i == 0:
        count += 1
    elif i == 1:
        count += 1 if  H[1] >= H[0] else 0
    else:
        count += 1 if h >= max(H[:i]) else 0
print(count)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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?

Submission attempts (in order):
n=int(input())
h=list(map(int,input().split()))
cnt=1
if n==1:
  print(1)
else:
  for i in range(1,n):
  if all(h[i]>=h[j] for j in range(i-1)):
    cnt+=1
  print(cnt)


n=int(input())
h=list(map(int,input().split()))
cnt=1
if n==1:
  print(1)
else:
  for i in range(1,n):
  if all(h[i]>=h[j] for j in range(i-1)):
    cnt+=1
  print(cnt)


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

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

n=int(input())
h=list(map(int,input().split()))
cnt=1
if n==1:
  print(1)
else:
  for i in range(1,n):
  if all(h[i]>=h[j] for j in range(i-1)):
    cnt+=1
  print(cnt)


n=int(input())
h=list(map(int,input().split()))
cnt=1
if n==1:
  print(1)
else:
  for i in range(1,n):
  if all(h[i]>=h[j] for j in range(i-1)):
    cnt+=1
  print(cnt)


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

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

n=int(input())
h=list(map(int,input().split()))
cnt=1
if n>=2:
  for i in range(1,n):
    if all(h[i]>=h[j] for j in range(i)):
      cnt+=1
  print(cnt)
else:
  print(1)


n=int(input())
h=list(map(int,input().split()))
cnt=1
if n>=2:
  for i in range(1,n):
    if all(h[i]>=h[j] for j in range(i)):
      cnt+=1
  print(cnt)
else:
  print(1)


n=int(input())
h=list(map(int,input().split()))
cnt=1
if n>=2:
  for i in range(1,n):
    if all(h[i]>=h[j] for j in range(i)):
      cnt+=1
  print(cnt)
else:
  print(1)


n=int(input())
h=list(map(int,input().split()))
cnt=1
if n>=2:
  for i in range(1,n):
    if all(h[i]>=h[j] for j in range(i)):
      cnt+=1
  print(cnt)
else:
  print(1)


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: 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?

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

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

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

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

N = int(input())
H = list(map(int,input().strip().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)


N = int(input())
H = list(map(int,input().strip().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)


N = int(input())
H = list(map(int,input().strip().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)


N = int(input())
H = list(map(int,input().strip().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)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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?

Submission attempts (in order):
N = int(input())
H = list(map(int, input().split())) 

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

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

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

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

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

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

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

N = int(input())
H = list(map(int, input().split())) 
 
k= 1
for i in range(1,N):
    if sorted(H[0:i])[-1]<=H[i]:
        k=k+1
    else:
        k=k
print(k)

N = int(input())
H = list(map(int, input().split())) 
 
k= 1
for i in range(1,N):
    if sorted(H[0:i])[-1]<=H[i]:
        k=k+1
    else:
        k=k
print(k)

N = int(input())
H = list(map(int, input().split())) 
 
k= 1
for i in range(1,N):
    if sorted(H[0:i])[-1]<=H[i]:
        k=k+1
    else:
        k=k
print(k)

N = int(input())
H = list(map(int, input().split())) 
 
k= 1
for i in range(1,N):
    if sorted(H[0:i])[-1]<=H[i]:
        k=k+1
    else:
        k=k
print(k)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())
data = list(map(int, input().split()))

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

print(ans)


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

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

print(ans)


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

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

print(ans)


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

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

print(ans)


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

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

print(ans)


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

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

print(ans)


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

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

print(ans)


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

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

print(ans)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: 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?

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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?

Submission attempts (in order):
n = int(input())
hs = list(map(int, input().split()))

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

print(answer)

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

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

print(answer)

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

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

print(answer)

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

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

print(answer)

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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?

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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?

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

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

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)

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)

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

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

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)

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)

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)

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)

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)

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)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: 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?

Submission attempts (in order):
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)

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)

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)

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)

N = int(input())

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

H_Count = 1

for i in range(1,N):
    for j in range(N-1):
        if H_list_int[i] < H_list_int[j]:
            break
        else:
            if j == i-1:
                H_Count += 1
            else:
                continue

print(H_Count)

N = int(input())

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

H_Count = 1

for i in range(1,N):
    for j in range(N-1):
        if H_list_int[i] < H_list_int[j]:
            break
        else:
            if j == i-1:
                H_Count += 1
            else:
                continue

print(H_Count)

N = int(input())

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

H_Count = 1

for i in range(1,N):
    for j in range(N-1):
        if H_list_int[i] < H_list_int[j]:
            break
        else:
            if j == i-1:
                H_Count += 1
            else:
                continue

print(H_Count)

N = int(input())

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

H_Count = 1

for i in range(1,N):
    for j in range(N-1):
        if H_list_int[i] < H_list_int[j]:
            break
        else:
            if j == i-1:
                H_Count += 1
            else:
                continue

print(H_Count)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted