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

c = 0
highest = 0
for i in range(n):
	if highest <= h[i]:
		c += 1
        highest = h[i]

print(c)

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

c = 0
highest = 0
for i in range(n):
	if highest <= h[i]:
		c += 1
        highest = h[i]

print(c)

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

c = 0
highest = 0
for i in range(n):
	if highest <= h[i]:
		c += 1
        highest = h[i]

print(c)

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

c = 0
highest = 0
for i in range(n):
	if highest <= h[i]:
		c += 1
        highest = h[i]

print(c)

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

c = 0
highest = 0
for i in range(n):
	if highest <= h[i]:
		c += 1
		highest = h[i]

print(c)

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

c = 0
highest = 0
for i in range(n):
	if highest <= h[i]:
		c += 1
		highest = h[i]

print(c)

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

c = 0
highest = 0
for i in range(n):
	if highest <= h[i]:
		c += 1
		highest = h[i]

print(c)

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

c = 0
highest = 0
for i in range(n):
	if highest <= h[i]:
		c += 1
		highest = h[i]

print(c)

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):
import sys
n=int(input())
h=list(map(int, input().split()))
count=0
max=0
for i in range(n-1):
    if h[i]>=max:
        max=h[i]
        count+=1
print(count)

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

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

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

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

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

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

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

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,*H = map(int,open(0).read().split())
t = 0
h = 0
for i in H:
    if i >= h:
        t += 1
    else:
        h = i        
print(t)

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

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

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

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

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

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

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

N = int(input())
H = list(map(int,input().split()))
t = 0
h = 0
for i in H:
    if i >= h:
        t += 1
        h = i
print(t)

N = int(input())
H = list(map(int,input().split()))
t = 0
h = 0
for i in H:
    if i >= h:
        t += 1
        h = i
print(t)

N = int(input())
H = list(map(int,input().split()))
t = 0
h = 0
for i in H:
    if i >= h:
        t += 1
        h = i
print(t)

N = int(input())
H = list(map(int,input().split()))
t = 0
h = 0
for i in H:
    if i >= h:
        t += 1
        h = i
print(t)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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):
5
4 5 3 5 4

5
4 5 3 5 4

5
4 5 3 5 4

5
4 5 3 5 4

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

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

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

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

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

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


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

count = 0

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


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

count = 0

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


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

count = 0

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


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

count = 0

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


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

count = 0

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


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

count = 0

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


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

count = 0

for i in range(n):
    if h[i] == max(h[:i+1]) :
        count = 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())
num_list = [ int(v) for v in range(n)]
s = 0
for i in range(n):
	if max(num_list[:i+1]) <= i:
		s += 1
print(s)

n = int(input())
num_list = [ int(v) for v in range(n)]
s = 0
for i in range(n):
	if max(num_list[:i+1]) <= i:
		s += 1
print(s)

n = int(input())
num_list = [ int(v) for v in range(n)]
s = 0
for i in range(n):
	if max(num_list[:i+1]) <= i:
		s += 1
print(ans)

n = int(input())
num_list = [ int(v) for v in range(n)]
s = 0
for i in range(n):
	if max(num_list[:i+1]) <= i:
		s += 1
print(ans)

n = int(input())
num_list = [ int(v) for v in range(n)]
s = 0
for i in range(n):
	if max(num_list[:i+1]) <= num_list[i]:
		s += 1
print(s)

n = int(input())
num_list = [ int(v) for v in range(n)]
s = 0
for i in range(n):
	if max(num_list[:i+1]) <= num_list[i]:
		s += 1
print(s)

n = int(input())
num_list = [ int(v) for v in range(n)]
s = 0
for i in range(n):
	if max(num_list[:i+1]) <= i:
		s += 1
print(s)

n = int(input())
num_list = [ int(v) for v in range(n)]
s = 0
for i in range(n):
	if max(num_list[:i+1]) <= i:
		s += 1
print(s)

n = int(input())
num_list = [ int(v) for v in range(n)]
s = 0
for i in range(n):
	if max(num_list[:i+1]) <= i:
		s += 1
print(ans)

n = int(input())
num_list = [ int(v) for v in range(n)]
s = 0
for i in range(n):
	if max(num_list[:i+1]) <= i:
		s += 1
print(ans)

n = int(input())
num_list = [ int(v) for v in range(n)]
s = 0
for i in range(n):
	if max(num_list[:i+1]) <= num_list[i]:
		s += 1
print(s)

n = int(input())
num_list = [ int(v) for v in range(n)]
s = 0
for i in range(n):
	if max(num_list[:i+1]) <= num_list[i]:
		s += 1
print(s)

n = int(input())
num_list = [ int(v) for v in input().split() ]
s = 0
for i in range(n):
  if max(num_list[:i+1]) <= num_list[i]:
    s += 1
print(s)

n = int(input())
num_list = [ int(v) for v in input().split() ]
s = 0
for i in range(n):
  if max(num_list[:i+1]) <= num_list[i]:
    s += 1
print(s)

n = int(input())
num_list = [ int(v) for v in input().split() ]
s = 0
for i in range(n):
  if max(num_list[:i+1]) <= num_list[i]:
    s += 1
print(s)

n = int(input())
num_list = [ int(v) for v in input().split() ]
s = 0
for i in range(n):
  if max(num_list[:i+1]) <= num_list[i]:
    s += 1
print(s)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

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

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

print(c)


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

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

print(c)


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

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

print(c)


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

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

print(c)


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

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

print(c)




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

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

print(c)




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

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

print(c)




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

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

print(c)




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

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)

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)

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)

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)

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)

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)

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)

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())
listNum = [int(x) for x in input().split()]
answer = []
for i in range(n-1):
    if(listNum[0] <= listNum[i]):
        answer.append(i)
print(len(answer))

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

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

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

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

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

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

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

n = int(input())
ls = list(map(int, input().split()))
ans = 0
maxNum = 0
for i in range(len(ls)):
    if maxNum <= ls[i]:
        maxNum = ls[i]
        ans += 1
print(ans)

n = int(input())
ls = list(map(int, input().split()))
ans = 0
maxNum = 0
for i in range(len(ls)):
    if maxNum <= ls[i]:
        maxNum = ls[i]
        ans += 1
print(ans)

n = int(input())
ls = list(map(int, input().split()))
ans = 0
maxNum = 0
for i in range(len(ls)):
    if maxNum <= ls[i]:
        maxNum = ls[i]
        ans += 1
print(ans)

n = int(input())
ls = list(map(int, input().split()))
ans = 0
maxNum = 0
for i in range(len(ls)):
    if maxNum <= ls[i]:
        maxNum = ls[i]
        ans += 1
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

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


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)


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)


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)


N = int(input())
arr = input().split()
num = 0
tmp = 0

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

print(num)


N = int(input())
arr = input().split()
num = 0
tmp = 0

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

print(num)


N = int(input())
arr = input().split()
num = 0
tmp = 0

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

print(num)


N = int(input())
arr = input().split()
num = 0
tmp = 0

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

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):
a = int(input())
l = list(map(int, input().split()))
min = 0
cnt = 0
for i in range(a):
  if min < l[i]:
    cnt += 1
    min = l[i]
print(cnt)

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

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

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

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


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


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


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


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):
a = [int(i) for i in input().split()]
h = a[1:]
num = 1
for i in range(1,len(h)):
    if h[i] >= max(h[:i]):
        num += 1

print(num)

a = [int(i) for i in input().split()]
h = a[1:]
num = 1
for i in range(1,len(h)):
    if h[i] >= max(h[:i]):
        num += 1

print(num)

a = [int(i) for i in input().split()]
h = a[1:]
num = 1
for i in range(1,len(h)):
    if h[i] >= max(h[:i]):
        num += 1

print(num)

a = [int(i) for i in input().split()]
h = a[1:]
num = 1
for i in range(1,len(h)):
    if h[i] >= max(h[:i]):
        num += 1

print(num)

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

num = 1
for i in range(1,len(h)):
    if h[i] >= max(h[:i]):
        num += 1

print(num)

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

num = 1
for i in range(1,len(h)):
    if h[i] >= max(h[:i]):
        num += 1

print(num)

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

num = 1
for i in range(1,len(h)):
    if h[i] >= max(h[:i]):
        num += 1

print(num)

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

num = 1
for i in range(1,len(h)):
    if h[i] >= max(h[:i]):
        num += 1

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


for i in range(int(n)):
    if i!=0:
        for j in range(i):
            ok = 0
            if h[j]<=h[i]:
                ok +=1
            if ok == i:
                count +=1

print(count)


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


for i in range(int(n)):
    if i!=0:
        for j in range(i):
            ok = 0
            if h[j]<=h[i]:
                ok +=1
            if ok == i:
                count +=1

print(count)


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


for i in range(int(n)):
    if i!=0:
        for j in range(i):
            ok = 0
            if h[j]<=h[i]:
                ok +=1
            if ok == i:
                count +=1

print(count)


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


for i in range(int(n)):
    if i!=0:
        for j in range(i):
            ok = 0
            if h[j]<=h[i]:
                ok +=1
            if ok == i:
                count +=1

print(count)


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


for i in range(int(n)):
    ok = 0
    if i!=0:
        for j in range(i):

            if h[j]<=h[i]:
                ok +=1
            if ok == i:
                count +=1

print(count)


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


for i in range(int(n)):
    ok = 0
    if i!=0:
        for j in range(i):

            if h[j]<=h[i]:
                ok +=1
            if ok == i:
                count +=1

print(count)


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


for i in range(int(n)):
    ok = 0
    if i!=0:
        for j in range(i):

            if h[j]<=h[i]:
                ok +=1
            if ok == i:
                count +=1

print(count)


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


for i in range(int(n)):
    ok = 0
    if i!=0:
        for j in range(i):

            if h[j]<=h[i]:
                ok +=1
            if ok == i:
                count +=1

print(count)


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):
input()
lis = list(map(int, input().split()))
print(len([n for i, n in enumerate(lis[1:]) if n >= max(lis[:i + 1])]) + 1

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

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

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

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

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

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

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

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(x) for x in input().split()]
cnt=1
tall=H[0]
for i in range(1,n):
    if tall<=H[i]:
        tall=H[i]
        cnt+=1
print(cnt)


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


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


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


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


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


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


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


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()))
maxi = 0
cnt = 0
for H[i] in range( N ) :
    if H[i] >= maxi :
        cnt += 1
        maxi = H[i]
print( cnt )
    


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


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


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


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


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


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


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

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

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

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

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

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

print(cnt)

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

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

print(cnt)

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

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

print(cnt)

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

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

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())
hotel = list(map(int, input().split()))
count = 0
for i in range(1, N):
  for j in range(0, i):
    if all(hotel[i] >= hotel[j]):
      count += 1
print(count+1)


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


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


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


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


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


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


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


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


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


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


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


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()))
ans = 0
for i in range(n):
  if(H[0] <= H[i] and H[1] <= H[i] and H[i-1] <= H[i]):
    ans += 1
print(ans)


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


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


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


n = int(input())
H = list(map(int, input().split()))
ans = 0
t = 0

for i in range(n):
  t = max(t,H[i])
  if(t == H[i]):
    ans += 1
print(ans)

n = int(input())
H = list(map(int, input().split()))
ans = 0
t = 0

for i in range(n):
  t = max(t,H[i])
  if(t == H[i]):
    ans += 1
print(ans)

n = int(input())
H = list(map(int, input().split()))
ans = 0
t = 0

for i in range(n):
  t = max(t,H[i])
  if(t == H[i]):
    ans += 1
print(ans)

n = int(input())
H = list(map(int, input().split()))
ans = 0
t = 0

for i in range(n):
  t = max(t,H[i])
  if(t == H[i]):
    ans += 1
print(ans)

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

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)

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)

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)

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

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)

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

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)

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

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)

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

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)

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(x) for x in input().split()]
can_watch = 0
for i in range(N):
  if H[i] >= max(H[:i]):
    can_watch = can_watch + 1
  else:
    pass
print(can_watch)

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

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

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

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

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

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

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

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())
lst = list(map(int, input().split()))
cnt = 0
for i, e in enumerate(lst):
    flag = True
    ci = 0
    while ci < i:
        if e < lst[ci]:
            flag = False
            break
        ci += 1
    ci = 0
    if flag:
        print(e)
        cnt += 1
print(cnt)

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

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

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

n = int(input())
hhh = list(map(int, input().split()))
max_height = -1
ans = 0
for h in hhh:
    if h >= max_height:
        ans += 1
        max_height = h
print(ans)

n = int(input())
hhh = list(map(int, input().split()))
max_height = -1
ans = 0
for h in hhh:
    if h >= max_height:
        ans += 1
        max_height = h
print(ans)

n = int(input())
hhh = list(map(int, input().split()))
max_height = -1
ans = 0
for h in hhh:
    if h >= max_height:
        ans += 1
        max_height = h
print(ans)

n = int(input())
hhh = list(map(int, input().split()))
max_height = -1
ans = 0
for h in hhh:
    if h >= max_height:
        ans += 1
        max_height = h
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted