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

n = input()
l = list(input().split())
 
cnt = 0
max_height = 0
for i in range(len(l)):
  if int(l[i]) > int(max_height):
    cnt +=1
    max_height = l[i]
    
print(cnt)   

n = input()
l = list(input.split())

cnt = 0
max_height = 0
for i in range(len(l)):
  if l[i] > max_height:
    cnt +=1
    max_height = l[i]
    
print(cnt)   
  

n = input()
l = list(input.split())

cnt = 0
max_height = 0
for i in range(len(l)):
  if l[i] > max_height:
    cnt +=1
    max_height = l[i]
    
print(cnt)   
  

n = input()
l = list(input().split())
 
cnt = 0
max_height = 0
for i in range(len(l)):
  if int(l[i]) > int(max_height):
    cnt +=1
    max_height = l[i]
    
print(cnt)   

n = input()
l = list(input().split())
 
cnt = 0
max_height = 0
for i in range(len(l)):
  if int(l[i]) > int(max_height):
    cnt +=1
    max_height = l[i]
    
print(cnt)   

n = input()
l = list(input.split())

cnt = 0
max_height = 0
for i in range(len(l)):
  if l[i] > max_height:
    cnt +=1
    max_height = l[i]
    
print(cnt)   
  

n = input()
l = list(input.split())

cnt = 0
max_height = 0
for i in range(len(l)):
  if l[i] > max_height:
    cnt +=1
    max_height = l[i]
    
print(cnt)   
  

n = input()
l = list(input().split())
 
cnt = 0
max_height = 0
for i in range(len(l)):
  if int(l[i]) >= int(max_height):
    cnt +=1
    max_height = l[i]
    
print(cnt)   

n = input()
l = list(input().split())
 
cnt = 0
max_height = 0
for i in range(len(l)):
  if int(l[i]) >= int(max_height):
    cnt +=1
    max_height = l[i]
    
print(cnt)   

n = input()
l = list(input().split())
 
cnt = 0
max_height = 0
for i in range(len(l)):
  if int(l[i]) >= int(max_height):
    cnt +=1
    max_height = l[i]
    
print(cnt)   

n = input()
l = list(input().split())
 
cnt = 0
max_height = 0
for i in range(len(l)):
  if int(l[i]) >= int(max_height):
    cnt +=1
    max_height = l[i]
    
print(cnt)   

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

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

print(cnt)

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

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

print(cnt)

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

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

print(cnt)

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

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

print(cnt)

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

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

print(cnt)

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

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

print(cnt)

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

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

print(cnt)

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

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

print(cnt)

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()))
MAX = 0
cnt = 0
for i in H:
    if i > MAX:
        i = MAX
        cnt += 1
print(cnt)

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

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

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

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

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

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

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

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

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

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

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

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 = [int(x) for x in input().split()]

ans = 1
hmax = H[0]

for i in range(1, N):
    if hmax <= H[i]:
        hmax = H[i]
    else:
        ans += 1

print(ans)

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

ans = 1
hmax = H[0]

for i in range(1, N):
    if hmax <= H[i]:
        hmax = H[i]
    else:
        ans += 1

print(ans)

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

ans = 1
hmax = H[0]

for i in range(1, N):
    if hmax <= H[i]:
        hmax = H[i]
    else:
        ans += 1

print(ans)

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

ans = 1
hmax = H[0]

for i in range(1, N):
    if hmax <= H[i]:
        hmax = H[i]
    else:
        ans += 1

print(ans)

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

ans = 1
hmax = H[0]

for i in range(1, N):
    if hmax <= H[i]:
        hmax = H[i]
        ans += 1

print(ans)

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

ans = 1
hmax = H[0]

for i in range(1, N):
    if hmax <= H[i]:
        hmax = H[i]
        ans += 1

print(ans)

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

ans = 1
hmax = H[0]

for i in range(1, N):
    if hmax <= H[i]:
        hmax = H[i]
        ans += 1

print(ans)

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

ans = 1
hmax = H[0]

for i in range(1, N):
    if hmax <= H[i]:
        hmax = H[i]
        ans += 1

print(ans)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: There are N mountains ranging from east to west, and an ocean to the west.  At the top of each mountain, there is an inn. You have decided to choose where to stay from these inns.  The height of the i-th mountain from the west is H_i.  You can certainly see the ocean from the inn at the top of the westmost mountain.  For the inn at the top of the i-th mountain from the west (i = 2, 3, ..., N), you can see the ocean if and only if H_1 \leq H_i, H_2 \leq H_i, ..., and H_{i-1} \leq H_i.  From how many of these N inns can you see the ocean?

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

max = 0
cnt = 0
for i in range(n):
  if max < hl[i]:
    cnt += 1
    max = hl[i]

print(cnt)

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

max = 0
cnt = 0
for i in range(n):
  if max < hl[i]:
    cnt += 1
    max = hl[i]

print(cnt)

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

max = 0
cnt = 0
for i in range(n):
  if max < hl[i]:
    cnt += 1
    max = hl[i]

print(cnt)

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

max = 0
cnt = 0
for i in range(n):
  if max < hl[i]:
    cnt += 1
    max = hl[i]

print(cnt)

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

max = 0
cnt = 0
for i in range(n):
  if max <= hl[i]:
    cnt += 1
    max = hl[i]

print(cnt)

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

max = 0
cnt = 0
for i in range(n):
  if max <= hl[i]:
    cnt += 1
    max = hl[i]

print(cnt)

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

max = 0
cnt = 0
for i in range(n):
  if max <= hl[i]:
    cnt += 1
    max = hl[i]

print(cnt)

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

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

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

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

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

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

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

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

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

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

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

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

N = int(input())
H = [i for i in map(int, input().split())]
cnt = 0
for i in range(N):
    if max(H[0:i+1]) == 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 = []*100
H[:] = map(int, input().split())
ct = 1
for i in range(N-1):
    max = max(H[:i+1])
    if H[i+1] >= max:
        ct += 1
print(ct)

N = int(input())
H = []*100
H[:] = map(int, input().split())
ct = 1
for i in range(N-1):
    max = max(H[:i+1])
    if H[i+1] >= max:
        ct += 1
print(ct)

N = int(input())
H = []*100
H[:] = map(int, input().split())
ct = 1
for i in range(N-1):
    max = max(H[:i+1])
    if H[i+1] >= max:
        ct += 1
print(ct)

N = int(input())
H = []*100
H[:] = map(int, input().split())
ct = 1
for i in range(N-1):
    max = max(H[:i+1])
    if H[i+1] >= max:
        ct += 1
print(ct)

N = int(input())
H = []*100
H[:] = map(int, input().split())
ct = 1
for i in range(N-1):
    maxim = max(H[:i+1])
    if H[i+1] >= maxim:
        ct += 1
print(ct)

N = int(input())
H = []*100
H[:] = map(int, input().split())
ct = 1
for i in range(N-1):
    maxim = max(H[:i+1])
    if H[i+1] >= maxim:
        ct += 1
print(ct)

N = int(input())
H = []*100
H[:] = map(int, input().split())
ct = 1
for i in range(N-1):
    maxim = max(H[:i+1])
    if H[i+1] >= maxim:
        ct += 1
print(ct)

N = int(input())
H = []*100
H[:] = map(int, input().split())
ct = 1
for i in range(N-1):
    maxim = max(H[:i+1])
    if H[i+1] >= maxim:
        ct += 1
print(ct)

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):
a = input()
b = list(map(int, input().split(' ')))
mae = 0
res = 0
for hei in b:
    if hei >= mae:
        res = res + 1
    else:
        break
    mae = hei
print(res)


a = input()
b = list(map(int, input().split(' ')))
mae = 0
res = 0
for hei in b:
    if hei >= mae:
        res = res + 1
    else:
        break
    mae = hei
print(res)


a = input()
b = list(map(int, input().split(' ')))
mae = 0
res = 0
for hei in b:
    if hei >= mae:
        res = res + 1
    else:
        break
    mae = hei
print(res)


a = input()
b = list(map(int, input().split(' ')))
mae = 0
res = 0
for hei in b:
    if hei >= mae:
        res = res + 1
    else:
        break
    mae = hei
print(res)


a = input()
b = list(map(int, input().split(' ')))
res = 0
hikaku_target = 0

for hei in b:
    if hei >= hikaku_target:
        res = res + 1
    hikaku_target = max(hikaku_target, hei)
print(res)


a = input()
b = list(map(int, input().split(' ')))
res = 0
hikaku_target = 0

for hei in b:
    if hei >= hikaku_target:
        res = res + 1
    hikaku_target = max(hikaku_target, hei)
print(res)


a = input()
b = list(map(int, input().split(' ')))
res = 0
hikaku_target = 0

for hei in b:
    if hei >= hikaku_target:
        res = res + 1
    hikaku_target = max(hikaku_target, hei)
print(res)


a = input()
b = list(map(int, input().split(' ')))
res = 0
hikaku_target = 0

for hei in b:
    if hei >= hikaku_target:
        res = res + 1
    hikaku_target = max(hikaku_target, hei)
print(res)


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
b=0
for i in range(1,n):
        b=max(h[j] for j in range(i))
        if b<=h[i]:
            ans+=1
print("57は素数")
print(ans)

n=int(input())
h=list(map(int, input().split()))
ans=1
b=0
for i in range(1,n):
        b=max(h[j] for j in range(i))
        if b<=h[i]:
            ans+=1
print("57は素数")
print(ans)

n=int(input())
h=list(map(int, input().split()))
ans=1
b=0
for i in range(1,n):
        b=max(h[j] for j in range(i))
        if b<=h[i]:
            ans+=1
print(ans)
print("57は素数")

n=int(input())
h=list(map(int, input().split()))
ans=1
b=0
for i in range(1,n):
        b=max(h[j] for j in range(i))
        if b<=h[i]:
            ans+=1
print(ans)
print("57は素数")

n=int(input())
h=list(map(int, input().split()))
ans=1
b=0
for i in range(1,n):
        b=max(h[j] for j in range(i))
        if b<=h[i]:
            ans+=1
print("57は素数")
print(ans)

n=int(input())
h=list(map(int, input().split()))
ans=1
b=0
for i in range(1,n):
        b=max(h[j] for j in range(i))
        if b<=h[i]:
            ans+=1
print("57は素数")
print(ans)

n=int(input())
h=list(map(int, input().split()))
ans=1
b=0
for i in range(1,n):
        b=max(h[j] for j in range(i))
        if b<=h[i]:
            ans+=1
print(ans)
print("57は素数")

n=int(input())
h=list(map(int, input().split()))
ans=1
b=0
for i in range(1,n):
        b=max(h[j] for j in range(i))
        if b<=h[i]:
            ans+=1
print(ans)
print("57は素数")

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

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

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

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

max = 0
cnt = 0

for h in H:
  if h >= max:
    cnt += 1
    max = h

print(cnt)

input()
H = list(map(int, input()))

max = 0
cnt = 0

for h in H:
  if h >= max:
    cnt += 1
    max = h

print(cnt)

input()
H = list(map(int, input()))

max = 0
cnt = 0

for h in H:
  if h >= max:
    cnt += 1
    max = h

print(cnt)

input()
H = list(map(int, input()))

max = 0
cnt = 0

for h in H:
  if h >= max:
    cnt += 1
    max = h

print(cnt)

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

max_ = 0
cnt = 0

for h in H:
  if h >= max_:
    cnt += 1
    max_ = h

print(cnt)

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

max_ = 0
cnt = 0

for h in H:
  if h >= max_:
    cnt += 1
    max_ = h

print(cnt)

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

max_ = 0
cnt = 0

for h in H:
  if h >= max_:
    cnt += 1
    max_ = h

print(cnt)

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

max_ = 0
cnt = 0

for h in H:
  if h >= max_:
    cnt += 1
    max_ = h

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

ans = 1

for n in range(1,N):
    if H[n] >= H[n-1]:
        ans +=1
    else:
        break

print(ans)

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

ans = 1

for n in range(1,N):
    if H[n] >= H[n-1]:
        ans +=1
    else:
        break

print(ans)

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

ans = 1

for n in range(1,N):
    if H[n] >= H[n-1]:
        ans +=1
    else:
        break

print(ans)

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

ans = 1

for n in range(1,N):
    if H[n] >= H[n-1]:
        ans +=1
    else:
        break

print(ans)

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

ans = 1

for n in range(1,N):
    if H[n] >= max(H[:n]):
        ans +=1

print(ans)

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

ans = 1

for n in range(1,N):
    if H[n] >= max(H[:n]):
        ans +=1

print(ans)

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

ans = 1

for n in range(1,N):
    if H[n] >= max(H[:n]):
        ans +=1

print(ans)

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

ans = 1

for n in range(1,N):
    if H[n] >= max(H[:n]):
        ans +=1

print(ans)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: There are N mountains ranging from east to west, and an ocean to the west.  At the top of each mountain, there is an inn. You have decided to choose where to stay from these inns.  The height of the i-th mountain from the west is H_i.  You can certainly see the ocean from the inn at the top of the westmost mountain.  For the inn at the top of the i-th mountain from the west (i = 2, 3, ..., N), you can see the ocean if and only if H_1 \leq H_i, H_2 \leq H_i, ..., and H_{i-1} \leq H_i.  From how many of these N inns can you see the ocean?

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

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

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

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

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

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

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

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

print(ans)


n = int(input())
h = [int(x) for x in input().split()]
ans = 1
m = h[0]
for i in range(1, n):
  if m < h[i]:
    ans += 1
    m = h[i]

print(ans)


n = int(input())
h = [int(x) for x in input().split()]
ans = 0
m = h[0]
for i in range(1, n):
  if m < h[i]:
    ans += 1
    m = h[i]

print(ans)


n = int(input())
h = [int(x) for x in input().split()]
ans = 0
m = h[0]
for i in range(1, n):
  if m < h[i]:
    ans += 1
    m = h[i]

print(ans)


n = int(input())
h = [int(x) for x in input().split()]
ans = 1
m = h[0]
for i in range(1, n):
  if m < h[i]:
    ans += 1
    m = h[i]

print(ans)


n = int(input())
h = [int(x) for x in input().split()]
ans = 1
m = h[0]
for i in range(1, n):
  if m < h[i]:
    ans += 1
    m = h[i]

print(ans)


n = int(input())
h = [int(x) for x in input().split()]
ans = 0
m = h[0]
for i in range(1, n):
  if m < h[i]:
    ans += 1
    m = h[i]

print(ans)


n = int(input())
h = [int(x) for x in input().split()]
ans = 0
m = h[0]
for i in range(1, n):
  if m < h[i]:
    ans += 1
    m = h[i]

print(ans)


n = int(input())
h = [int(x) for x in input().split()]
ans = 1
m = h[0]
for i in range(1, n):
  if m <= h[i]:
    ans += 1
    m = h[i]

print(ans)


n = int(input())
h = [int(x) for x in input().split()]
ans = 1
m = h[0]
for i in range(1, n):
  if m <= h[i]:
    ans += 1
    m = h[i]

print(ans)


n = int(input())
h = [int(x) for x in input().split()]
ans = 1
m = h[0]
for i in range(1, n):
  if m <= h[i]:
    ans += 1
    m = h[i]

print(ans)


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

a=int(input())
b=[int(input()) for i in range(a)]
c=0
d=0
for i in range(a):
  if c<b[i]:
    c=b[i]
    d=d+1
print(d)

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

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

a=int(input())
b=[int(input()) for i in range(a)]
c=0
d=0
for i in range(a):
  if c<b[i]:
    c=b[i]
    d=d+1
print(d)

a=int(input())
b=[int(input()) for i in range(a)]
c=0
d=0
for i in range(a):
  if c<b[i]:
    c=b[i]
    d=d+1
print(d)

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: There are N mountains ranging from east to west, and an ocean to the west.  At the top of each mountain, there is an inn. You have decided to choose where to stay from these inns.  The height of the i-th mountain from the west is H_i.  You can certainly see the ocean from the inn at the top of the westmost mountain.  For the inn at the top of the i-th mountain from the west (i = 2, 3, ..., N), you can see the ocean if and only if H_1 \leq H_i, H_2 \leq H_i, ..., and H_{i-1} \leq H_i.  From how many of these N inns can you see the ocean?

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

k = -1
ans = 0
for i in a :
  if (k <= i):
    ans += 1
         
print(ans)

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

k = -1
ans = 0
for i in a :
  if (k <= i):
    ans += 1
         
print(ans)

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

k = -1
ans = 0
for i in a :
  if (k <= i):
    ans += 1
         
print(ans)

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

k = -1
ans = 0
for i in a :
  if (k <= i):
    ans += 1
         
print(ans)

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

k = -1
ans = 0
for i in a :
  if (k <= i):
    ans += 1
    k = i
         
print(ans)


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

k = -1
ans = 0
for i in a :
  if (k <= i):
    ans += 1
    k = i
         
print(ans)


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

k = -1
ans = 0
for i in a :
  if (k <= i):
    ans += 1
    k = i
         
print(ans)


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

k = -1
ans = 0
for i in a :
  if (k <= i):
    ans += 1
    k = 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())
highest = max(h_list)
count = 1

for i in range(1, n):
    if highest <= h_list[i]:
        count += 1

print(count)


n = int(input())
h_list = map(int, input().split())
highest = max(h_list)
count = 1

for i in range(1, n):
    if highest <= h_list[i]:
        count += 1

print(count)


n = int(input())
h_list = map(int, input().split())
highest = max(h_list)
count = 1

for i in range(1, n):
    if highest <= h_list[i]:
        count += 1

print(count)


n = int(input())
h_list = map(int, input().split())
highest = max(h_list)
count = 1

for i in range(1, n):
    if highest <= h_list[i]:
        count += 1

print(count)


n = int(input())
h_list = list(map(int, input().split()))
highest = 0
count = 0

for i in range(n):
    if highest <= h_list[i]:
        count += 1
        highest = h_list[i]

print(count)


n = int(input())
h_list = list(map(int, input().split()))
highest = 0
count = 0

for i in range(n):
    if highest <= h_list[i]:
        count += 1
        highest = h_list[i]

print(count)


n = int(input())
h_list = list(map(int, input().split()))
highest = 0
count = 0

for i in range(n):
    if highest <= h_list[i]:
        count += 1
        highest = h_list[i]

print(count)


n = int(input())
h_list = list(map(int, input().split()))
highest = 0
count = 0

for i in range(n):
    if highest <= h_list[i]:
        count += 1
        highest = h_list[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 = [int(i) for i in range(N)]
sum = 0
max = 0
for i in range(N):
    if A[i] >= max:
      sum += 1
      max = A[i]
      
print(sum)

N = int(input())
A = [int(i) for i in range(N)]
sum = 0
max = 0
for i in range(N):
    if A[i] >= max:
      sum += 1
      max = A[i]
      
print(sum)

N = int(input())
A = [int(i) for i in range(N)]
sum = 0
max = -1
for i in range(N):
    if A[i] >= max:
      sum += 1
      max = A[i]
      
print(sum)

N = int(input())
A = [int(i) for i in range(N)]
sum = 0
max = -1
for i in range(N):
    if A[i] >= max:
      sum += 1
      max = A[i]
      
print(sum)

N = int(input())
A = [int(i) for i in range(N)]
sum = 0
max = 0
for i in range(N):
    if A[i] >= max:
      sum += 1
      max = A[i]
      
print(sum)

N = int(input())
A = [int(i) for i in range(N)]
sum = 0
max = 0
for i in range(N):
    if A[i] >= max:
      sum += 1
      max = A[i]
      
print(sum)

N = int(input())
A = [int(i) for i in range(N)]
sum = 0
max = -1
for i in range(N):
    if A[i] >= max:
      sum += 1
      max = A[i]
      
print(sum)

N = int(input())
A = [int(i) for i in range(N)]
sum = 0
max = -1
for i in range(N):
    if A[i] >= max:
      sum += 1
      max = A[i]
      
print(sum)

N = int(input())
A = [int(i) for i in input().split()]
sum = 0
max = 0
for i in range(N):
    if A[i] >= max:
      sum += 1
      max = A[i]
      
print(sum)

N = int(input())
A = [int(i) for i in input().split()]
sum = 0
max = 0
for i in range(N):
    if A[i] >= max:
      sum += 1
      max = A[i]
      
print(sum)

N = int(input())
A = [int(i) for i in input().split()]
sum = 0
max = 0
for i in range(N):
    if A[i] >= max:
      sum += 1
      max = A[i]
      
print(sum)

N = int(input())
A = [int(i) for i in input().split()]
sum = 0
max = 0
for i in range(N):
    if A[i] >= max:
      sum += 1
      max = A[i]
      
print(sum)

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):
mount_count = input()
mount_heights = input()
mount_heights_list = mount_heights.split()
count = 0
max_height = int(mount_heights_list[0])
for mount_height in mount_heights_list:
    if max_height <= int(mount_height):
        max_height = mount_height
        count += 1
print(count)

mount_count = input()
mount_heights = input()
mount_heights_list = mount_heights.split()
count = 0
max_height = int(mount_heights_list[0])
for mount_height in mount_heights_list:
    if max_height <= int(mount_height):
        max_height = mount_height
        count += 1
print(count)

mount_count = input()
mount_heights = input()
mount_heights_list = mount_heights.split()
count = 0
max_height = int(mount_heights_list[0])
for mount_height in mount_heights_list:
    if max_height <= int(mount_height):
        max_height = mount_height
        count += 1
print(count)

mount_count = input()
mount_heights = input()
mount_heights_list = mount_heights.split()
count = 0
max_height = int(mount_heights_list[0])
for mount_height in mount_heights_list:
    if max_height <= int(mount_height):
        max_height = mount_height
        count += 1
print(count)

mount_count = input()
mount_heights = input()
mount_heights_list = mount_heights.split()
count = 0
max_height = int(mount_heights_list[0])
for mount_height in mount_heights_list:
    if max_height <= int(mount_height):
        max_height = int(mount_height)
        count += 1
print(count)



mount_count = input()
mount_heights = input()
mount_heights_list = mount_heights.split()
count = 0
max_height = int(mount_heights_list[0])
for mount_height in mount_heights_list:
    if max_height <= int(mount_height):
        max_height = int(mount_height)
        count += 1
print(count)



mount_count = input()
mount_heights = input()
mount_heights_list = mount_heights.split()
count = 0
max_height = int(mount_heights_list[0])
for mount_height in mount_heights_list:
    if max_height <= int(mount_height):
        max_height = int(mount_height)
        count += 1
print(count)



mount_count = input()
mount_heights = input()
mount_heights_list = mount_heights.split()
count = 0
max_height = int(mount_heights_list[0])
for mount_height in mount_heights_list:
    if max_height <= int(mount_height):
        max_height = int(mount_height)
        count += 1
print(count)



Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: There are N mountains ranging from east to west, and an ocean to the west.  At the top of each mountain, there is an inn. You have decided to choose where to stay from these inns.  The height of the i-th mountain from the west is H_i.  You can certainly see the ocean from the inn at the top of the westmost mountain.  For the inn at the top of the i-th mountain from the west (i = 2, 3, ..., N), you can see the ocean if and only if H_1 \leq H_i, H_2 \leq H_i, ..., and H_{i-1} \leq H_i.  From how many of these N inns can you see the ocean?

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

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

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

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

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

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

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

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

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


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


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


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


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=[int(i) for i in input().split()]
b = 1  # counter
c = 1  # answer
m = h_list[0]  # max height
while b != n:
    if h_list[b] > m:
        c += 1
    b += 1
print(c)

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

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

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

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

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

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

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

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

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

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

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

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


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


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


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


n = int(input())
h = [int(x) for x in input().split()]
c = 1

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


n = int(input())
h = [int(x) for x in input().split()]
c = 1

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


n = int(input())
h = [int(x) for x in input().split()]
c = 1

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


n = int(input())
h = [int(x) for x in input().split()]
c = 1

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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted