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 = input()
a = list(map(int, input().split()))
print(sum(max(x[:i] <= x[i] for i in range(n))

n = input()
a = list(map(int, input().split()))
print(sum(max(x[:i] <= x[i] for i in range(n))

n = input()
a = list(map(int, input().split()))
print(sum(max(x[:i] <= x[i] for i in range(n))

n = input()
a = list(map(int, input().split()))
print(sum(max(x[:i] <= x[i] for i in range(n))

n = int(input())
a = list(map(int, input().split()))
print(sum(max([0] + a[:i]) <= a[i] for i in range(n)))

n = int(input())
a = list(map(int, input().split()))
print(sum(max([0] + a[:i]) <= a[i] for i in range(n)))

n = int(input())
a = list(map(int, input().split()))
print(sum(max([0] + a[:i]) <= a[i] for i in range(n)))

n = int(input())
a = list(map(int, input().split()))
print(sum(max([0] + a[:i]) <= a[i] for i in range(n)))

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())
m = 0
b = 0
for _ in range(N):
  a = int(input())
  if b <= a:
    m += 1
  b = max(b,a)
print(m)

N = int(input())
m = 0
b = 0
for _ in range(N):
  a = int(input())
  if b <= a:
    m += 1
  b = max(b,a)
print(m)

N = int(input())
m = 0
b = 0
for _ in range(N):
  a = int(input())
  if b <= a:
    m += 1
  b = max(b,a)
print(m)

N = int(input())
m = 0
b = 0
for _ in range(N):
  a = int(input())
  if b <= a:
    m += 1
  b = max(b,a)
print(m)

N = int(input())
H = [int(i) for i in input().split()]
m = 0
b = 0
for a in H:
  if b <= a:
    m += 1
  b = max(b,a)
print(m)

N = int(input())
H = [int(i) for i in input().split()]
m = 0
b = 0
for a in H:
  if b <= a:
    m += 1
  b = max(b,a)
print(m)

N = int(input())
H = [int(i) for i in input().split()]
m = 0
b = 0
for a in H:
  if b <= a:
    m += 1
  b = max(b,a)
print(m)

N = int(input())
H = [int(i) for i in input().split()]
m = 0
b = 0
for a in H:
  if b <= a:
    m += 1
  b = max(b,a)
print(m)

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()))
max=h[0]
cnt=0
for i in range(1,n):
    if h[i]>=max:
        cnt+=1
        max=h[i]
print(cnt)


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


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


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


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

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

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

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

for i in range(n):
  viewable = False
  for j in range(i):
    if h[j] > h[i]:
      break
    else if j == i - 1:
      viewable = True
  
  if viewable == True:
    result += 1
    
print("{}".format(result))

n = int(input())
h = map(int, input().split(" "))
result = 1

for i in range(n):
  viewable = False
  for j in range(i):
    if h[j] > h[i]:
      break
    else if j == i - 1:
      viewable = True
  
  if viewable == True:
    result += 1
    
print("{}".format(result))

n = int(input())
h = map(int, input().split(" "))
result = 1

for i in range(n):
  viewable = False
  for j in range(i):
    if h[j] > h[i]:
      break
    else if j == i - 1:
      viewable = True
  
  if viewable == True:
    result += 1
    
print("{}".format(result))

n = int(input())
h = map(int, input().split(" "))
result = 1

for i in range(n):
  viewable = False
  for j in range(i):
    if h[j] > h[i]:
      break
    else if j == i - 1:
      viewable = True
  
  if viewable == True:
    result += 1
    
print("{}".format(result))

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

for i in range(n):
  viewable = False
  for j in range(i):
    if h[j] > h[i]:
      break
    elif j == i - 1:
      viewable = True
      
  if viewable == True:
    result += 1

print("{}".format(result))

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

for i in range(n):
  viewable = False
  for j in range(i):
    if h[j] > h[i]:
      break
    elif j == i - 1:
      viewable = True
      
  if viewable == True:
    result += 1

print("{}".format(result))

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

for i in range(n):
  viewable = False
  for j in range(i):
    if h[j] > h[i]:
      break
    elif j == i - 1:
      viewable = True
      
  if viewable == True:
    result += 1

print("{}".format(result))

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

for i in range(n):
  viewable = False
  for j in range(i):
    if h[j] > h[i]:
      break
    elif j == i - 1:
      viewable = True
      
  if viewable == True:
    result += 1

print("{}".format(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=list(map(int,input().split()))
cnt=1
for i in range(1,n+1):
	if h[i]>=h[0]:
		cnt+=1
print(cnt)

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

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

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

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

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

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

n=int(input())
h=list(map(int,input().split()))
cnt=1
maxh=h[0]
for i in range(1,n):
	if maxh<=h[i]:
		maxh=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):
def solve(string):
    n, *h = map(int, string.split())
    count = 1
    for i in range(1, n):
        if max(h[:i]) <= h[i]:
            count += 1
    return str(count)


if __name__ == '__main__':
    print(solve(input()))


def solve(string):
    n, *h = map(int, string.split())
    count = 1
    for i in range(1, n):
        if max(h[:i]) <= h[i]:
            count += 1
    return str(count)


if __name__ == '__main__':
    print(solve(input()))


def solve(string):
    n, *h = map(int, string.split())
    count = 1
    for i in range(1, n):
        if max(h[:i]) <= h[i]:
            count += 1
    return str(count)


if __name__ == '__main__':
    print(solve(input()))


def solve(string):
    n, *h = map(int, string.split())
    count = 1
    for i in range(1, n):
        if max(h[:i]) <= h[i]:
            count += 1
    return str(count)


if __name__ == '__main__':
    print(solve(input()))


def solve(string):
    n, *h = map(int, string.split())
    count = 1
    for i in range(1, n):
        if max(h[:i]) <= h[i]:
            count += 1
    return str(count)


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))


def solve(string):
    n, *h = map(int, string.split())
    count = 1
    for i in range(1, n):
        if max(h[:i]) <= h[i]:
            count += 1
    return str(count)


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))


def solve(string):
    n, *h = map(int, string.split())
    count = 1
    for i in range(1, n):
        if max(h[:i]) <= h[i]:
            count += 1
    return str(count)


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))


def solve(string):
    n, *h = map(int, string.split())
    count = 1
    for i in range(1, n):
        if max(h[:i]) <= h[i]:
            count += 1
    return str(count)


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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):
Hs = input().strip().split(' ')
ans = 0;
H = 0;
for i in Hs:
  i = int(i)
  if (i >= H):
  	ans += 1
  H = max(H, i)

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

count = 0
max_H = 0

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

print(count)

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

count = 0
max_H = 0

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

print(count)

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

count = 0
max_H = 0

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

print(count)

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

count = 0
max_H = 0

for i in range(N):
    max_H = max(max_H,H[i])
    if H[i]>=max_H:
        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=int(input())
a=list(map(int, input().split()))
ans=0
h=0
for i in a:
    if i>h:
        ans+=1
        h=i
print(ans)

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

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

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

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

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

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

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

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()))
count = 0

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

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

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

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

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

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

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

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

ans = N
for i in range(N):
    for j in H[:i]:
        if H[i] < j:
            ans -= 1
            break

print(ans)


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

ans = N
for i in range(N):
    for j in H[:i]:
        if H[i] < j:
            ans -= 1
            break

print(ans)


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

ans = N
for i in range(N):
    for j in H[:i]:
        if H[i] < j:
            ans -= 1
            break

print(ans)


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

ans = N
for i in range(N):
    for j in H[:i]:
        if H[i] < j:
            ans -= 1
            break

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):
# coding: utf-8

num = int(input())
str = input().split()
table = [int(i) for i in str]
count = 0
pointed = table[0]
for i in range(1, num):
    if table[0] <= table[i]:
        count += 1
print(count)


# coding: utf-8

num = int(input())
str = input().split()
table = [int(i) for i in str]
count = 0
pointed = table[0]
for i in range(1, num):
    if table[0] <= table[i]:
        count += 1
print(count)


# coding: utf-8

num = int(input())
str = input().split()
table = [int(i) for i in str]
count = 0
pointed = table[0]
for i in range(1, num):
    if table[0] <= table[i]:
        count += 1
print(count)


# coding: utf-8

num = int(input())
str = input().split()
table = [int(i) for i in str]
count = 0
pointed = table[0]
for i in range(1, num):
    if table[0] <= table[i]:
        count += 1
print(count)


# coding: utf-8

num = int(input())
str = input().split()
table = [int(i) for i in str]
count = 1
maxi = table[0]
pointed = table[0]
for i in range(1, num):
    if maxi <= table[i]:
        maxi = table[i]
        count += 1
print(count)


# coding: utf-8

num = int(input())
str = input().split()
table = [int(i) for i in str]
count = 1
maxi = table[0]
pointed = table[0]
for i in range(1, num):
    if maxi <= table[i]:
        maxi = table[i]
        count += 1
print(count)


# coding: utf-8

num = int(input())
str = input().split()
table = [int(i) for i in str]
count = 1
maxi = table[0]
pointed = table[0]
for i in range(1, num):
    if maxi <= table[i]:
        maxi = table[i]
        count += 1
print(count)


# coding: utf-8

num = int(input())
str = input().split()
table = [int(i) for i in str]
count = 1
maxi = table[0]
pointed = table[0]
for i in range(1, num):
    if maxi <= table[i]:
        maxi = table[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):
import math
n,d = map(int, input().split())
x = [list(map(int, input().split())) for _ in range(n)]
ans = 0

for i in range(n):
  for j in range(i+1,n):
    temp = 0
    for k in range(d):
      temp += (x[i][k] - x[j][k]) ** 2
    l = math.sqrt(temp)
    if l.is_integer():
      ans += 1
print(ans)

import math
n,d = map(int, input().split())
x = [list(map(int, input().split())) for _ in range(n)]
ans = 0

for i in range(n):
  for j in range(i+1,n):
    temp = 0
    for k in range(d):
      temp += (x[i][k] - x[j][k]) ** 2
    l = math.sqrt(temp)
    if l.is_integer():
      ans += 1
print(ans)

import math
n,d = map(int, input().split())
x = [list(map(int, input().split())) for _ in range(n)]
ans = 0

for i in range(n):
  for j in range(i+1,n):
    temp = 0
    for k in range(d):
      temp += (x[i][k] - x[j][k]) ** 2
    l = math.sqrt(temp)
    if l.is_integer():
      ans += 1
print(ans)

import math
n,d = map(int, input().split())
x = [list(map(int, input().split())) for _ in range(n)]
ans = 0

for i in range(n):
  for j in range(i+1,n):
    temp = 0
    for k in range(d):
      temp += (x[i][k] - x[j][k]) ** 2
    l = math.sqrt(temp)
    if l.is_integer():
      ans += 1
print(ans)

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

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

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

n = int(input())
h = list(map(int, input().split()))
count = 0
for i in range(n):
  if i == 0:
    count += 1
  else:
    if h[i] >= max(h[:i]):
      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):
# ABC124B - Great Ocean View
n = int(input())
data = list(map(int, input().rstrip().split()))
count = 1

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

# ABC124B - Great Ocean View
n = int(input())
data = list(map(int, input().rstrip().split()))
count = 1

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

# ABC124B - Great Ocean View
n = int(input())
data = list(map(int, input().rstrip().split()))
count = 1

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

# ABC124B - Great Ocean View
n = int(input())
data = list(map(int, input().rstrip().split()))
count = 1

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

# ABC124B - Great Ocean View
n = int(input())
data = list(map(int, input().rstrip().split()))
count = 1

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

# ABC124B - Great Ocean View
n = int(input())
data = list(map(int, input().rstrip().split()))
count = 1

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

# ABC124B - Great Ocean View
n = int(input())
data = list(map(int, input().rstrip().split()))
count = 1

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

# ABC124B - Great Ocean View
n = int(input())
data = list(map(int, input().rstrip().split()))
count = 1

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

n=int(input())
b=0
c=0
for h in map(int, input.split()):
  if b<=h:
    b=h
    c+=1
print(c)

n=int(input())
b=0
c=0
for h in map(int, input.split()):
  if b<=h:
    b=h
    c+=1
print(c)

n=int(input())
b=0
c=0
for h in map(int, input.split()):
  if b<=h:
    b=h
    c+=1
print(c)

n=int(input())
b=0
c=0
for h in map(int,input().split()):
  if b<=h:
    b=h
    c+=1
print(c)

n=int(input())
b=0
c=0
for h in map(int,input().split()):
  if b<=h:
    b=h
    c+=1
print(c)

n=int(input())
b=0
c=0
for h in map(int,input().split()):
  if b<=h:
    b=h
    c+=1
print(c)

n=int(input())
b=0
c=0
for h in map(int,input().split()):
  if b<=h:
    b=h
    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):
k= int(input())
numerosSTR = input().split(" ")
numeros = []
contador=0
for i in numerosSTR:
    numeros.append(int(i))
for j in numeros:
    if j <= numeros[-1]:
        contador+=1
print(contador)
     

k= int(input())
numerosSTR = input().split(" ")
numeros = []
contador=0
for i in numerosSTR:
    numeros.append(int(i))
for j in numeros:
    if j <= numeros[-1]:
        contador+=1
print(contador)
     

k= int(input())
numerosSTR = input().split(" ")
numeros = []
contador=0
for i in numerosSTR:
    numeros.append(int(i))
for j in numeros:
    if j <= numeros[-1]:
        contador+=1
print(contador)
     

k= int(input())
numerosSTR = input().split(" ")
numeros = []
contador=0
for i in numerosSTR:
    numeros.append(int(i))
for j in numeros:
    if j <= numeros[-1]:
        contador+=1
print(contador)
     

n = int(input())
pousadas = [int(x) for x in input().split()]
maior = 0
cont = 0
for i in pousadas:
    if (maior - i) <= 0:
        cont += 1
        maior = i
print(cont)


n = int(input())
pousadas = [int(x) for x in input().split()]
maior = 0
cont = 0
for i in pousadas:
    if (maior - i) <= 0:
        cont += 1
        maior = i
print(cont)


n = int(input())
pousadas = [int(x) for x in input().split()]
maior = 0
cont = 0
for i in pousadas:
    if (maior - i) <= 0:
        cont += 1
        maior = i
print(cont)


n = int(input())
pousadas = [int(x) for x in input().split()]
maior = 0
cont = 0
for i in pousadas:
    if (maior - i) <= 0:
        cont += 1
        maior = i
print(cont)


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()))
saidai = 0
cnt = 0

for i in H:
    print(N)
    if(i >= saidai):
        saidai = i
        cnt += 1
    

print(cnt)

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

for i in H:
    print(N)
    if(i >= saidai):
        saidai = i
        cnt += 1
    

print(cnt)

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

for i in H:
    print(N)
    if(i >= saidai):
        saidai = i
        cnt += 1
    

print(cnt)

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

for i in H:
    print(N)
    if(i >= saidai):
        saidai = i
        cnt += 1
    

print(cnt)

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

for i in H:
    if(i >= saidai):
        saidai = i
        cnt += 1
    

print(cnt)

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

for i in H:
    if(i >= saidai):
        saidai = i
        cnt += 1
    

print(cnt)

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

for i in H:
    if(i >= saidai):
        saidai = i
        cnt += 1
    

print(cnt)

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

for i in H:
    if(i >= saidai):
        saidai = 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())
H = [int(i) for i in input().split(" ")]
Max = H[0]
count = 1
for i in range(1,N):
  if H[i]>Max:
      count+=1
print(count)

N = int(input())
H = [int(i) for i in input().split(" ")]
Max = H[0]
count = 1
for i in range(1,N):
  if H[i]>Max:
      count+=1
print(count)

N = int(input())
H = [int(i) for i in input().split(" ")]
Max = H[0]
count = 1
for i in range(1,N):
  if H[i]>Max:
      count+=1
      Max=H[i]
print(count)

N = int(input())
H = [int(i) for i in input().split(" ")]
Max = H[0]
count = 1
for i in range(1,N):
  if H[i]>Max:
      count+=1
      Max=H[i]
print(count)

N = int(input())
H = [int(i) for i in input().split(" ")]
Max = H[0]
count = 1
for i in range(1,N):
  if H[i]>Max:
      count+=1
print(count)

N = int(input())
H = [int(i) for i in input().split(" ")]
Max = H[0]
count = 1
for i in range(1,N):
  if H[i]>Max:
      count+=1
print(count)

N = int(input())
H = [int(i) for i in input().split(" ")]
Max = H[0]
count = 1
for i in range(1,N):
  if H[i]>Max:
      count+=1
      Max=H[i]
print(count)

N = int(input())
H = [int(i) for i in input().split(" ")]
Max = H[0]
count = 1
for i in range(1,N):
  if H[i]>Max:
      count+=1
      Max=H[i]
print(count)

N = int(input())
H = [int(i) for i in input().split(" ")]
Max = H[0]
count = 1
for i in range(1,N):
  if H[i]>=Max:
      count+=1
      Max=H[i]
print(count)

N = int(input())
H = [int(i) for i in input().split(" ")]
Max = H[0]
count = 1
for i in range(1,N):
  if H[i]>=Max:
      count+=1
      Max=H[i]
print(count)

N = int(input())
H = [int(i) for i in input().split(" ")]
Max = H[0]
count = 1
for i in range(1,N):
  if H[i]>=Max:
      count+=1
      Max=H[i]
print(count)

N = int(input())
H = [int(i) for i in input().split(" ")]
Max = H[0]
count = 1
for i in range(1,N):
  if H[i]>=Max:
      count+=1
      Max=H[i]
print(count)

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

N = int(input())
h = map(int,input().split())
H = []
for c in h:
    H.append(int(c))
print(H)

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

print(count)


N = int(input())
h = map(int,input().split())
H = []
for c in h:
    H.append(int(c))
print(H)

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

print(count)


N = int(input())
h = map(int,input().split())
H = []
for c in h:
    H.append(int(c))
print(H)

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

print(count)


N = int(input())
h = map(int,input().split())
H = []
for c in h:
    H.append(int(c))
print(H)

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

print(count)


N = int(input())
h = map(int,input().split())
H = []
for c in h:
    H.append(int(c))

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

print(count)


N = int(input())
h = map(int,input().split())
H = []
for c in h:
    H.append(int(c))

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

print(count)


N = int(input())
h = map(int,input().split())
H = []
for c in h:
    H.append(int(c))

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

print(count)


N = int(input())
h = map(int,input().split())
H = []
for c in h:
    H.append(int(c))

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

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 = int(input())
h = list(map(int, input().split()))
ans = 1
MAX = s[0]
for i in s[1:]:
  if i >= MAX:
    ans += 1
    MAX = i
print(ans)

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

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

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

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

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

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

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

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


n = int(input())

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


n = int(input())
mont = [int(input()) for i in range(n)]
conut = 0
for i in range(n):
  if mont[i] >= max(mont[:i]):
    count += 1
print(count)

n = int(input())
mont = [int(input()) for i in range(n)]
conut = 0
for i in range(n):
  if mont[i] >= max(mont[:i]):
    count += 1
print(count)

n = int(input())

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


n = int(input())

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


n = int(input())
mont = [int(input()) for i in range(n)]
conut = 0
for i in range(n):
  if mont[i] >= max(mont[:i]):
    count += 1
print(count)

n = int(input())
mont = [int(input()) for i in range(n)]
conut = 0
for i in range(n):
  if mont[i] >= max(mont[:i]):
    count += 1
print(count)

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted