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

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

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

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

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

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

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

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

while n < m:
 if a[n] < max(a[0:n]):
  D=D
 else:
  D=D+1

print(D)

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

while n < m:
 if a[n] < max(a[0:n]):
  D=D
 else:
  D=D+1

print(D)

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

while n < m:
 if a[n] < max(a[0:n]):
  D=D
 else:
  D=D+1

print(D)

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

while n < m:
 if a[n] < max(a[0:n]):
  D=D
 else:
  D=D+1

print(D)

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

while n < m:
 if a[n] < max(a[0:n]):
  D=D 
  n=n+1
 else:
  D=D+1 
  n=n+1

print(D)

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

while n < m:
 if a[n] < max(a[0:n]):
  D=D 
  n=n+1
 else:
  D=D+1 
  n=n+1

print(D)

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

while n < m:
 if a[n] < max(a[0:n]):
  D=D 
  n=n+1
 else:
  D=D+1 
  n=n+1

print(D)

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

while n < m:
 if a[n] < max(a[0:n]):
  D=D 
  n=n+1
 else:
  D=D+1 
  n=n+1

print(D)

Verdicts: Time Limit Exceeded

Time Limit Exceeded

Time Limit Exceeded

Time Limit Exceeded

Accepted

Accepted

Accepted

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

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

count = 0
h = H[0]

for i in range(H):
    if h <= H[i]:
        count += 1
        h = H[i]

print(count)

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

count = 0
h = H[0]

for i in range(H):
    if h <= H[i]:
        count += 1
        h = H[i]

print(count)

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

count = 0
h = H[0]

for i in range(H):
    if h <= H[i]:
        count += 1
        h = H[i]

print(count)

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

count = 0
h = H[0]

for i in range(H):
    if h <= H[i]:
        count += 1
        h = H[i]

print(count)

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

count = 0
h = H[0]

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

print(count)

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

count = 0
h = H[0]

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

print(count)

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

count = 0
h = H[0]

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

print(count)

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

count = 0
h = H[0]

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

print(count)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

Submission attempts (in order):
N = int(input())
li = list(map(int, input().split()))
mireru = []
highest = 0
for i in li:
    if li[i] >= highest:
        mireru.append(1)
        highest = li[i]
print(sum(mireru))

N = int(input())
li = list(map(int, input().split()))
mireru = []
highest = 0
for i in li:
    if li[i] >= highest:
        mireru.append(1)
        highest = li[i]
print(sum(mireru))

N = int(input())
li = list(map(int, input().split()))
mireru = []
highest = 0
for i in li:
    if li[i] >= highest:
        mireru.append(1)
        highest = li[i]
print(sum(mireru))

N = int(input())
li = list(map(int, input().split()))
mireru = []
highest = 0
for i in li:
    if li[i] >= highest:
        mireru.append(1)
        highest = li[i]
print(sum(mireru))

N = int(input())
li = list(map(int, input().split()))
mireru = []
highest = 0
for i in li:
    if i >= highest:
        mireru.append(1)
        highest = i
print(sum(mireru))

N = int(input())
li = list(map(int, input().split()))
mireru = []
highest = 0
for i in li:
    if i >= highest:
        mireru.append(1)
        highest = i
print(sum(mireru))

N = int(input())
li = list(map(int, input().split()))
mireru = []
highest = 0
for i in li:
    if i >= highest:
        mireru.append(1)
        highest = i
print(sum(mireru))

N = int(input())
li = list(map(int, input().split()))
mireru = []
highest = 0
for i in li:
    if i >= highest:
        mireru.append(1)
        highest = i
print(sum(mireru))

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):
c=0
m=0
for _ in range(int(input())):
	n=int(input())
	if n>=m:
		c+=1
		m=n
print(c)

c=0
m=0
for _ in range(int(input())):
	n=int(input())
	if n>=m:
		c+=1
		m=n
print(c)

c=0
m=0
for _ in range(int(input())):
	n=int(input())
	if n>=m:
		c+=1
		m=n
print(c)

c=0
m=0
for _ in range(int(input())):
	n=int(input())
	if n>=m:
		c+=1
		m=n
print(c)

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

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

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

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

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

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

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

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

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

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

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

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())
m=0
c=0
for h in H:
  c += 1 if h>m else 0
  m=max(m,h)
print(c)

N=int(input())
H=map(int,input().split())
m=0
c=0
for h in H:
  c += 1 if h>m else 0
  m=max(m,h)
print(c)

N=int(input())
H=map(int,input().split())
m=0
c=0
for h in H:
  c += 1 if h>m else 0
  m=max(m,h)
print(c)

N=int(input())
H=map(int,input().split())
m=0
c=0
for h in H:
  c += 1 if h>m else 0
  m=max(m,h)
print(c)

N=int(input())
H=map(int,input().split())
m=0
c=0
for h in H:
  c += 1 if h>=m else 0
  m=max(m,h)
print(c)

N=int(input())
H=map(int,input().split())
m=0
c=0
for h in H:
  c += 1 if h>=m else 0
  m=max(m,h)
print(c)

N=int(input())
H=map(int,input().split())
m=0
c=0
for h in H:
  c += 1 if h>=m else 0
  m=max(m,h)
print(c)

N=int(input())
H=map(int,input().split())
m=0
c=0
for h in H:
  c += 1 if h>=m else 0
  m=max(m,h)
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 = map(int, input().split())
H = list(H)
print(H)

max = H[0]
counter = 0

for i in H:
  if i >= max:
    max = i
    counter += 1

print(counter)
  

N = int(input())

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

max = H[0]
counter = 0

for i in H:
  if i >= max:
    max = i
    counter += 1

print(counter)
  

N = int(input())

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

max = H[0]
counter = 0

for i in H:
  if i >= max:
    max = i
    counter += 1

print(counter)
  

N = int(input())

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

max = H[0]
counter = 0

for i in H:
  if i >= max:
    max = i
    counter += 1

print(counter)
  

N = int(input())

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

max = H[0]
counter = 0

for i in H:
  if i >= max:
    max = i
    counter += 1

print(counter)
  

N = int(input())

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

max = H[0]
counter = 0

for i in H:
  if i >= max:
    max = i
    counter += 1

print(counter)
  

N = int(input())

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

max = H[0]
counter = 0

for i in H:
  if i >= max:
    max = i
    counter += 1

print(counter)
  

N = int(input())

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

max = H[0]
counter = 0

for i in H:
  if i >= max:
    max = i
    counter += 1

print(counter)
  

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

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

count = 1

for i in range(1, N):
    del H[0]
    if(max(H) == H[0]):
        count += 1

print(count)

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

count = 1

for i in range(1, N):
    del H[0]
    if(max(H) == H[0]):
        count += 1

print(count)

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

count = 1

for i in range(1, N):
    del H[0]
    if(max(H) == H[0]):
        count += 1

print(count)

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

count = 1

for i in range(1, N):
    del H[0]
    if(max(H) == H[0]):
        count += 1

print(count)

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

count = 0

for i in reversed(range(0, N)):
    if(max(H) == H[-1]):
        count += 1
    del H[-1]

print(count)

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

count = 0

for i in reversed(range(0, N)):
    if(max(H) == H[-1]):
        count += 1
    del H[-1]

print(count)

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

count = 0

for i in reversed(range(0, N)):
    if(max(H) == H[-1]):
        count += 1
    del H[-1]

print(count)

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

count = 0

for i in reversed(range(0, N)):
    if(max(H) == H[-1]):
        count += 1
    del H[-1]

print(count)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

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


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

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


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

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


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

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


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

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

low = H[0]
count = 1

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

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

low = H[0]
count = 1

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

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

low = H[0]
count = 1

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

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

low = H[0]
count = 1

for i in range(1,N):
  if H[i] >= low:
    count += 1
    low = 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):
n=int(input())
m=0
a=input().split()
a.insert(0,a[0])
print(a)
for i in range(n-1):
  if int(a[i+1])-int(a[i]) >=0 and int(a[i+1])-int(a[0])>=0:
    m=m+1
print(m)

n=int(input())
m=0
a=input().split()
a.insert(0,a[0])
print(a)
for i in range(n-1):
  if int(a[i+1])-int(a[i]) >=0 and int(a[i+1])-int(a[0])>=0:
    m=m+1
print(m)

n=int(input())
m=0
a=input().split()
a.insert(0,a[0])
print(a)
for i in range(n-1):
  if int(a[i+1])-int(a[i]) >=0 and int(a[i+1])-int(a[0])>=0:
    m=m+1
print(m)

n=int(input())
m=0
a=input().split()
a.insert(0,a[0])
print(a)
for i in range(n-1):
  if int(a[i+1])-int(a[i]) >=0 and int(a[i+1])-int(a[0])>=0:
    m=m+1
print(m)

N=int(input())
H=list(map(int,input().split()))
ans=0
hh=0
for h in H:
  if h>=hh:
    ans=ans+1
    hh=h
  else:
    continue
print(ans)

N=int(input())
H=list(map(int,input().split()))
ans=0
hh=0
for h in H:
  if h>=hh:
    ans=ans+1
    hh=h
  else:
    continue
print(ans)

N=int(input())
H=list(map(int,input().split()))
ans=0
hh=0
for h in H:
  if h>=hh:
    ans=ans+1
    hh=h
  else:
    continue
print(ans)

N=int(input())
H=list(map(int,input().split()))
ans=0
hh=0
for h in H:
  if h>=hh:
    ans=ans+1
    hh=h
  else:
    continue
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):
line_len = int(input())
s = input().rstrip().split(' ')
inns = []
ans = 1
for i in range(line_len):
    inns.append(s[i])

for i in range(1,line_len):
    for x in range(i+1):
        total = 1
        if inns[x] > inns[i]:
            total = 0
    ans = ans + total
print(ans)

line_len = int(input())
s = input().rstrip().split(' ')
inns = []
ans = 1
for i in range(line_len):
    inns.append(s[i])

for i in range(1,line_len):
    for x in range(i+1):
        total = 1
        if inns[x] > inns[i]:
            total = 0
    ans = ans + total
print(ans)

line_len = int(input())
s = input().rstrip().split(' ')
inns = []
ans = 1
for i in range(line_len):
    inns.append(s[i])

for i in range(1,line_len):
    for x in range(i+1):
        total = 1
        if inns[x] > inns[i]:
            total = 0
    ans = ans + total
print(ans)

line_len = int(input())
s = input().rstrip().split(' ')
inns = []
ans = 1
for i in range(line_len):
    inns.append(s[i])

for i in range(1,line_len):
    for x in range(i+1):
        total = 1
        if inns[x] > inns[i]:
            total = 0
    ans = ans + total
print(ans)

line_len = int(input())
s = input().rstrip().split(' ')
inns = []
ans = 1
for i in range(line_len):
    inns.append(int(s[i]))
for i in range(1,line_len):
    for x in range(i):
        total = 1
        if inns[x] > inns[i]:
            total = 0
            break
    ans = ans + total
print(ans)

line_len = int(input())
s = input().rstrip().split(' ')
inns = []
ans = 1
for i in range(line_len):
    inns.append(int(s[i]))
for i in range(1,line_len):
    for x in range(i):
        total = 1
        if inns[x] > inns[i]:
            total = 0
            break
    ans = ans + total
print(ans)

line_len = int(input())
s = input().rstrip().split(' ')
inns = []
ans = 1
for i in range(line_len):
    inns.append(int(s[i]))
for i in range(1,line_len):
    for x in range(i):
        total = 1
        if inns[x] > inns[i]:
            total = 0
            break
    ans = ans + total
print(ans)

line_len = int(input())
s = input().rstrip().split(' ')
inns = []
ans = 1
for i in range(line_len):
    inns.append(int(s[i]))
for i in range(1,line_len):
    for x in range(i):
        total = 1
        if inns[x] > inns[i]:
            total = 0
            break
    ans = ans + total
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()))


n = 1
h = [15, 42, 12]

for i, v in enumerate(h):
    if i == 0:
        continue
    elif v < h[i-1]:
        break

print(i)


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


n = 1
h = [15, 42, 12]

for i, v in enumerate(h):
    if i == 0:
        continue
    elif v < h[i-1]:
        break

print(i)


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


n = 1
h = [15, 42, 12]

for i, v in enumerate(h):
    if i == 0:
        continue
    elif v < h[i-1]:
        break

print(i)


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


n = 1
h = [15, 42, 12]

for i, v in enumerate(h):
    if i == 0:
        continue
    elif v < h[i-1]:
        break

print(i)


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

cnt = 0

for i, v in enumerate(h):
    if v >= max(h[0:i+1]):
        cnt += 1


print(cnt)


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

cnt = 0

for i, v in enumerate(h):
    if v >= max(h[0:i+1]):
        cnt += 1


print(cnt)


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

cnt = 0

for i, v in enumerate(h):
    if v >= max(h[0:i+1]):
        cnt += 1


print(cnt)


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

cnt = 0

for i, v in enumerate(h):
    if v >= max(h[0:i+1]):
        cnt += 1


print(cnt)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

Submission attempts (in order):
N = int(input())
h = map(int,input().split())
mx = h[0]
ans = 1
for i in range(1,N):
    if h[i] >= mx:
        mx = h[i]
        ans += 1
print(ans)

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

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

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

N = int(input())
h = list(map(int,input().split()))
mx = 0
ans = 0
for i in h:
    if mx <= i:
        ans += 1
        mx = i
print(ans)

N = int(input())
h = list(map(int,input().split()))
mx = 0
ans = 0
for i in h:
    if mx <= i:
        ans += 1
        mx = i
print(ans)

N = int(input())
h = list(map(int,input().split()))
mx = 0
ans = 0
for i in h:
    if mx <= i:
        ans += 1
        mx = i
print(ans)

N = int(input())
h = list(map(int,input().split()))
mx = 0
ans = 0
for i in h:
    if mx <= i:
        ans += 1
        mx = i
print(ans)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

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

c = 0

for i in h:
  t = True
  for j in range(i):
    if h[j] >= h[i]:
      t = False
      break
   c += 1

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

c = 0

for i in h:
  t = True
  for j in range(i):
    if h[j] >= h[i]:
      t = False
      break
   c += 1

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

c = 0

for i in h:
  t = True
  for j in range(i):
    if h[j] >= h[i]:
      t = False
      break
   c += 1

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

c = 0

for i in h:
  t = True
  for j in range(i):
    if h[j] >= h[i]:
      t = False
      break
   c += 1

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

c = 0

for i in range(n):
  t = True
  for j in range(i):
    if h[j] > h[i]:
      t = False
      break
  if t == True:
    c += 1
  t = True
print(c)

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

c = 0

for i in range(n):
  t = True
  for j in range(i):
    if h[j] > h[i]:
      t = False
      break
  if t == True:
    c += 1
  t = True
print(c)

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

c = 0

for i in range(n):
  t = True
  for j in range(i):
    if h[j] > h[i]:
      t = False
      break
  if t == True:
    c += 1
  t = True
print(c)

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

c = 0

for i in range(n):
  t = True
  for j in range(i):
    if h[j] > h[i]:
      t = False
      break
  if t == True:
    c += 1
  t = True
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):
Hs = list(map(int, input().split()))

count = 0

hs_len = len(Hs)
for i, H in enumerate(Hs):
    flag = True
    if i == 0:
        pass
    else:
        for j in range(i, 0, -1):
            if Hs[j-1] > H:
                flag = False
                break
    if flag:
        count += 1

print(count)

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

count = 0

hs_len = len(Hs)
for i, H in enumerate(Hs):
    flag = True
    if i == 0:
        pass
    else:
        for j in range(i, 0, -1):
            if Hs[j-1] > H:
                flag = False
                break
    if flag:
        count += 1

print(count)

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

count = 0

hs_len = len(Hs)
for i, H in enumerate(Hs):
    flag = True
    if i == 0:
        pass
    else:
        for j in range(i, 0, -1):
            if Hs[j-1] > H:
                flag = False
                break
    if flag:
        count += 1

print(count)

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

count = 0

hs_len = len(Hs)
for i, H in enumerate(Hs):
    flag = True
    if i == 0:
        pass
    else:
        for j in range(i, 0, -1):
            if Hs[j-1] > H:
                flag = False
                break
    if flag:
        count += 1

print(count)

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

count = 0

hs_len = len(Hs)
for i, H in enumerate(Hs):
    flag = True
    for j in range(i, -1, -1):
        if Hs[j] > H:
            flag = False
            break

    if flag:
        count += 1

print(count)

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

count = 0

hs_len = len(Hs)
for i, H in enumerate(Hs):
    flag = True
    for j in range(i, -1, -1):
        if Hs[j] > H:
            flag = False
            break

    if flag:
        count += 1

print(count)

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

count = 0

hs_len = len(Hs)
for i, H in enumerate(Hs):
    flag = True
    for j in range(i, -1, -1):
        if Hs[j] > H:
            flag = False
            break

    if flag:
        count += 1

print(count)

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

count = 0

hs_len = len(Hs)
for i, H in enumerate(Hs):
    flag = True
    for j in range(i, -1, -1):
        if Hs[j] > H:
            flag = False
            break

    if flag:
        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 = int(input())
H = list(map(int, input().split()))
while len(H) < N:
    H.append(0)
print(H)
see = 1
for i in range(1, N):
    tall = True
    for j in range(i):
        if(H[j] > H[i]):
            tall = False
            break
    if tall:
        see += 1
print(see)


N = int(input())
H = list(map(int, input().split()))
while len(H) < N:
    H.append(0)
print(H)
see = 1
for i in range(1, N):
    tall = True
    for j in range(i):
        if(H[j] > H[i]):
            tall = False
            break
    if tall:
        see += 1
print(see)


N = int(input())
H = list(map(int, input().split()))
while len(H) < N:
    H.append(0)
print(H)
see = 1
for i in range(1, N):
    tall = True
    for j in range(i):
        if(H[j] > H[i]):
            tall = False
            break
    if tall:
        see += 1
print(see)


N = int(input())
H = list(map(int, input().split()))
while len(H) < N:
    H.append(0)
print(H)
see = 1
for i in range(1, N):
    tall = True
    for j in range(i):
        if(H[j] > H[i]):
            tall = False
            break
    if tall:
        see += 1
print(see)


N=int(input())
H=map(int,input().split())
ans,maxh=0,0
for h in H:
    if maxh<=h:
        ans+=1
        maxh=h
print(ans)

N=int(input())
H=map(int,input().split())
ans,maxh=0,0
for h in H:
    if maxh<=h:
        ans+=1
        maxh=h
print(ans)

N=int(input())
H=map(int,input().split())
ans,maxh=0,0
for h in H:
    if maxh<=h:
        ans+=1
        maxh=h
print(ans)

N=int(input())
H=map(int,input().split())
ans,maxh=0,0
for h in H:
    if maxh<=h:
        ans+=1
        maxh=h
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()))
print(h)

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


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

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


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

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


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

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


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


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


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


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

view = 0
cnt = 0
for i in range(n):
  if hotels[i] > view:
    cnt += 1
    view = hotels[i]
    
print(cnt)

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

view = 0
cnt = 0
for i in range(n):
  if hotels[i] > view:
    cnt += 1
    view = hotels[i]
    
print(cnt)

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

view = 0
cnt = 0
for i in range(n):
  if hotels[i] > view:
    cnt += 1
    view = hotels[i]
    
print(cnt)

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

view = 0
cnt = 0
for i in range(n):
  if hotels[i] > view:
    cnt += 1
    view = hotels[i]
    
print(cnt)

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

view = 0
cnt = 0
for i in range(n):
  if hotels[i] >= view:
    cnt += 1
    view = hotels[i]
    
print(cnt)

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

view = 0
cnt = 0
for i in range(n):
  if hotels[i] >= view:
    cnt += 1
    view = hotels[i]
    
print(cnt)

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

view = 0
cnt = 0
for i in range(n):
  if hotels[i] >= view:
    cnt += 1
    view = hotels[i]
    
print(cnt)

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

view = 0
cnt = 0
for i in range(n):
  if hotels[i] >= view:
    cnt += 1
    view = hotels[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()))

count = 0
maximum = 0

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

print(count)




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

count = 0
maximum = 0

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

print(count)




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

count = 0
maximum = 0

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

print(count)




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

count = 0
maximum = 0

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

print(count)




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

count = 0
maximum = 0

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

print(count)




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

count = 0
maximum = 0

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

print(count)




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

count = 0
maximum = 0

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

print(count)




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

count = 0
maximum = 0

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

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)




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: 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):
import sys
input = sys.stdin.readline
n = int(input())
h=list(map(int,input().split()))
print(h)
ans=1
ma=h[0]
for i in range(1,n):
    print(h[i])

import sys
input = sys.stdin.readline
n = int(input())
h=list(map(int,input().split()))
print(h)
ans=1
ma=h[0]
for i in range(1,n):
    print(h[i])

import sys
input = sys.stdin.readline
n = int(input())
h=list(map(int,input().split()))
print(h)
ans=1
ma=h[0]
for i in range(1,n):
    print(h[i])

import sys
input = sys.stdin.readline
n = int(input())
h=list(map(int,input().split()))
print(h)
ans=1
ma=h[0]
for i in range(1,n):
    print(h[i])

import sys
input = sys.stdin.readline
n = int(input())
h=list(map(int,input().split()))
ans=1
ma=h[0]
for i in range(1,n):
    if ma <= h[i]:
        ma = h[i]
        ans+=1
print(ans)

import sys
input = sys.stdin.readline
n = int(input())
h=list(map(int,input().split()))
ans=1
ma=h[0]
for i in range(1,n):
    if ma <= h[i]:
        ma = h[i]
        ans+=1
print(ans)

import sys
input = sys.stdin.readline
n = int(input())
h=list(map(int,input().split()))
ans=1
ma=h[0]
for i in range(1,n):
    if ma <= h[i]:
        ma = h[i]
        ans+=1
print(ans)

import sys
input = sys.stdin.readline
n = int(input())
h=list(map(int,input().split()))
ans=1
ma=h[0]
for i in range(1,n):
    if ma <= h[i]:
        ma = h[i]
        ans+=1
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

Submission attempts (in order):
N = int(input())
H = list(map(int, input().split()))
sum = 0
for i in range(N):
    h = [H[j] for j in range(i+1)]
    if i == 0:
        sum += 1
        continue
    if H[i] == max(h):
        sum += 1
    print(h, H[i])
print(sum)

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted