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

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

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

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

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

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


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


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


n = int(input())
maxHeight = 0
cnt = 0
mt = list(map(int, input().split()))
for i in range(n):
  if mt[i] >= maxHeight:
    maxHeight = mt[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())
a = [int(i) for i in input().split()]
b = a[0]
c = 0
ans = 0
for i in range(N-1):
  c += 1
  if b < a[c] and a[c - 1]  <a[c] :
    ans += 1
print(ans + 1) 

N = int(input())
a = [int(i) for i in input().split()]
b = a[0]
c = 0
ans = 0
for i in range(N-1):
  c += 1
  if b < a[c] and a[c - 1]  <a[c] :
    ans += 1
print(ans + 1) 

N = int(input())
a = [int(i) for i in input().split()]
b = a[0]
c = 0
ans = 0
for i in range(N):
  c += 1
  if b < a[c] and a[c - 1]  <a[c] :
    ans += 1
print(ans + 1) 

N = int(input())
a = [int(i) for i in input().split()]
b = a[0]
c = 0
ans = 0
for i in range(N):
  c += 1
  if b < a[c] and a[c - 1]  <a[c] :
    ans += 1
print(ans + 1) 

N = int(input())
a = [int(i) for i in input().split()]
b = a[0]
c = 0
ans = 0
for i in range(N-1):
  c += 1
  if b < a[c] and a[c - 1]  <a[c] :
    ans += 1
print(ans + 1) 

N = int(input())
a = [int(i) for i in input().split()]
b = a[0]
c = 0
ans = 0
for i in range(N-1):
  c += 1
  if b < a[c] and a[c - 1]  <a[c] :
    ans += 1
print(ans + 1) 

N = int(input())
a = [int(i) for i in input().split()]
b = a[0]
c = 0
ans = 0
for i in range(N):
  c += 1
  if b < a[c] and a[c - 1]  <a[c] :
    ans += 1
print(ans + 1) 

N = int(input())
a = [int(i) for i in input().split()]
b = a[0]
c = 0
ans = 0
for i in range(N):
  c += 1
  if b < a[c] and a[c - 1]  <a[c] :
    ans += 1
print(ans + 1) 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

X=1
for i in range(N):
    if H[i] < H[i+1]:
        X+=1
    H[i+1]=H[i]
print(X)


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

X=1
for i in range(N):
    if H[i] < H[i+1]:
        X+=1
    H[i+1]=H[i]
print(X)


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

X=1
for i in range(N):
    if H[i] < H[i+1]:
        X+=1
    H[i+1]=H[i]
print(X)


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

X=1
for i in range(N):
    if H[i] < H[i+1]:
        X+=1
    H[i+1]=H[i]
print(X)


N=int(input())
H=list(map(int,input().split()))
H.append(0)
max1=H[0]

X=1
for i in range(N):
    if max1 <= H[i+1]:
        X+=1
        max1=H[i+1]
        
print(X)


N=int(input())
H=list(map(int,input().split()))
H.append(0)
max1=H[0]

X=1
for i in range(N):
    if max1 <= H[i+1]:
        X+=1
        max1=H[i+1]
        
print(X)


N=int(input())
H=list(map(int,input().split()))
H.append(0)
max1=H[0]

X=1
for i in range(N):
    if max1 <= H[i+1]:
        X+=1
        max1=H[i+1]
        
print(X)


N=int(input())
H=list(map(int,input().split()))
H.append(0)
max1=H[0]

X=1
for i in range(N):
    if max1 <= H[i+1]:
        X+=1
        max1=H[i+1]
        
print(X)


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 = [int(i) for i in input().split()]
whole_list = [h_list[0:i] for i in range(1, n+1)]
count = sum(max(i) == whole_list[-1] for i in whole_list)
print(count)

n = int(input())
h_list = [int(i) for i in input().split()]
whole_list = [h_list[0:i] for i in range(1, n+1)]
count = sum(max(i) == whole_list[-1] for i in whole_list)
print(count)

n = int(input())
h_list = [int(i) for i in input().split()]
whole_list = [h_list[0:i] for i in range(1, n+1)]
count = sum(max(i) == whole_list[-1] for i in whole_list)
print(count)

n = int(input())
h_list = [int(i) for i in input().split()]
whole_list = [h_list[0:i] for i in range(1, n+1)]
count = sum(max(i) == whole_list[-1] for i in whole_list)
print(count)

n = int(input())
h_list = [int(i) for i in input().split()]
count = sum(max(j) == j[-1] for i in range(1, n+1) for j in [h_list[0:i]])
print(count)

n = int(input())
h_list = [int(i) for i in input().split()]
count = sum(max(j) == j[-1] for i in range(1, n+1) for j in [h_list[0:i]])
print(count)

n = int(input())
h_list = [int(i) for i in input().split()]
count = sum(max(j) == j[-1] for i in range(1, n+1) for j in [h_list[0:i]])
print(count)

n = int(input())
h_list = [int(i) for i in input().split()]
count = sum(max(j) == j[-1] for i in range(1, n+1) for j in [h_list[0: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()))
print(sum(max(h[:i])<=h[i]for i in range(n)))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

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):
a=int(input())
List=list(map(int,input().split()))
c =1
i =1
while i < a:
    if i-1 == 0:
        if List[i-1] < List[i]:
            c +=1
            i +=1
print(c)

a=int(input())
List=list(map(int,input().split()))
c =1
i =1
while i < a:
    if i-1 == 0:
        if List[i-1] < List[i]:
            c +=1
            i +=1
print(c)

a=int(input())
List=list(map(int,input().split()))
c =1
i =1
while i < a:
    if i-1 == 0:
        if List[i-1] < List[i]:
            c +=1
            i +=1
print(c)

a=int(input())
List=list(map(int,input().split()))
c =1
i =1
while i < a:
    if i-1 == 0:
        if List[i-1] < List[i]:
            c +=1
            i +=1
print(c)

a=int(input())
List=list(map(int,input().split()))
c =1
i =1
while i < a:
    if i-1 == 0:
        if List[i-1] < List[i]:
            c +=1
            i +=1
print(c)

a=int(input())
List=list(map(int,input().split()))
c =1
i =1
while i < a:
    if i-1 == 0:
        if List[i-1] < List[i]:
            c +=1
            i +=1
print(c)

a=int(input())
List=list(map(int,input().split()))
c =1
i =1
while i < a:
    if i-1 == 0:
        if List[i-1] < List[i]:
            c +=1
            i +=1
print(c)

a=int(input())
List=list(map(int,input().split()))
c =1
i =1
while i < a:
    if i-1 == 0:
        if List[i-1] < List[i]:
            c +=1
            i +=1
print(c)

a=int(input())
List=list(map(int,input().split()))
c = 0

for i in range(a):
    if max(List[:i+1]) == List[i]:
        c +=1
print(c)

a=int(input())
List=list(map(int,input().split()))
c = 0

for i in range(a):
    if max(List[:i+1]) == List[i]:
        c +=1
print(c)

a=int(input())
List=list(map(int,input().split()))
c = 0

for i in range(a):
    if max(List[:i+1]) == List[i]:
        c +=1
print(c)

a=int(input())
List=list(map(int,input().split()))
c = 0

for i in range(a):
    if max(List[:i+1]) == List[i]:
        c +=1
print(c)

Verdicts: Time Limit Exceeded

Time Limit Exceeded

Time Limit Exceeded

Time Limit Exceeded

Time Limit Exceeded

Time Limit Exceeded

Time Limit Exceeded

Time Limit Exceeded

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(input())
most_highest_data = 0
ans = 0

for i in range(N):
    if int(L[i]) > most_highest_data:
            most_higest_data = L[i]
    if most_highest_data <= int(L[i+1]):
        ans += 1

print(ans)


N = int(input())
L = list(input())
most_highest_data = 0
ans = 0

for i in range(N):
    if int(L[i]) > most_highest_data:
            most_higest_data = L[i]
    if most_highest_data <= int(L[i+1]):
        ans += 1

print(ans)


N = int(input())
L = list(input())
most_highest_data = 0
ans = 0

for i in range(N):
    if int(L[i]) > most_highest_data:
            most_higest_data = L[i]
    if most_highest_data <= int(L[i+1]):
        ans += 1

print(ans)


N = int(input())
L = list(input())
most_highest_data = 0
ans = 0

for i in range(N):
    if int(L[i]) > most_highest_data:
            most_higest_data = L[i]
    if most_highest_data <= int(L[i+1]):
        ans += 1

print(ans)


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

highest = L[0]
ans = 0

for i in range(N):
        if L[i] >= highest:
                ans += 1
                highest = L[i]

print(ans)


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

highest = L[0]
ans = 0

for i in range(N):
        if L[i] >= highest:
                ans += 1
                highest = L[i]

print(ans)


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

highest = L[0]
ans = 0

for i in range(N):
        if L[i] >= highest:
                ans += 1
                highest = L[i]

print(ans)


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

highest = L[0]
ans = 0

for i in range(N):
        if L[i] >= highest:
                ans += 1
                highest = L[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 = list(map(int, input().split()))

max_H = H[0]
L = [1 for i in range(N)]
for i in range(1, N):
    if H[i] > max_H:
        L[i] = 1
    else:
        L[i] = 0
    max_H = max(H[i], max_H)

print(sum(L))


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

max_H = H[0]
L = [1 for i in range(N)]
for i in range(1, N):
    if H[i] > max_H:
        L[i] = 1
    else:
        L[i] = 0
    max_H = max(H[i], max_H)

print(sum(L))


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

max_H = H[0]
L = [1 for i in range(N)]
for i in range(1, N):
    if H[i] > max_H:
        L[i] = 1
    else:
        L[i] = 0
    max_H = max(H[i], max_H)

print(sum(L))


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

max_H = H[0]
L = [1 for i in range(N)]
for i in range(1, N):
    if H[i] > max_H:
        L[i] = 1
    else:
        L[i] = 0
    max_H = max(H[i], max_H)

print(sum(L))


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

max_H = H[0]
L = [1 for i in range(N)]
for i in range(1, N):
    if H[i] >= max_H:
        L[i] = 1
    else:
        L[i] = 0
    max_H = max(H[i], max_H)

print(sum(L))


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

max_H = H[0]
L = [1 for i in range(N)]
for i in range(1, N):
    if H[i] >= max_H:
        L[i] = 1
    else:
        L[i] = 0
    max_H = max(H[i], max_H)

print(sum(L))


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

max_H = H[0]
L = [1 for i in range(N)]
for i in range(1, N):
    if H[i] >= max_H:
        L[i] = 1
    else:
        L[i] = 0
    max_H = max(H[i], max_H)

print(sum(L))


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

max_H = H[0]
L = [1 for i in range(N)]
for i in range(1, N):
    if H[i] >= max_H:
        L[i] = 1
    else:
        L[i] = 0
    max_H = max(H[i], max_H)

print(sum(L))


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

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

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

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

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

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

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

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

for i in range(1,n):

    if h[i] > max(h[:i]):
        cnt += 1

print(cnt)

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

for i in range(1,n):

    if h[i] > max(h[:i]):
        cnt += 1

print(cnt)

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

for i in range(1,n):

    if h[i] > max(h[:i]):
        cnt += 1

print(cnt)

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

for i in range(1,n):

    if h[i] > max(h[:i]):
        cnt += 1

print(cnt)

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

for i in range(1,n):

    if h[i] >= max(h[:i]):
        cnt += 1

print(cnt)

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

for i in range(1,n):

    if h[i] >= max(h[:i]):
        cnt += 1

print(cnt)

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

for i in range(1,n):

    if h[i] >= max(h[:i]):
        cnt += 1

print(cnt)

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

for i in range(1,n):

    if h[i] >= max(h[:i]):
        cnt += 1

print(cnt)

Verdicts: 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(input())for i in range(n)]
ans=0
for i in range(n):
  flag = True
  for j in range(i):
    if h[i]<h[j]:
      flag = False
      break
  if(flag):
    ans+=1
print(ans)

n = int(input())
h=[int(input())for i in range(n)]
ans=0
for i in range(n):
  flag = True
  for j in range(i):
    if h[i]<h[j]:
      flag = False
      break
  if(flag):
    ans+=1
print(ans)

n = int(input())
h=[int(input())for i in range(n)]
ans=0
for i in range(n):
  flag = True
  for j in range(i):
    if h[i]<h[j]:
      flag = False
      break
  if(flag):
    ans+=1
print(ans)

n = int(input())
h=[int(input())for i in range(n)]
ans=0
for i in range(n):
  flag = True
  for j in range(i):
    if h[i]<h[j]:
      flag = False
      break
  if(flag):
    ans+=1
print(ans)

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

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

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

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

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

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

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

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

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

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

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


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

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


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

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


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

count=1
l=H[0]
for i in range(N-1):
  if H[i+1]-l>=0:
    count +=1
    l=H[i+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())
H = input().split()
h = [int(k) for k in H]
l = []
ans = 1
for i in range(len(H)-1):
  l.append(h[i])
  
  if h[i+1] > max(l):
    ans += 1
  
print(ans)

N = int(input())
H = input().split()
h = [int(k) for k in H]
l = []
ans = 1
for i in range(len(H)-1):
  l.append(h[i])
  
  if h[i+1] > max(l):
    ans += 1
  
print(ans)

N = int(input())
H = input().split()
h = [int(k) for k in H]
l = []
ans = 1
for i in range(len(H)-1):
  l.append(h[i])
  
  if h[i+1] > max(l):
    ans += 1
  
print(ans)

N = int(input())
H = input().split()
h = [int(k) for k in H]
l = []
ans = 1
for i in range(len(H)-1):
  l.append(h[i])
  
  if h[i+1] > max(l):
    ans += 1
  
print(ans)

N = int(input())
H = input().split()
h = [int(k) for k in H]
l = []
ans = 1
for i in range(len(H)-1):
  l.append(h[i])
  
  if h[i+1] >= max(l):
    ans += 1
  
print(ans)

N = int(input())
H = input().split()
h = [int(k) for k in H]
l = []
ans = 1
for i in range(len(H)-1):
  l.append(h[i])
  
  if h[i+1] >= max(l):
    ans += 1
  
print(ans)

N = int(input())
H = input().split()
h = [int(k) for k in H]
l = []
ans = 1
for i in range(len(H)-1):
  l.append(h[i])
  
  if h[i+1] >= max(l):
    ans += 1
  
print(ans)

N = int(input())
H = input().split()
h = [int(k) for k in H]
l = []
ans = 1
for i in range(len(H)-1):
  l.append(h[i])
  
  if h[i+1] >= max(l):
    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())
height = list(map(int,input().split()))

no_ocean = 0

for i in range(1,n):
  for k in range(1,i):
    if height[k-1] > height[i]:
      	no_ocean += 1
      	break
    else:
        continue
        
print(n - no_ocean)
    

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

no_ocean = 0

for i in range(1,n):
  for k in range(1,i):
    if height[k-1] > height[i]:
      	no_ocean += 1
      	break
    else:
        continue
        
print(n - no_ocean)
    

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

no_ocean = 0

for i in range(1,n):
  for k in range(1,i):
    if height[k-1] > height[i]:
      	no_ocean += 1
      	break
    else:
        continue
        
print(n - no_ocean)
    

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

no_ocean = 0

for i in range(1,n):
  for k in range(1,i):
    if height[k-1] > height[i]:
      	no_ocean += 1
      	break
    else:
        continue
        
print(n - no_ocean)
    

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

no_ocean = 0

for i in range(n):
  for k in range(i+1):
    if height[k] > height[i]:
      	no_ocean += 1
      	break
    else:
        continue
        
print(n - no_ocean)
    

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

no_ocean = 0

for i in range(n):
  for k in range(i+1):
    if height[k] > height[i]:
      	no_ocean += 1
      	break
    else:
        continue
        
print(n - no_ocean)
    

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

no_ocean = 0

for i in range(n):
  for k in range(i+1):
    if height[k] > height[i]:
      	no_ocean += 1
      	break
    else:
        continue
        
print(n - no_ocean)
    

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

no_ocean = 0

for i in range(n):
  for k in range(i+1):
    if height[k] > height[i]:
      	no_ocean += 1
      	break
    else:
        continue
        
print(n - no_ocean)
    

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

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

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

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

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

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

print(ans)

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

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

print(ans)

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

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

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

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

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

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

print(ans)

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

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

print(ans)

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

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

print(ans)

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

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

print(ans)

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

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

print(ans)

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

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

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

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

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

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

N = int(input())
h_vals = input().split(' ')
hmax = -1
count = 0
for h in h_vals:
  if hmax <= h
  	hmax = h
  	count+=1
print(count)

N = int(input())
h_vals = input().split(' ')
hmax = -1
count = 0
for h in h_vals:
  if hmax <= h:
  	hmax = h
  	count+=1
print(count)


N = int(input())
h_vals = input().split(' ')
hmax = -1
count = 0
for h in h_vals:
  if hmax <= h:
  	hmax = h
  	count+=1
print(count)


N = int(input())
h_vals = input().split(' ')
hmax = -1
count = 0
for h in h_vals:
  if hmax <= h
  	hmax = h
  	count+=1
print(count)

N = int(input())
h_vals = input().split(' ')
hmax = -1
count = 0
for h in h_vals:
  if hmax <= h
  	hmax = h
  	count+=1
print(count)

N = int(input())
h_vals = input().split(' ')
hmax = -1
count = 0
for h in h_vals:
  if hmax <= h:
  	hmax = h
  	count+=1
print(count)


N = int(input())
h_vals = input().split(' ')
hmax = -1
count = 0
for h in h_vals:
  if hmax <= h:
  	hmax = h
  	count+=1
print(count)


N = int(input())
h_vals = input().split(' ')
h_vals = [int(h) for h in h_vals]
hmax = -1
count = 0
for h in h_vals:
  if hmax <= h:
  	hmax = h
  	count+=1
print(count)


N = int(input())
h_vals = input().split(' ')
h_vals = [int(h) for h in h_vals]
hmax = -1
count = 0
for h in h_vals:
  if hmax <= h:
  	hmax = h
  	count+=1
print(count)


N = int(input())
h_vals = input().split(' ')
h_vals = [int(h) for h in h_vals]
hmax = -1
count = 0
for h in h_vals:
  if hmax <= h:
  	hmax = h
  	count+=1
print(count)


N = int(input())
h_vals = input().split(' ')
h_vals = [int(h) for h in h_vals]
hmax = -1
count = 0
for h in h_vals:
  if hmax <= h:
  	hmax = h
  	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
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 j in range(1,n):
    if(h[j]>=h[0]:
       ans+=1
print(ans)

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

n = int(input())
h = [int(input()) for i in range(n)]
ans=1
for j in range(1,n):
    if(h[j]>=h[0]:
       ans+=1
print(ans)

n = int(input())
h = [int(input()) for i in range(n)]
ans=1
for j in range(1,n):
    if(h[j]>=h[0]:
       ans+=1
print(ans)

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

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

n = int(input())
h = [int(input()) for i in range(n)]
ans=1
for j in range(1,n):
    if(h[j]>=h[0]:
       ans+=1
print(ans)

n = int(input())
h = [int(input()) for i in range(n)]
ans=1
for j in range(1,n):
    if(h[j]>=h[0]:
       ans+=1
print(ans)

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


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


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


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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted