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):
it = int(input())
lists = list(map(int,input().split()))
x = 0
i = it - 1

for j in range(i):
  listo = lists[:j+1]
  if max(listo) == lists[j]:
    x += 1
  else:
    continue

print(x)

it = int(input())
lists = list(map(int,input().split()))
x = 0
i = it - 1

for j in range(i):
  listo = lists[:j+1]
  if max(listo) == lists[j]:
    x += 1
  else:
    continue

print(x)

it = int(input())
lists = list(map(int,input().split()))
x = 0
i = it - 1

for j in range(i):
  listo = lists[:j+1]
  if max(listo) == lists[j]:
    x += 1
  else:
    continue

print(x)

it = int(input())
lists = list(map(int,input().split()))
x = 0
i = it - 1

for j in range(i):
  listo = lists[:j+1]
  if max(listo) == lists[j]:
    x += 1
  else:
    continue

print(x)

it = int(input())
lists = list(map(int,input().split()))
x = 0
i = it 

for j in range(i):
  listo = lists[:j+1]
  if max(listo) == lists[j]:
    x += 1
  else:
    continue

print(x)

it = int(input())
lists = list(map(int,input().split()))
x = 0
i = it 

for j in range(i):
  listo = lists[:j+1]
  if max(listo) == lists[j]:
    x += 1
  else:
    continue

print(x)

it = int(input())
lists = list(map(int,input().split()))
x = 0
i = it 

for j in range(i):
  listo = lists[:j+1]
  if max(listo) == lists[j]:
    x += 1
  else:
    continue

print(x)

it = int(input())
lists = list(map(int,input().split()))
x = 0
i = it 

for j in range(i):
  listo = lists[:j+1]
  if max(listo) == lists[j]:
    x += 1
  else:
    continue

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

a = int(input())
b = map(int,input().split())
b = list(b)
k = 1
for i in range(a-1):
    maxim = max(a[:i+1])
    if maxim <= a[i+1]:
        k += 1
print(k)

a = int(input())
b = map(int,input().split())
b = list(b)
k = 1
for i in range(a-1):
    maxim = max(a[:i+1])
    if maxim <= a[i+1]:
        k += 1
print(k)

a = int(input())
b = map(int,input().split())
b = list(b)
k = 1
for i in range(a-1):
    maxim = max(a[:i+1])
    if maxim <= a[i+1]:
        k += 1
print(k)

a = int(input())
b = map(int,input().split())
b = list(b)
k = 1
for i in range(a-1):
    maxim = max(b[:i+1])
    if maxim <= b[i+1]:
        k += 1
print(k)

a = int(input())
b = map(int,input().split())
b = list(b)
k = 1
for i in range(a-1):
    maxim = max(b[:i+1])
    if maxim <= b[i+1]:
        k += 1
print(k)

a = int(input())
b = map(int,input().split())
b = list(b)
k = 1
for i in range(a-1):
    maxim = max(b[:i+1])
    if maxim <= b[i+1]:
        k += 1
print(k)

a = int(input())
b = map(int,input().split())
b = list(b)
k = 1
for i in range(a-1):
    maxim = max(b[:i+1])
    if maxim <= b[i+1]:
        k += 1
print(k)

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()))
highest = H[0]
ans = 1

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

print(ans)

N = int(input())
H = list(map(int, input().split()))
highest = H[0]
ans = 1

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

print(ans)

N = int(input())
H = list(map(int, input().split()))
highest = H[0]
ans = 1

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

print(ans)

N = int(input())
H = list(map(int, input().split()))
highest = H[0]
ans = 1

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

print(ans)

N = int(input())
H = list(map(int, input().split()))
highest = H[0]
ans = 1

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

print(ans)

N = int(input())
H = list(map(int, input().split()))
highest = H[0]
ans = 1

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

print(ans)

N = int(input())
H = list(map(int, input().split()))
highest = H[0]
ans = 1

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

print(ans)

N = int(input())
H = list(map(int, input().split()))
highest = H[0]
ans = 1

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

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

Submission attempts (in order):
cnt = 1
N = int(input())
H = list(map(int, input().split(' ')))
for i in range(1,N-1,1):
  _cnt=0
  for j in range(0,i,1):
    if H[i]>=H[j]:
      _cnt+=1
  if _cnt==i:
    cnt+=1
print(cnt)

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

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

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

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

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

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

cnt = 1
N = int(input())
H = list(map(int, input().split(' ')))
for i in range(1,N,1):
  _cnt=0
  for j in range(0,i,1):
    if H[i]>=H[j]:
      _cnt+=1
  if _cnt==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):
p,a=1,0
n=input()
for i in list(map(int,input().split())):
  if p<=i:ans+=1
  p=i
print(ans)

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

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

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

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

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

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

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

p,a=1,0
n=input()
for i in list(map(int,input().split())):
  if p<=i:a+=1
  p=max(i,p)
print(a)


p,a=1,0
n=input()
for i in list(map(int,input().split())):
  if p<=i:a+=1
  p=max(i,p)
print(a)


p,a=1,0
n=input()
for i in list(map(int,input().split())):
  if p<=i:a+=1
  p=max(i,p)
print(a)


p,a=1,0
n=input()
for i in list(map(int,input().split())):
  if p<=i:a+=1
  p=max(i,p)
print(a)


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

N = int(input())
Hs = list(map(int, input().split()))
print(len([i for i in range(0, len(Hs)) if all(lambda j: Hs[j]<=Hs[j+1]), range(0, i)]))

N = int(input())
Hs = list(map(int, input().split()))
print(len([i for i in range(0, len(Hs)) if all(lambda j: Hs[j]<=Hs[j+1]), range(0, i)]))

N = int(input())
Hs = list(map(int, input().split()))
print(len([i for i in range(0, len(Hs)) if all(lambda j: Hs[j]<=Hs[j+1]), range(0, i)]))

N = int(input())
Hs = list(map(int, input().split()))
print(len([i for i in range(0, len(Hs)) if all([Hs[j] <= Hs[i] for j in range(0, i)])]))

N = int(input())
Hs = list(map(int, input().split()))
print(len([i for i in range(0, len(Hs)) if all([Hs[j] <= Hs[i] for j in range(0, i)])]))

N = int(input())
Hs = list(map(int, input().split()))
print(len([i for i in range(0, len(Hs)) if all([Hs[j] <= Hs[i] for j in range(0, i)])]))

N = int(input())
Hs = list(map(int, input().split()))
print(len([i for i in range(0, len(Hs)) if all([Hs[j] <= Hs[i] for j in range(0, i)])]))

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 = input().split()
x = []
for i in H:
    x.append(int(i))
ans = 1
for i in range(N - 1):
    if x[i] <= x[i + 1]:
        ans = ans + 1
    else:
        break
print(ans)

N = int(input())
H = input().split()
x = []
for i in H:
    x.append(int(i))
ans = 1
for i in range(N - 1):
    if x[i] <= x[i + 1]:
        ans = ans + 1
    else:
        break
print(ans)

N = int(input())
H = input().split()
x = []
for i in H:
    x.append(int(i))
ans = 1
for i in range(N - 1):
    if x[i] <= x[i + 1]:
        ans = ans + 1
    else:
        break
print(ans)

N = int(input())
H = input().split()
x = []
for i in H:
    x.append(int(i))
ans = 1
for i in range(N - 1):
    if x[i] <= x[i + 1]:
        ans = ans + 1
    else:
        break
print(ans)

N = int(input())
H = input().split()
x = []
for i in H:
    x.append(int(i))
ans = 1
flag = 0
for i in range(1, N):
    for j in range(i):
        if x[j] > x[i]:
            flag = 1
    if flag == 0:
        ans += 1
    flag = 0
print(ans)

N = int(input())
H = input().split()
x = []
for i in H:
    x.append(int(i))
ans = 1
flag = 0
for i in range(1, N):
    for j in range(i):
        if x[j] > x[i]:
            flag = 1
    if flag == 0:
        ans += 1
    flag = 0
print(ans)

N = int(input())
H = input().split()
x = []
for i in H:
    x.append(int(i))
ans = 1
flag = 0
for i in range(1, N):
    for j in range(i):
        if x[j] > x[i]:
            flag = 1
    if flag == 0:
        ans += 1
    flag = 0
print(ans)

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

Submission attempts (in order):
now = 0
ans = 0
n = int(input())
li = list(map(int,input().split()))
for i in li:
    if now >= i:
        now = i
        ans += 1
print(ans)

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

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

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

now = 0
ans = 0
n = int(input())
li = list(map(int,input().split()))
for i in li:
    if now <= i:
        now = i
        ans += 1
print(ans)


now = 0
ans = 0
n = int(input())
li = list(map(int,input().split()))
for i in li:
    if now <= i:
        now = i
        ans += 1
print(ans)


now = 0
ans = 0
n = int(input())
li = list(map(int,input().split()))
for i in li:
    if now <= i:
        now = i
        ans += 1
print(ans)


now = 0
ans = 0
n = int(input())
li = list(map(int,input().split()))
for i in li:
    if now <= i:
        now = 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()))

count = 0

for num, hight in enumerate(h):
  if h[num] >= max(h[:num]):
    count += 1

print(count)

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

count = 0

for num, hight in enumerate(h):
  if h[num] >= max(h[:num]):
    count += 1

print(count)

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

count = 0

for num, hight in enumerate(h):
  if h[num] >= max(h[:num]):
    count += 1

print(count)

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

count = 0

for num, hight in enumerate(h):
  if h[num] >= max(h[:num]):
    count += 1

print(count)

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

count = 0

for num, hight in enumerate(h):
  if hight >= max(h[:num+1]):
    count += 1

print(count)

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

count = 0

for num, hight in enumerate(h):
  if hight >= max(h[:num+1]):
    count += 1

print(count)

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

count = 0

for num, hight in enumerate(h):
  if hight >= max(h[:num+1]):
    count += 1

print(count)

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

count = 0

for num, hight in enumerate(h):
  if hight >= max(h[:num+1]):
    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):
count = 0

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

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



count = 0

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

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



count = 0

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

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



count = 0

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

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



count = 0

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

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

count = 0

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

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

count = 0

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

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

count = 0

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

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

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


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

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


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

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


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

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


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

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

print(cnt)


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

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

print(cnt)


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

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

print(cnt)


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

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

print(cnt)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

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

c = 0

for i in range(N):
    d = 0

    for j in range(i):
        #print(H[i], H[j])
        if H[i] > H[j] or H[i] == H[j]:
            d += 1
    if d == i:
        c += 1
c

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

c = 0

for i in range(N):
    d = 0

    for j in range(i):
        #print(H[i], H[j])
        if H[i] > H[j] or H[i] == H[j]:
            d += 1
    if d == i:
        c += 1
c

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

c = 0

for i in range(N):
    d = 0

    for j in range(i):
        #print(H[i], H[j])
        if H[i] > H[j] or H[i] == H[j]:
            d += 1
    if d == i:
        c += 1
c

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

c = 0

for i in range(N):
    d = 0

    for j in range(i):
        #print(H[i], H[j])
        if H[i] > H[j] or H[i] == H[j]:
            d += 1
    if d == i:
        c += 1
c

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

c = 0

for i in range(N):
    d = 0

    for j in range(i):
        #print(H[i], H[j])
        if H[i] > H[j] or H[i] == H[j]:
            d += 1
    if d == i:
        c += 1
print(c)

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

c = 0

for i in range(N):
    d = 0

    for j in range(i):
        #print(H[i], H[j])
        if H[i] > H[j] or H[i] == H[j]:
            d += 1
    if d == i:
        c += 1
print(c)

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

c = 0

for i in range(N):
    d = 0

    for j in range(i):
        #print(H[i], H[j])
        if H[i] > H[j] or H[i] == H[j]:
            d += 1
    if d == i:
        c += 1
print(c)

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

c = 0

for i in range(N):
    d = 0

    for j in range(i):
        #print(H[i], H[j])
        if H[i] > H[j] or H[i] == H[j]:
            d += 1
    if d == 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):
n = int(input())
H = [int(i) for i in input().strip().split()]
 
border = 0
can_num = 0
for h in H:
  if h > border:
    can_num += 1
    border = h
 
print(can_num)

n = int(input())
H = [int(i) for i in input().strip().split()]
 
border = 0
can_num = 0
for h in H:
  if h > border:
    can_num += 1
    border = h
 
print(can_num)

n = int(input())
H = input.strip().split()

border = 0
can_num = 0
for h in H:
  if h > border:
    can_num += 1
    border = h

print(can_num)



n = int(input())
H = input.strip().split()

border = 0
can_num = 0
for h in H:
  if h > border:
    can_num += 1
    border = h

print(can_num)



n = int(input())
H = [int(i) for i in input().strip().split()]
 
border = 0
can_num = 0
for h in H:
  if h > border:
    can_num += 1
    border = h
 
print(can_num)

n = int(input())
H = [int(i) for i in input().strip().split()]
 
border = 0
can_num = 0
for h in H:
  if h > border:
    can_num += 1
    border = h
 
print(can_num)

n = int(input())
H = input.strip().split()

border = 0
can_num = 0
for h in H:
  if h > border:
    can_num += 1
    border = h

print(can_num)



n = int(input())
H = input.strip().split()

border = 0
can_num = 0
for h in H:
  if h > border:
    can_num += 1
    border = h

print(can_num)



n = int(input())
H = [int(i) for i in input().strip().split()]
 
border = 0
can_num = 0
for h in H:
  if h >= border:
    can_num += 1
    border = h
 
print(can_num)

n = int(input())
H = [int(i) for i in input().strip().split()]
 
border = 0
can_num = 0
for h in H:
  if h >= border:
    can_num += 1
    border = h
 
print(can_num)

n = int(input())
H = [int(i) for i in input().strip().split()]
 
border = 0
can_num = 0
for h in H:
  if h >= border:
    can_num += 1
    border = h
 
print(can_num)

n = int(input())
H = [int(i) for i in input().strip().split()]
 
border = 0
can_num = 0
for h in H:
  if h >= border:
    can_num += 1
    border = h
 
print(can_num)

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()))
max_h = 0
ans = 0
for a in h:
  if max <= a:
    ans += 1
  max_h = max(a, max_h)
  
print(ans)

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

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

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

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

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

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

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

N = int(input())
H = [map(int,input().split())]
print(H)

N = int(input())
H = [map(int,input().split())]
print(H)

N = int(input())
H = [map(int,input().split())]
print(H)

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

a = 0
ans = 0

for i in H:
  if a <= i:
    a = i
    ans += 1
print(ans)

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

a = 0
ans = 0

for i in H:
  if a <= i:
    a = i
    ans += 1
print(ans)

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

a = 0
ans = 0

for i in H:
  if a <= i:
    a = i
    ans += 1
print(ans)

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

a = 0
ans = 0

for i in H:
  if a <= i:
    a = 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())
a=int(input())
cnt=1
for i in range(n-1):
  b=int(input())
  if a<=b:
    cnt++
    a=b

print(cnt)

n=int(input())
a=int(input())
cnt=1
for i in range(n-1):
  b=int(input())
  if a<=b:
    cnt++
    a=b

print(cnt)

n=int(input())
a=int(input())
cnt=1
for i in range(n-1):
  b=int(input())
  if a<=b:
    cnt++
    a=b

print(cnt)

n=int(input())
a=int(input())
cnt=1
for i in range(n-1):
  b=int(input())
  if a<=b:
    cnt++
    a=b

print(cnt)

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

print(cnt)

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

print(cnt)

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

print(cnt)

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

print(cnt)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

Submission attempts (in order):
N = int(input())

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

cansee = False
count = 0

for i in range(N-1):
    cansee = True
    for j in range(i):
        if H[j] > H[i]:
            cansee = False
    if cansee:
        count += 1

print(count)

N = int(input())

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

cansee = False
count = 0

for i in range(N-1):
    cansee = True
    for j in range(i):
        if H[j] > H[i]:
            cansee = False
    if cansee:
        count += 1

print(count)

N = int(input())

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

cansee = False
count = 0

for i in range(N-1):
    cansee = True
    for j in range(i):
        if H[j] > H[i]:
            cansee = False
    if cansee:
        count += 1

print(count)

N = int(input())

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

cansee = False
count = 0

for i in range(N-1):
    cansee = True
    for j in range(i):
        if H[j] > H[i]:
            cansee = False
    if cansee:
        count += 1

print(count)

N = int(input())

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

count = 0

for i in range(N):
    cansee = True
    for j in range(i):
        if H[j] > H[i]:
            cansee = False
    
    if cansee:
        count += 1

print(count)

N = int(input())

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

count = 0

for i in range(N):
    cansee = True
    for j in range(i):
        if H[j] > H[i]:
            cansee = False
    
    if cansee:
        count += 1

print(count)

N = int(input())

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

count = 0

for i in range(N):
    cansee = True
    for j in range(i):
        if H[j] > H[i]:
            cansee = False
    
    if cansee:
        count += 1

print(count)

N = int(input())

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

count = 0

for i in range(N):
    cansee = True
    for j in range(i):
        if H[j] > H[i]:
            cansee = False
    
    if cansee:
        count += 1

print(count)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

Submission attempts (in order):
num = int(input())
list = [int(i) for i in input().split()]
sum = 0
for j in range(num):
  list1 = list[:j+1]
  if max(list) == list1[-1]:
    sum += 1
  else:
    pass
print(sum)

num = int(input())
list = [int(i) for i in input().split()]
sum = 0
for j in range(num):
  list1 = list[:j+1]
  if max(list) == list1[-1]:
    sum += 1
  else:
    pass
print(sum)

num = int(input())
list = [int(i) for i in input().split()]
sum = 0
for j in range(num):
  list1 = list[:j+1]
  if max(list) == list1[-1]:
    sum += 1
  else:
    pass
print(sum)

num = int(input())
list = [int(i) for i in input().split()]
sum = 0
for j in range(num):
  list1 = list[:j+1]
  if max(list) == list1[-1]:
    sum += 1
  else:
    pass
print(sum)

num = int(input())
list = [int(i) for i in input().split()]
sum = 0
for j in range(num):
  list1 = list[:j+1]
  #print(list1)
  #print(max(list1))
  #print(list1[-1])
  if max(list1) == list1[-1]:
    sum += 1
  else:
    pass
print(sum)

num = int(input())
list = [int(i) for i in input().split()]
sum = 0
for j in range(num):
  list1 = list[:j+1]
  #print(list1)
  #print(max(list1))
  #print(list1[-1])
  if max(list1) == list1[-1]:
    sum += 1
  else:
    pass
print(sum)

num = int(input())
list = [int(i) for i in input().split()]
sum = 0
for j in range(num):
  list1 = list[:j+1]
  #print(list1)
  #print(max(list1))
  #print(list1[-1])
  if max(list1) == list1[-1]:
    sum += 1
  else:
    pass
print(sum)

num = int(input())
list = [int(i) for i in input().split()]
sum = 0
for j in range(num):
  list1 = list[:j+1]
  #print(list1)
  #print(max(list1))
  #print(list1[-1])
  if max(list1) == list1[-1]:
    sum += 1
  else:
    pass
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):
n = int(input())
h = list(map(int, input().split()))
ans = 1
for i in range(1, n):
    for j in range(1, n):
        c = 1
        if h[i-j] <= h[i]:
            c += 1
    if c == n:
        ans += 1
print(ans)

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

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

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

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

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

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

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

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

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


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


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

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

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


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


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

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

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

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

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

print(a)

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

print(a)

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

print(a)

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

print(a)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted