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

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

print(ans)

n = int(input())
hs = map(int, input().strip().split())

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

print(ans)

n = int(input())
hs = map(int, input().strip().split())

# print(hs)
max = 0
ans = 0
for i in range(n):
    if hs[i] >= max:
        ans +=1
        max = hs[i]

print(ans)

n = int(input())
hs = map(int, input().strip().split())

# print(hs)
max = 0
ans = 0
for i in range(n):
    if hs[i] >= max:
        ans +=1
        max = hs[i]

print(ans)

n = int(input())
hs = map(int, input().strip().split())

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

print(ans)

n = int(input())
hs = map(int, input().strip().split())

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

print(ans)

n = int(input())
hs = map(int, input().strip().split())

# print(hs)
max = 0
ans = 0
for i in range(n):
    if hs[i] >= max:
        ans +=1
        max = hs[i]

print(ans)

n = int(input())
hs = map(int, input().strip().split())

# print(hs)
max = 0
ans = 0
for i in range(n):
    if hs[i] >= max:
        ans +=1
        max = hs[i]

print(ans)

n = int(input())
hs = [int(h) for h in input().strip().split()]

# print(hs)
max = 0
ans = 0
for i in range(n):
    if hs[i] >= max:
        ans +=1
        max = hs[i]

print(ans)

n = int(input())
hs = [int(h) for h in input().strip().split()]

# print(hs)
max = 0
ans = 0
for i in range(n):
    if hs[i] >= max:
        ans +=1
        max = hs[i]

print(ans)

n = int(input())
hs = [int(h) for h in input().strip().split()]

# print(hs)
max = 0
ans = 0
for i in range(n):
    if hs[i] >= max:
        ans +=1
        max = hs[i]

print(ans)

n = int(input())
hs = [int(h) for h in input().strip().split()]

# print(hs)
max = 0
ans = 0
for i in range(n):
    if hs[i] >= max:
        ans +=1
        max = hs[i]

print(ans)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

Submission attempts (in order):
N = int(input())
H = list(map(int, input().split()))
highest = 0
c = 0
for h in H:
  if h>=highest:
    c+=1
  else:
    highest=h
print(h)

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

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

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

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

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

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

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


n=int(input())
H=list(map(int,input()))
ans=0
m=-1000
for i in range(n):
  if m<=H[i]:
    m=H[i]
    ans+=1
print(ans)


n=int(input())
H=list(map(int,input()))
ans=0
m=-1000
for i in range(n):
  if m<=H[i]:
    m=H[i]
    ans+=1
print(ans)


n=int(input())
H=list(map(int,input()))
ans=0
m=-1000
for i in range(n):
  if m<=H[i]:
    m=H[i]
    ans+=1
print(ans)


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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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


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


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


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

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

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

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

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

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

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

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

N = int(input())
H = list(map(int, input().split()))
ans = 1
for i in range(1, N):
  isOK = True
  for j in range(i):
    if H[j] > H[i]:
      isOK = False
      break
  if isOK: 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 = map(int, input().split())

hi = 0
cnt = 0
for h in H:
  if h <= hi:
    cnt += 1
  else:
    hi = h

print(cnt)


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

hi = 0
cnt = 0
for h in H:
  if h <= hi:
    cnt += 1
  else:
    hi = h

print(cnt)


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

hi = 0
cnt = 0
for h in H:
  if h <= hi:
    cnt += 1
  else:
    hi = h

print(cnt)


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

hi = 0
cnt = 0
for h in H:
  if h <= hi:
    cnt += 1
  else:
    hi = h

print(cnt)


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

hi = next(H)
cnt = 1
for h in H:
    if h >= hi:
        cnt += 1
        hi = h

print(cnt)


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

hi = next(H)
cnt = 1
for h in H:
    if h >= hi:
        cnt += 1
        hi = h

print(cnt)


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

hi = next(H)
cnt = 1
for h in H:
    if h >= hi:
        cnt += 1
        hi = h

print(cnt)


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

hi = next(H)
cnt = 1
for h in H:
    if h >= hi:
        cnt += 1
        hi = h

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

ans = 0
max_H = 0
for h in H:
  if h >= max_H:
    h = max_H
    ans += 1

print(ans)

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

ans = 0
max_H = 0
for h in H:
  if h >= max_H:
    h = max_H
    ans += 1

print(ans)

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

ans = 0
max_H = 0
for h in H:
  if h >= max_H:
    h = max_H
    ans += 1

print(ans)

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

ans = 0
max_H = 0
for h in H:
  if h >= max_H:
    h = max_H
    ans += 1

print(ans)

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

ans = 0
max_H = 0
for h in H:
  if h >= max_H:
    h = max_H
    ans += 1

print(ans)

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

ans = 0
max_H = 0
for h in H:
  if h >= max_H:
    h = max_H
    ans += 1

print(ans)

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

ans = 0
max_H = 0
for h in H:
  if h >= max_H:
    h = max_H
    ans += 1

print(ans)

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

ans = 0
max_H = 0
for h in H:
  if h >= max_H:
    h = max_H
    ans += 1

print(ans)

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

ans = 0
max_H = 0
for h in H:
  if h >= max_H:
    max_H = h
    ans += 1

print(ans)

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

ans = 0
max_H = 0
for h in H:
  if h >= max_H:
    max_H = h
    ans += 1

print(ans)

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

ans = 0
max_H = 0
for h in H:
  if h >= max_H:
    max_H = h
    ans += 1

print(ans)

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

ans = 0
max_H = 0
for h in H:
  if h >= max_H:
    max_H = h
    ans += 1

print(ans)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

Submission attempts (in order):
N = int(input())
L = map[int,input().split()]

ans = 1
for i in L
	if  L(:i)>L(i):
		continue
    else:
		ans = ans+1

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

ans = 1
for i in L
	if  L(:i)>L(i):
		continue
    else:
		ans = ans+1

N = int(input())
L = [int(input().split())]
 
ans = 1
for i in range(N):
    if  L[:i]>L[i]:
        continue
    else:
        ans = ans+1

N = int(input())
L = [int(input().split())]
 
ans = 1
for i in range(N):
    if  L[:i]>L[i]:
        continue
    else:
        ans = ans+1

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

ans = 1
for i in L
	if  L(:i)>L(i):
		continue
    else:
		ans = ans+1

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

ans = 1
for i in L
	if  L(:i)>L(i):
		continue
    else:
		ans = ans+1

N = int(input())
L = [int(input().split())]
 
ans = 1
for i in range(N):
    if  L[:i]>L[i]:
        continue
    else:
        ans = ans+1

N = int(input())
L = [int(input().split())]
 
ans = 1
for i in range(N):
    if  L[:i]>L[i]:
        continue
    else:
        ans = ans+1

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


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


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


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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

Submission attempts (in order):
li1 = []
c = 0
n = int(input())
for i in range(n):
    h = int(input())
    if i == 0:
        c += 1
    else:
        if h >= max(li1):
            c += 1
    li1.append(h)
print(c)

li1 = []
c = 0
n = int(input())
for i in range(n):
    h = int(input())
    if i == 0:
        c += 1
    else:
        if h >= max(li1):
            c += 1
    li1.append(h)
print(c)

li1 = []
c = 0
n = int(input())
for i in range(n):
    h = int(input())
    if i == 0:
        c += 1
    else:
        if h >= max(li1):
            c += 1
    li1.append(h)
print(c)

li1 = []
c = 0
n = int(input())
for i in range(n):
    h = int(input())
    if i == 0:
        c += 1
    else:
        if h >= max(li1):
            c += 1
    li1.append(h)
print(c)

c = 0
n = int(input())
li = list(map(int,input().split()))
li1 = []
for a in li:
    li1.append(a)
    if a >= max(li1):
            c += 1
print(c)

c = 0
n = int(input())
li = list(map(int,input().split()))
li1 = []
for a in li:
    li1.append(a)
    if a >= max(li1):
            c += 1
print(c)

c = 0
n = int(input())
li = list(map(int,input().split()))
li1 = []
for a in li:
    li1.append(a)
    if a >= max(li1):
            c += 1
print(c)

c = 0
n = int(input())
li = list(map(int,input().split()))
li1 = []
for a in li:
    li1.append(a)
    if a >= max(li1):
            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())
l=[int(input().split()) for _ in range(n)]

ans=1
a=l[0]
for i in range(n-1):
  if a<=l[i+1]:
    ans+=1
    a=max(a,l[i])

print(ans)

n=int(input())
l=[int(input().split()) for _ in range(n)]

ans=1
a=l[0]
for i in range(n-1):
  if a<=l[i+1]:
    ans+=1
    a=max(a,l[i])

print(ans)

n=int(input())
l=[int(input().split()) for _ in range(n)]

ans=1
a=l[0]
for i in range(n-1):
  if a<=l[i+1]:
    ans+=1
    a=max(a,l[i])

print(ans)

n=int(input())
l=[int(input().split()) for _ in range(n)]

ans=1
a=l[0]
for i in range(n-1):
  if a<=l[i+1]:
    ans+=1
    a=max(a,l[i])

print(ans)

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

ans=1
a=l[0]
for i in range(n-1):
  if a<=l[i+1]:
    ans+=1
    a=l[i+1]

print(ans)

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

ans=1
a=l[0]
for i in range(n-1):
  if a<=l[i+1]:
    ans+=1
    a=l[i+1]

print(ans)

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

ans=1
a=l[0]
for i in range(n-1):
  if a<=l[i+1]:
    ans+=1
    a=l[i+1]

print(ans)

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

ans=1
a=l[0]
for i in range(n-1):
  if a<=l[i+1]:
    ans+=1
    a=l[i+1]

print(ans)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

Submission attempts (in order):
n = int(input())
s = list(map(int,input().split()))
cnt = 1
for i in range(n-1,0,-1):
    result = True
    for j in range(i-2,-1,-1):
        if s[j] > s[i]:
            result = False
            break
    if result:
        cnt +=1
print(cnt)

n = int(input())
s = list(map(int,input().split()))
cnt = 1
for i in range(n-1,0,-1):
    result = True
    for j in range(i-2,-1,-1):
        if s[j] > s[i]:
            result = False
            break
    if result:
        cnt +=1
print(cnt)

n = int(input())
s = list(map(int,input().split()))
cnt = 1
for i in range(n-1,0,-1):
    result = True
    for j in range(i-2,-1,-1):
        if s[j] > s[i]:
            result = False
            break
    if result:
        cnt +=1
print(cnt)

n = int(input())
s = list(map(int,input().split()))
cnt = 1
for i in range(n-1,0,-1):
    result = True
    for j in range(i-2,-1,-1):
        if s[j] > s[i]:
            result = False
            break
    if result:
        cnt +=1
print(cnt)

n = int(input())
s = list(map(int,input().split()))
cnt = 1
for i in range(n-1,0,-1):
    result = True
    for j in range(i-1,-1,-1):
        if s[j] > s[i]:
            result = False
            break
    if result:
        cnt +=1
print(cnt)

n = int(input())
s = list(map(int,input().split()))
cnt = 1
for i in range(n-1,0,-1):
    result = True
    for j in range(i-1,-1,-1):
        if s[j] > s[i]:
            result = False
            break
    if result:
        cnt +=1
print(cnt)

n = int(input())
s = list(map(int,input().split()))
cnt = 1
for i in range(n-1,0,-1):
    result = True
    for j in range(i-1,-1,-1):
        if s[j] > s[i]:
            result = False
            break
    if result:
        cnt +=1
print(cnt)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

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

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

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

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

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

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

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

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

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

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


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

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


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

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


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

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

N = int(input())
H = list( map( int, input().split() ) )
cnt = 1
for k in range(N-1):
  if H[k+1] >= H[k]:
    cnt += 1
  else:
    break
print(cnt)

N = int(input())
H = list( map( int, input().split() ) )
cnt = 1
for k in range(N-1):
  if H[k+1] >= H[k]:
    cnt += 1
  else:
    break
print(cnt)

N = int(input())
H = list( map( int, input().split() ) )
cnt = 1
for k in range(N-1):
  if H[k+1] >= H[k]:
    cnt += 1
  else:
    break
print(cnt)

N = int(input())
H = list( map( int, input().split() ) )
cnt = 0
threshold = 0
for k in range(N):
  if threshold <= H[k]:
    cnt += 1
    threshold = H[k]
print(cnt)

N = int(input())
H = list( map( int, input().split() ) )
cnt = 0
threshold = 0
for k in range(N):
  if threshold <= H[k]:
    cnt += 1
    threshold = H[k]
print(cnt)

N = int(input())
H = list( map( int, input().split() ) )
cnt = 0
threshold = 0
for k in range(N):
  if threshold <= H[k]:
    cnt += 1
    threshold = H[k]
print(cnt)

N = int(input())
H = list( map( int, input().split() ) )
cnt = 0
threshold = 0
for k in range(N):
  if threshold <= H[k]:
    cnt += 1
    threshold = H[k]
print(cnt)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

Submission attempts (in order):
N = int(input())
H = [int(n) for n in input().split()]
ans = 1
t = H[0]
for h in H[1:]:
  if t <= h:
    ans += 1
    t = h
  else:
    break
print(ans)


N = int(input())
H = [int(n) for n in input().split()]
ans = 1
t = H[0]
for h in H[1:]:
  if t <= h:
    ans += 1
    t = h
  else:
    break
print(ans)


N = int(input())
H = [int(n) for n in input().split()]
ans = 1
t = H[0]
for h in H[1:]:
  if t <= h:
    ans += 1
  else:
    break
print(ans)


N = int(input())
H = [int(n) for n in input().split()]
ans = 1
t = H[0]
for h in H[1:]:
  if t <= h:
    ans += 1
  else:
    break
print(ans)


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


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


N = int(input())
H = [int(n) for n in input().split()]
ans = 1
t = H[0]
for h in H[1:]:
  if t <= h:
    ans += 1
    t = h
  else:
    break
print(ans)


N = int(input())
H = [int(n) for n in input().split()]
ans = 1
t = H[0]
for h in H[1:]:
  if t <= h:
    ans += 1
    t = h
  else:
    break
print(ans)


N = int(input())
H = [int(n) for n in input().split()]
ans = 1
t = H[0]
for h in H[1:]:
  if t <= h:
    ans += 1
  else:
    break
print(ans)


N = int(input())
H = [int(n) for n in input().split()]
ans = 1
t = H[0]
for h in H[1:]:
  if t <= h:
    ans += 1
  else:
    break
print(ans)


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


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


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


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


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


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


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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


N = int(input())
Hlist = list(map(int, input().split()))
ans = 0
max_h = 0
for H in Hlist:
    if H >= max_h:
        ans += 1
    max_h = max(H, max_h)
print(max_h)


N = int(input())
Hlist = list(map(int, input().split()))
ans = 0
max_h = 0
for H in Hlist:
    if H >= max_h:
        ans += 1
    max_h = max(H, max_h)
print(max_h)


N = int(input())
Hlist = list(map(int, input().split()))
ans = 0
max_h = 0
for H in Hlist:
    if H >= max_h:
        ans += 1
    max_h = max(H, max_h)
print(max_h)


N = int(input())
Hlist = list(map(int, input().split()))
ans = 0
max_h = 0
for H in Hlist:
    if H >= max_h:
        ans += 1
    max_h = max(H, max_h)
print(ans)


N = int(input())
Hlist = list(map(int, input().split()))
ans = 0
max_h = 0
for H in Hlist:
    if H >= max_h:
        ans += 1
    max_h = max(H, max_h)
print(ans)


N = int(input())
Hlist = list(map(int, input().split()))
ans = 0
max_h = 0
for H in Hlist:
    if H >= max_h:
        ans += 1
    max_h = max(H, max_h)
print(ans)


N = int(input())
Hlist = list(map(int, input().split()))
ans = 0
max_h = 0
for H in Hlist:
    if H >= max_h:
        ans += 1
    max_h = max(H, max_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()))
l = [h[0]]
ans = 1
for i in h[1:]:
    for j in l:
        if i>=j:
            l.append(i)
print(len(i))


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


n = int(input())
h = list(map(int, input().split()))
l = [h[0]]
ans = 1
for i in h[1:]:
        if i>=sorted(l)[-1]:
            l.append(i)
print(len(i))


n = int(input())
h = list(map(int, input().split()))
l = [h[0]]
ans = 1
for i in h[1:]:
        if i>=sorted(l)[-1]:
            l.append(i)
print(len(i))


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


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


n = int(input())
h = list(map(int, input().split()))
l = [h[0]]
ans = 1
for i in h[1:]:
        if i>=sorted(l)[-1]:
            l.append(i)
print(len(i))


n = int(input())
h = list(map(int, input().split()))
l = [h[0]]
ans = 1
for i in h[1:]:
        if i>=sorted(l)[-1]:
            l.append(i)
print(len(i))


n = int(input())
h = list(map(int, input().split()))
l = [str(h[0])]
for i in h[1:]:
        if i>=int(sorted(l)[-1]):
            i = str(i)
            l.append(i)
print(len(l))

n = int(input())
h = list(map(int, input().split()))
l = [str(h[0])]
for i in h[1:]:
        if i>=int(sorted(l)[-1]):
            i = str(i)
            l.append(i)
print(len(l))

n = int(input())
h = list(map(int, input().split()))
l = [str(h[0])]
for i in h[1:]:
        if i>=int(sorted(l)[-1]):
            i = str(i)
            l.append(i)
print(len(l))

n = int(input())
h = list(map(int, input().split()))
l = [str(h[0])]
for i in h[1:]:
        if i>=int(sorted(l)[-1]):
            i = str(i)
            l.append(i)
print(len(l))

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 = [int(i) for i in input().split()]
maxh,c = 0,0
for i in h:
  if i >= maxh:
    c += 1
print(c)
    



n = int(input())
h = [int(i) for i in input().split()]
maxh,c = 0,0
for i in h:
  if i >= maxh:
    c += 1
print(c)
    



n = int(input())
h = [int(i) for i in input().split()]
maxh,c = 0,0
for i in h:
  if i >= maxh:
    c += 1
print(c)
    



n = int(input())
h = [int(i) for i in input().split()]
maxh,c = 0,0
for i in h:
  if i >= maxh:
    c += 1
print(c)
    



n = int(input())
h = [int(i) for i in input().split()]
maxh,c = 0,0
for i in h:
  maxh = max(maxh,i)
  if i >= maxh:
    c += 1
    
print(c)



n = int(input())
h = [int(i) for i in input().split()]
maxh,c = 0,0
for i in h:
  maxh = max(maxh,i)
  if i >= maxh:
    c += 1
    
print(c)



n = int(input())
h = [int(i) for i in input().split()]
maxh,c = 0,0
for i in h:
  maxh = max(maxh,i)
  if i >= maxh:
    c += 1
    
print(c)



n = int(input())
h = [int(i) for i in input().split()]
maxh,c = 0,0
for i in h:
  maxh = max(maxh,i)
  if i >= maxh:
    c += 1
    
print(c)



Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

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

Submission attempts (in order):

# -*- coding: utf-8 -*-

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

current=0
cnt=0
for i in h:
    if i >= current:
        current = i
        cunt += 1

print(cnt)


# -*- coding: utf-8 -*-

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

current=0
cnt=0
for i in h:
    if i >= current:
        current = i
        cunt += 1

print(cnt)


# -*- coding: utf-8 -*-

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

current=0
cnt=0
for i in h:
    if i >= current:
        current = i
        cunt += 1

print(cnt)


# -*- coding: utf-8 -*-

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

current=0
cnt=0
for i in h:
    if i >= current:
        current = i
        cunt += 1

print(cnt)


# -*- coding: utf-8 -*-

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

current=0
cnt=0
for i in h:
    if i >= current:
        current = i
        cnt += 1

print(cnt)


# -*- coding: utf-8 -*-

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

current=0
cnt=0
for i in h:
    if i >= current:
        current = i
        cnt += 1

print(cnt)


# -*- coding: utf-8 -*-

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

current=0
cnt=0
for i in h:
    if i >= current:
        current = i
        cnt += 1

print(cnt)


# -*- coding: utf-8 -*-

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

current=0
cnt=0
for i in h:
    if i >= current:
        current = i
        cnt += 1

print(cnt)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

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

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

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

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

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


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


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


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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted