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())
h = [int(input()) for i in range(n)]
result = 1

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

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

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

n = int(input())
h = [int(input()) for i in range(n)]
result = 1
now_max = h[0]

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

n = int(input())
h = [int(input()) for i in range(n)]
result = 1
now_max = h[0]

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

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

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

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

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

n = int(input())
h = [int(input()) for i in range(n)]
result = 1
now_max = h[0]

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

n = int(input())
h = [int(input()) for i in range(n)]
result = 1
now_max = h[0]

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

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

result = 0
now_max = 0

for i in range(n):
    if h[i] >= now_max:
        result = result + 1
        now_max = h[i]

print(result)


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

result = 0
now_max = 0

for i in range(n):
    if h[i] >= now_max:
        result = result + 1
        now_max = h[i]

print(result)


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

result = 0
now_max = 0

for i in range(n):
    if h[i] >= now_max:
        result = result + 1
        now_max = h[i]

print(result)


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

result = 0
now_max = 0

for i in range(n):
    if h[i] >= now_max:
        result = result + 1
        now_max = h[i]

print(result)


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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().split())
arr=list(map(int,input().split()))
res=[arr[0]]
for i in range(1,n):
  if arr[i]>=res[-1]:
    res.append(arr[i])
print(len(res))

n=int(input().split())
arr=list(map(int,input().split()))
res=[arr[0]]
for i in range(1,n):
  if arr[i]>=res[-1]:
    res.append(arr[i])
print(len(res))

n=int(input().split())
arr=list(map(int,input().split()))
res=[arr[0]]
for i in range(1,n):
  if arr[i]>=res[-1]:
    res.append(arr[i])
print(len(res))

n=int(input().split())
arr=list(map(int,input().split()))
res=[arr[0]]
for i in range(1,n):
  if arr[i]>=res[-1]:
    res.append(arr[i])
print(len(res))

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


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


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


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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

Submission attempts (in order):
n = int(input())
h=[int(x) for x in input().split()]
count=0
max=h[0]
for i in range(n-1):
    if max < h[i+1]:
        max=h[i]
        count+=1
print(count)

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

Submission attempts (in order):
count = int(input())
l = []
m = 0
c = 0
for i in range(count):
  val = int(input())
  m = max(m, val)
  if val >= m:
    c = c + 1
print(c)
           

count = int(input())
l = []
m = 0
c = 0
for i in range(count):
  val = int(input())
  m = max(m, val)
  if val >= m:
    c = c + 1
print(c)
           

count = int(input())
l = []
m = 0
c = 0
for i in range(count):
  val = int(input())
  m = max(m, val)
  if val >= m:
    c = c + 1
print(c)
           

count = int(input())
l = []
m = 0
c = 0
for i in range(count):
  val = int(input())
  m = max(m, val)
  if val >= m:
    c = c + 1
print(c)
           

count = int(input())
m = 0
c = 0
vals = input().split(" ")
for i in vals:
  val = int(i)
  m = max(m, val)
  if val >= m:
    c = c + 1
print(c)

count = int(input())
m = 0
c = 0
vals = input().split(" ")
for i in vals:
  val = int(i)
  m = max(m, val)
  if val >= m:
    c = c + 1
print(c)

count = int(input())
m = 0
c = 0
vals = input().split(" ")
for i in vals:
  val = int(i)
  m = max(m, val)
  if val >= m:
    c = c + 1
print(c)

count = int(input())
m = 0
c = 0
vals = input().split(" ")
for i in vals:
  val = int(i)
  m = max(m, val)
  if val >= m:
    c = c + 1
print(c)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

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

a = 0
b = 0

for i in range(n):
  for j in range(0, i-1):
    if h[j] >= h[i]:
      break
    else:
      a = a + 1
  a = 0
  if a == i:
    b = b + 1

print(b)

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

a = 0
b = 0

for i in range(n):
  for j in range(0, i-1):
    if h[j] >= h[i]:
      break
    else:
      a = a + 1
  a = 0
  if a == i:
    b = b + 1

print(b)

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

a = 0
b = 0

for i in range(n):
  for j in range(0, i-1):
    if h[j] >= h[i]:
      break
    else:
      a = a + 1
  a = 0
  if a == i:
    b = b + 1

print(b)

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

a = 0
b = 0

for i in range(n):
  for j in range(0, i-1):
    if h[j] >= h[i]:
      break
    else:
      a = a + 1
  a = 0
  if a == i:
    b = b + 1

print(b)

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

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

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

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

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

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

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

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

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

pattern1 = A+A-1
pattern2 = A+B
pattern3 = B+B-1

print(max(pattern1, pattern2, pattern3))

A, B = map(int, input().split())

pattern1 = A+A-1
pattern2 = A+B
pattern3 = B+B-1

print(max(pattern1, pattern2, pattern3))

A, B = map(int, input().split())

pattern1 = A+A-1
pattern2 = A+B
pattern3 = B+B-1

print(max(pattern1, pattern2, pattern3))

A, B = map(int, input().split())

pattern1 = A+A-1
pattern2 = A+B
pattern3 = B+B-1

print(max(pattern1, pattern2, pattern3))

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

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


print(count)

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

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


print(count)

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

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


print(count)

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

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


print(count)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

print(ans)

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

    max = raw_list[0]
    count = 1

    for i in range(1,len(raw_list)):
        if raw_list[i] >= max:
            count += 1
            max = raw_list[i]
    print (count)

if __name__ == "__main__":
    main()

def main():
    n = input()
    s = input()
    raw_list = list(map(int, raw_list))

    max = raw_list[0]
    count = 1

    for i in range(1,len(raw_list)):
        if raw_list[i] >= max:
            count += 1
            max = raw_list[i]
    print (count)

if __name__ == "__main__":
    main()

def main():
    n = input()
    s = input()
    raw_list = list(map(int, raw_list))

    max = raw_list[0]
    count = 1

    for i in range(1,len(raw_list)):
        if raw_list[i] >= max:
            count += 1
            max = raw_list[i]
    print (count)

if __name__ == "__main__":
    main()

def main():
    n = input()
    s = input()
    raw_list = list(map(int, raw_list))

    max = raw_list[0]
    count = 1

    for i in range(1,len(raw_list)):
        if raw_list[i] >= max:
            count += 1
            max = raw_list[i]
    print (count)

if __name__ == "__main__":
    main()

def main():
    n = input()
    s = input()
    raw_list = list(map(int, s.split()))

    max = raw_list[0]
    count = 1

    for i in range(1,len(raw_list)):
        if raw_list[i] >= max:
            count += 1
            max = raw_list[i]
    print (count)

if __name__ == "__main__":
    main()

def main():
    n = input()
    s = input()
    raw_list = list(map(int, s.split()))

    max = raw_list[0]
    count = 1

    for i in range(1,len(raw_list)):
        if raw_list[i] >= max:
            count += 1
            max = raw_list[i]
    print (count)

if __name__ == "__main__":
    main()

def main():
    n = input()
    s = input()
    raw_list = list(map(int, s.split()))

    max = raw_list[0]
    count = 1

    for i in range(1,len(raw_list)):
        if raw_list[i] >= max:
            count += 1
            max = raw_list[i]
    print (count)

if __name__ == "__main__":
    main()

def main():
    n = input()
    s = input()
    raw_list = list(map(int, s.split()))

    max = raw_list[0]
    count = 1

    for i in range(1,len(raw_list)):
        if raw_list[i] >= max:
            count += 1
            max = raw_list[i]
    print (count)

if __name__ == "__main__":
    main()

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

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


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


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


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


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


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


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


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


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


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


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


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


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

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

count = 0
max_h = 0

for h in H:
    if h > max_h:
        count += 1
        max_h = h
        
print(count)

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

count = 0
max_h = 0

for h in H:
    if h > max_h:
        count += 1
        max_h = h
        
print(count)

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

count = 0
max_h = 0

for h in H:
    if h > max_h:
        count += 1
        max_h = h
        
print(count)

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

count = 0
max_h = 0

for h in H:
    if h > max_h:
        count += 1
        max_h = h
        
print(count)

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

count = 0
max_h = 0

for h in H:
    if h >= max_h:
        count += 1
        max_h = h
        
print(count)

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

count = 0
max_h = 0

for h in H:
    if h >= max_h:
        count += 1
        max_h = h
        
print(count)

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

count = 0
max_h = 0

for h in H:
    if h >= max_h:
        count += 1
        max_h = h
        
print(count)

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

count = 0
max_h = 0

for h in H:
    if h >= max_h:
        count += 1
        max_h = h
        
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 = 5
H = [9,5,6,8,4]

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

N = 5
H = [9,5,6,8,4]

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

N = 5
H = [9,5,6,8,4]

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

N = 5
H = [9,5,6,8,4]

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

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

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

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

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

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

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

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

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

for i in range(1,N):
	if H[i] >= H[i-1]:
		cnt += 1
print(str(cnt)+'\n')

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

for i in range(1,N):
	if H[i] >= H[i-1]:
		cnt += 1
print(str(cnt)+'\n')

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

for i in range(1,N):
	if H[i] >= H[i-1]:
		cnt += 1
print(str(cnt)+'\n')

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

for i in range(1,N):
	if H[i] >= H[i-1]:
		cnt += 1
print(str(cnt)+'\n')

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

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

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

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

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

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

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

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

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

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

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()))
flag = True
cou = 1
while flag:
    MaxH = max(H)
    if H.index(MaxH) == 0:
        flag = False
    else:
        H = H[:MaxH]
        cou += 1

print(cou)

N = int(input())
H = list(map(int, input().split()))
flag = True
cou = 1
while flag:
    MaxH = max(H)
    if H.index(MaxH) == 0:
        flag = False
    else:
        H = H[:MaxH]
        cou += 1

print(cou)

N = int(input())
H = list(map(int, input().split()))
flag = True
cou = 1
while flag:
    MaxH = max(H)
    if H.index(MaxH) == 0:
        flag = False
    else:
        H = H[:MaxH]
        cou += 1

print(cou)

N = int(input())
H = list(map(int, input().split()))
flag = True
cou = 1
while flag:
    MaxH = max(H)
    if H.index(MaxH) == 0:
        flag = False
    else:
        H = H[:MaxH]
        cou += 1

print(cou)

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

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

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

N = int(input())
H = list(map(int, input().split()))
Hmax = 0
count = 0
for i in range(N):
    if H[i] >= Hmax:
        Hmax = H[i]
        count = 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):
# -*- coding: utf-8 -*-
h = list(map(int, input().split()))
print(len([i for i, x in enumerate(h) if (i == 0) or ((i == 1) and (h[0] <= h[i])) or ((i > 1) and (max(h[:i]) <= h[i]))]))


# -*- coding: utf-8 -*-
h = list(map(int, input().split()))
print(len([i for i, x in enumerate(h) if (i == 0) or ((i == 1) and (h[0] <= h[i])) or ((i > 1) and (max(h[:i]) <= h[i]))]))


# -*- coding: utf-8 -*-
h = list(map(int, input().split()))
print(len([i for i, x in enumerate(h) if (i == 0) or ((i == 1) and (h[0] <= h[i])) or ((i > 1) and (max(h[:i]) <= h[i]))]))


# -*- coding: utf-8 -*-
h = list(map(int, input().split()))
print(len([i for i, x in enumerate(h) if (i == 0) or ((i == 1) and (h[0] <= h[i])) or ((i > 1) and (max(h[:i]) <= h[i]))]))


n, h = int(input()), [0] + list(map(int, input().split()))
print(len([i for i, x in enumerate(h[2:], start=2) if max(h[:i]) <= h[i]]) + 1)


n, h = int(input()), [0] + list(map(int, input().split()))
print(len([i for i, x in enumerate(h[2:], start=2) if max(h[:i]) <= h[i]]) + 1)


n, h = int(input()), [0] + list(map(int, input().split()))
print(len([i for i, x in enumerate(h[2:], start=2) if max(h[:i]) <= h[i]]) + 1)


n, h = int(input()), [0] + list(map(int, input().split()))
print(len([i for i, x in enumerate(h[2:], start=2) if max(h[:i]) <= h[i]]) + 1)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

Submission attempts (in order):
import sys
 
def main():
    input = sys.stdin.readline
    N = int(input())
    A = list(map(int, input().split()))
 
    ans = 0
    H = A[0]
    for a in A:
        if a >= H:
            ans += 1
 
        H = max(H, a)

import sys
 
def main():
    input = sys.stdin.readline
    N = int(input())
    A = list(map(int, input().split()))
 
    ans = 0
    H = A[0]
    for a in A:
        if a >= H:
            ans += 1
 
        H = max(H, a)

import sys
 
def main():
    input = sys.stdin.readline
    N = int(input())
    A = list(map(int, input().split()))
 
    ans = 0
    H = A[0]
    for a in A:
        if a >= H:
            ans += 1
 
        H = max(H, a)

import sys
 
def main():
    input = sys.stdin.readline
    N = int(input())
    A = list(map(int, input().split()))
 
    ans = 0
    H = A[0]
    for a in A:
        if a >= H:
            ans += 1
 
        H = max(H, a)

import sys
 
def main():
    input = sys.stdin.readline
    N = int(input())
    A = list(map(int, input().split()))
 
    ans = 0
    H = A[0]
    for a in A:
        if a >= H:
            ans += 1
 
        H = max(H, a)
 
    return ans
 
 
if __name__ == '__main__':
    print(main())

import sys
 
def main():
    input = sys.stdin.readline
    N = int(input())
    A = list(map(int, input().split()))
 
    ans = 0
    H = A[0]
    for a in A:
        if a >= H:
            ans += 1
 
        H = max(H, a)
 
    return ans
 
 
if __name__ == '__main__':
    print(main())

import sys
 
def main():
    input = sys.stdin.readline
    N = int(input())
    A = list(map(int, input().split()))
 
    ans = 0
    H = A[0]
    for a in A:
        if a >= H:
            ans += 1
 
        H = max(H, a)
 
    return ans
 
 
if __name__ == '__main__':
    print(main())

import sys
 
def main():
    input = sys.stdin.readline
    N = int(input())
    A = list(map(int, input().split()))
 
    ans = 0
    H = A[0]
    for a in A:
        if a >= H:
            ans += 1
 
        H = max(H, a)
 
    return ans
 
 
if __name__ == '__main__':
    print(main())

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

High = H[0]

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

print(count)


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

count = 0

High = H[0]

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

print(count)


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

count = 0

High = H[0]

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

print(count)


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

count = 0

High = H[0]

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

print(count)


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

count = 0

High = H[0]

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

print(count)


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

count = 0

High = H[0]

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

print(count)


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

count = 0

High = H[0]

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

print(count)


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

count = 0

High = H[0]

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

print(count)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

Submission attempts (in order):
s = int(input())
a = list(map(int,input().split()))
cnt = 0
b = 0
for i in range(s):
  if a[i] >= b:
    b = a[i]
    cnt += 1
print(b)


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


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


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


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

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

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


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


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


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


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

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

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


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


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


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


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

Submission attempts (in order):
def sub():
    N, Hs = [input() for _ in range(2)]
    Hs = [int(e) for e in Hs.split(" ")]
    count = 1
    maxH = Hs[0]
    for i in range(1, N):
        h = Hs[i]
        if h >= maxH:
            count = count + 1
            maxH = h


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

sub()



def sub():
    N, Hs = [input() for _ in range(2)]
    Hs = [int(e) for e in Hs.split(" ")]
    count = 1
    maxH = Hs[0]
    for i in range(1, N):
        h = Hs[i]
        if h >= maxH:
            count = count + 1
            maxH = h


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

sub()



def sub():
    N, Hs = [input() for _ in range(2)]
    Hs = [int(e) for e in Hs.split(" ")]
    count = 1
    maxH = Hs[0]
    for i in range(1, N):
        h = Hs[i]
        if h >= maxH:
            count = count + 1
            maxH = h


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

sub()



def sub():
    N, Hs = [input() for _ in range(2)]
    Hs = [int(e) for e in Hs.split(" ")]
    count = 1
    maxH = Hs[0]
    for i in range(1, N):
        h = Hs[i]
        if h >= maxH:
            count = count + 1
            maxH = h


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

sub()



def sub():
    N, Hs = [input() for _ in range(2)]
    Hs = [int(e) for e in Hs.split(" ")]
    count = 1
    maxH = Hs[0]
    for i in range(1, int(N)):
        h = Hs[i]
        if h >= maxH:
            count = count + 1
            maxH = h


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

sub()



def sub():
    N, Hs = [input() for _ in range(2)]
    Hs = [int(e) for e in Hs.split(" ")]
    count = 1
    maxH = Hs[0]
    for i in range(1, int(N)):
        h = Hs[i]
        if h >= maxH:
            count = count + 1
            maxH = h


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

sub()



def sub():
    N, Hs = [input() for _ in range(2)]
    Hs = [int(e) for e in Hs.split(" ")]
    count = 1
    maxH = Hs[0]
    for i in range(1, int(N)):
        h = Hs[i]
        if h >= maxH:
            count = count + 1
            maxH = h


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

sub()



def sub():
    N, Hs = [input() for _ in range(2)]
    Hs = [int(e) for e in Hs.split(" ")]
    count = 1
    maxH = Hs[0]
    for i in range(1, int(N)):
        h = Hs[i]
        if h >= maxH:
            count = count + 1
            maxH = h


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

sub()



Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted