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

arr = list(map(int, input().strip().split()))

ma = arr[0]
cnt = 1

for i in range(1,n):
  	if arr[i] >= ma:
      	cnt += 1
	ma = max(ma, arr[i])
    
print (ans)


n = int(input())

arr = list(map(int, input().strip().split()))

ma = arr[0]
cnt = 1

for i in range(1,n):
  	if arr[i] >= ma:
      	cnt += 1
	ma = max(ma, arr[i])
    
print (ans)


n = int(input())

arr = list(map(int, input().strip().split()))

ma = arr[0]
cnt = 1

for i in range(1,n):
  	if arr[i] >= ma:
      	cnt += 1
	ma = max(ma, arr[i])
    
print (ans)


n = int(input())

arr = list(map(int, input().strip().split()))

ma = arr[0]
cnt = 1

for i in range(1,n):
  	if arr[i] >= ma:
      	cnt += 1
	ma = max(ma, arr[i])
    
print (ans)


n = int(input())

arr = list(map(int, input().strip().split()))

ma = arr[0]
cnt = 1

for i in range(1,n):
	if arr[i] >= ma:
		cnt += 1

	ma = max(ma, arr[i])

print (cnt)

n = int(input())

arr = list(map(int, input().strip().split()))

ma = arr[0]
cnt = 1

for i in range(1,n):
	if arr[i] >= ma:
		cnt += 1

	ma = max(ma, arr[i])

print (cnt)

n = int(input())

arr = list(map(int, input().strip().split()))

ma = arr[0]
cnt = 1

for i in range(1,n):
	if arr[i] >= ma:
		cnt += 1

	ma = max(ma, arr[i])

print (cnt)

n = int(input())

arr = list(map(int, input().strip().split()))

ma = arr[0]
cnt = 1

for i in range(1,n):
	if arr[i] >= ma:
		cnt += 1

	ma = max(ma, arr[i])

print (cnt)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

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

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

Submission attempts (in order):
import sys
n=int(input())
h=list(map(int, input().split()))
x=1
ans=h[0]
for i in range(1,n):
    if h[0]>=h[1] and h[0]>=h[2]:
        x=0
        print(1)
        sys.exit()
    if h[i]>=h[i-1]:
        x=x+1 
print(x)

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

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

cnt=0
highest=H[0]

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

print(cnt)

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

cnt=0
highest=H[0]

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

print(cnt)

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

cnt=0
highest=H[0]

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

print(cnt)

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

cnt=0
highest=H[0]

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

print(cnt)

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

cnt=0
highest=H[0]

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

print(cnt)


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

cnt=0
highest=H[0]

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

print(cnt)


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

cnt=0
highest=H[0]

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

print(cnt)


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

cnt=0
highest=H[0]

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

print(cnt)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

Submission attempts (in order):
N=int(input())
l1=list(map(int,input().split()))
ans=0
h=0
for i in range(N):
  if h<=l[i]:
    ans+=1
    h=max(h,l[i])
print(ans)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

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

for i in range(len(tmp)):
  H.append(int(tmp[i]))

ans = 0
for i in range(len(H)):
  chkflg = True
  if i >= 1:
    for j in range(i): 
      if H[j] > H[i]:
        chkflg = False
        break

  if chkflg: ans += 1

print(ans)   



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

for i in range(len(tmp)):
  H.append(int(tmp[i]))

ans = 0
for i in range(len(H)):
  chkflg = True
  if i >= 1:
    for j in range(i): 
      if H[j] > H[i]:
        chkflg = False
        break

  if chkflg: ans += 1

print(ans)   



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

for i in range(len(tmp)):
  H.append(int(tmp[i]))

ans = 0
for i in range(len(H)):
  chkflg = True
  if i >= 1:
    for j in range(i): 
      if H[j] > H[i]:
        chkflg = False
        break

  if chkflg: ans += 1

print(ans)   



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

for i in range(len(tmp)):
  H.append(int(tmp[i]))

ans = 0
for i in range(len(H)):
  chkflg = True
  if i >= 1:
    for j in range(i): 
      if H[j] > H[i]:
        chkflg = False
        break

  if chkflg: ans += 1

print(ans)   



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

ans = 0
for i in range(len(H)):
  chkflg = True
  if i >= 1:
    for j in range(i): 
      if H[j] > H[i]:
        chkflg = False
        break

  if chkflg: ans += 1

print(ans)   



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

ans = 0
for i in range(len(H)):
  chkflg = True
  if i >= 1:
    for j in range(i): 
      if H[j] > H[i]:
        chkflg = False
        break

  if chkflg: ans += 1

print(ans)   



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

ans = 0
for i in range(len(H)):
  chkflg = True
  if i >= 1:
    for j in range(i): 
      if H[j] > H[i]:
        chkflg = False
        break

  if chkflg: ans += 1

print(ans)   



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

ans = 0
for i in range(len(H)):
  chkflg = True
  if i >= 1:
    for j in range(i): 
      if H[j] > H[i]:
        chkflg = False
        break

  if chkflg: 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()))

NH = 1
for i in range(N-1):
    if H[i+1]=>max(H[0:i+1]):
        NH = NH + 1
    else:
        NH = NH

print(NH)

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

NH = 1
for i in range(N-1):
    if H[i+1]=>max(H[0:i+1]):
        NH = NH + 1
    else:
        NH = NH

print(NH)

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

NH = 1
for i in range(N-1):
    if H[i+1]=>max(H[0:i+1]):
        NH = NH + 1
    else:
        NH = NH

print(NH)

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

NH = 1
for i in range(N-1):
    if H[i+1]=>max(H[0:i+1]):
        NH = NH + 1
    else:
        NH = NH

print(NH)

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

NH = 1
for i in range(N-1):
    if H[i+1] >= max(H[0:i+1]):
        NH = NH + 1
    else:
        NH = NH

print(NH)

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

NH = 1
for i in range(N-1):
    if H[i+1] >= max(H[0:i+1]):
        NH = NH + 1
    else:
        NH = NH

print(NH)

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

NH = 1
for i in range(N-1):
    if H[i+1] >= max(H[0:i+1]):
        NH = NH + 1
    else:
        NH = NH

print(NH)

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

NH = 1
for i in range(N-1):
    if H[i+1] >= max(H[0:i+1]):
        NH = NH + 1
    else:
        NH = NH

print(NH)

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 = 0

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


print(ans)


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

ans = 0

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


print(ans)


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

ans = 0

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


print(ans)


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

ans = 0

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


print(ans)

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

Submission attempts (in order):
from sys import stdin

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

#print(list(reversed(range(1,N))))

c = 1
for i in reversed(range(1,N)):
  print(i,c,max(H[:i+1]))
  if H[i] - H[i-1] > 0 and H[i] == max(H[:i+1]):
    c += 1

print(c)


from sys import stdin

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

#print(list(reversed(range(1,N))))

c = 1
for i in reversed(range(1,N)):
  print(i,c,max(H[:i+1]))
  if H[i] - H[i-1] > 0 and H[i] == max(H[:i+1]):
    c += 1

print(c)


from sys import stdin

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

#print(list(reversed(range(1,N))))

c = 1
for i in reversed(range(1,N)):
  print(i,c,max(H[:i+1]))
  if H[i] - H[i-1] > 0 and H[i] == max(H[:i+1]):
    c += 1

print(c)


from sys import stdin

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

#print(list(reversed(range(1,N))))

c = 1
for i in reversed(range(1,N)):
  print(i,c,max(H[:i+1]))
  if H[i] - H[i-1] > 0 and H[i] == max(H[:i+1]):
    c += 1

print(c)


from sys import stdin
 
N = int(input())
H = [int(x) for x in stdin.readline().rstrip().split()]
 
c = 1
for i in reversed(range(1,N)):
  if H[i] - H[i-1] >= 0 and H[i] == max(H[:i+1]):
    c += 1
 
print(c)

from sys import stdin
 
N = int(input())
H = [int(x) for x in stdin.readline().rstrip().split()]
 
c = 1
for i in reversed(range(1,N)):
  if H[i] - H[i-1] >= 0 and H[i] == max(H[:i+1]):
    c += 1
 
print(c)

from sys import stdin
 
N = int(input())
H = [int(x) for x in stdin.readline().rstrip().split()]
 
c = 1
for i in reversed(range(1,N)):
  if H[i] - H[i-1] >= 0 and H[i] == max(H[:i+1]):
    c += 1
 
print(c)

from sys import stdin
 
N = int(input())
H = [int(x) for x in stdin.readline().rstrip().split()]
 
c = 1
for i in reversed(range(1,N)):
  if H[i] - H[i-1] >= 0 and H[i] == max(H[:i+1]):
    c += 1
 
print(c)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

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

ans = 1

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

print(ans)

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

ans = 1

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

print(ans)

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

ans = 0

for i in range(n):
    if max(h[0:i]) >= h[i] and h[0] >= h[i]:
        ans += 1

print(ans)

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

ans = 0

for i in range(n):
    if max(h[0:i]) >= h[i] and h[0] >= h[i]:
        ans += 1

print(ans)

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

ans = 1

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

print(ans)

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

ans = 1

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

print(ans)

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

ans = 1

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

print(ans)

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

ans = 1

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

print(ans)

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

ans = 0

for i in range(n):
    if max(h[0:i]) >= h[i] and h[0] >= h[i]:
        ans += 1

print(ans)

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

ans = 0

for i in range(n):
    if max(h[0:i]) >= h[i] and h[0] >= h[i]:
        ans += 1

print(ans)

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

ans = 1

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

print(ans)

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

ans = 1

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

print(ans)

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

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

print(cnt)

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

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

print(cnt)

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

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

print(cnt)

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

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

print(cnt)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

Submission attempts (in order):
n = int(input())
h = map(int, input().split())
total = 1
max_value = h[0]
for i in range(1, n):
    if max_value <= h[i]:
        total += 1
    max_value = max(max_value, h[i])
print(total)


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


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


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


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


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


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


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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

Submission attempts (in order):
n = int(input())
h_list = [int(input()) for h in range(n)]

count = 0
last_h = 0
for index,h in enumerate(h_list):
	if last_h <= h:
		count += 1
	
	if last_h < h:
		last_h = h

print(count)
		
	
	

n = int(input())
h_list = [int(input()) for h in range(n)]

count = 0
last_h = 0
for index,h in enumerate(h_list):
	if last_h <= h:
		count += 1
	
	if last_h < h:
		last_h = h

print(count)
		
	
	

n = int(input())
h_list = [int(input()) for h in range(n)]

count = 0
last_h = 0
for index,h in enumerate(h_list):
	if last_h <= h:
		count += 1
	
	if last_h < h:
		last_h = h

print(count)
		
	
	

n = int(input())
h_list = [int(input()) for h in range(n)]

count = 0
last_h = 0
for index,h in enumerate(h_list):
	if last_h <= h:
		count += 1
	
	if last_h < h:
		last_h = h

print(count)
		
	
	

n = int(input())
h_list = list(map(int, input().split()))
h_list = h_list[:n]
count = 0
last_h = 0
for index,h in enumerate(h_list):
	if last_h <= h:
		count += 1
	
	if last_h <= h:
		last_h = h

print(count)
		
	
	

n = int(input())
h_list = list(map(int, input().split()))
h_list = h_list[:n]
count = 0
last_h = 0
for index,h in enumerate(h_list):
	if last_h <= h:
		count += 1
	
	if last_h <= h:
		last_h = h

print(count)
		
	
	

n = int(input())
h_list = list(map(int, input().split()))
h_list = h_list[:n]
count = 0
last_h = 0
for index,h in enumerate(h_list):
	if last_h <= h:
		count += 1
	
	if last_h <= h:
		last_h = h

print(count)
		
	
	

n = int(input())
h_list = list(map(int, input().split()))
h_list = h_list[:n]
count = 0
last_h = 0
for index,h in enumerate(h_list):
	if last_h <= h:
		count += 1
	
	if last_h <= h:
		last_h = h

print(count)
		
	
	

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

Submission attempts (in order):
N = int(input())
H = [int(n) for n in input().split()]
ans = 0
for i in range(1, N+1):
  t = max(H[:i])
  if t <= H[i]:
    ans += 1
print(ans)


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


N = int(input())
H = [int(n) for n in input().split()]
ans = 0
for i in range(N):
  t = max(H[:i])
  if t <= H[i]:
    ans += 1
print(ans)


N = int(input())
H = [int(n) for n in input().split()]
ans = 0
for i in range(N):
  t = max(H[:i])
  if t <= H[i]:
    ans += 1
print(ans)


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


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


N = int(input())
H = [int(n) for n in input().split()]
ans = 0
for i in range(N):
  t = max(H[:i])
  if t <= H[i]:
    ans += 1
print(ans)


N = int(input())
H = [int(n) for n in input().split()]
ans = 0
for i in range(N):
  t = max(H[:i])
  if t <= H[i]:
    ans += 1
print(ans)


N = int(input())
H = [int(n) for n in input().split()]
ans = 0
for i in range(N):
  t = max(H[:i+1])
  if t <= H[i]:
    ans += 1
print(ans)


N = int(input())
H = [int(n) for n in input().split()]
ans = 0
for i in range(N):
  t = max(H[:i+1])
  if t <= H[i]:
    ans += 1
print(ans)


N = int(input())
H = [int(n) for n in input().split()]
ans = 0
for i in range(N):
  t = max(H[:i+1])
  if t <= H[i]:
    ans += 1
print(ans)


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

print(ans)


n = int(input())

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

ans = 1

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

print(ans)


n = int(input())

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

ans = 1

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

print(ans)


n = int(input())

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

ans = 1

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

print(ans)


n = int(input())

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

ans = 1

for i in range(1,n):
	if max(h[0:i]) <= h[i]:
		#print(i)
		ans = ans + 1

print(ans)


n = int(input())

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

ans = 1

for i in range(1,n):
	if max(h[0:i]) <= h[i]:
		#print(i)
		ans = ans + 1

print(ans)


n = int(input())

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

ans = 1

for i in range(1,n):
	if max(h[0:i]) <= h[i]:
		#print(i)
		ans = ans + 1

print(ans)


n = int(input())

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

ans = 1

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


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


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


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


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



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



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



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



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
max = 0
for i in h:
    if i > max:
        max = i
        ans += 1

print(ans)

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

ans = 0
max = 0
for i in h:
    if i > max:
        max = i
        ans += 1

print(ans)

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

ans = 0
max = 0
for i in h:
    if i > max:
        max = i
        ans += 1

print(ans)

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

ans = 0
max = 0
for i in h:
    if i > max:
        max = i
        ans += 1

print(ans)

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

ans = 0
max = 0
for i in h:
    if i >= max:
        max = i
        ans += 1

print(ans)

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

ans = 0
max = 0
for i in h:
    if i >= max:
        max = i
        ans += 1

print(ans)

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

ans = 0
max = 0
for i in h:
    if i >= max:
        max = i
        ans += 1

print(ans)

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

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

Submission attempts (in order):
l = int(input())
c = 1
b4most = 0
answer = 0
ryokan = list(map(int, input().split()))
print(ryokan)
for data in ryokan:
    if b4most <= data:
        answer += 1
        b4most = data
print(answer)


l = int(input())
c = 1
b4most = 0
answer = 0
ryokan = list(map(int, input().split()))
print(ryokan)
for data in ryokan:
    if b4most <= data:
        answer += 1
        b4most = data
print(answer)


l = int(input())
c = 1
b4most = 0
answer = 0
ryokan = list(map(int, input().split()))
print(ryokan)
for data in ryokan:
    if b4most <= data:
        answer += 1
        b4most = data
print(answer)


l = int(input())
c = 1
b4most = 0
answer = 0
ryokan = list(map(int, input().split()))
print(ryokan)
for data in ryokan:
    if b4most <= data:
        answer += 1
        b4most = data
print(answer)


l = int(input())
c = 1
b4most = 0
answer = 0
ryokan = list(map(int, input().split()))
for data in ryokan:
    if b4most <= data:
        answer += 1
        b4most = data
print(answer)


l = int(input())
c = 1
b4most = 0
answer = 0
ryokan = list(map(int, input().split()))
for data in ryokan:
    if b4most <= data:
        answer += 1
        b4most = data
print(answer)


l = int(input())
c = 1
b4most = 0
answer = 0
ryokan = list(map(int, input().split()))
for data in ryokan:
    if b4most <= data:
        answer += 1
        b4most = data
print(answer)


l = int(input())
c = 1
b4most = 0
answer = 0
ryokan = list(map(int, input().split()))
for data in ryokan:
    if b4most <= data:
        answer += 1
        b4most = data
print(answer)


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted