Problem:


Score : 200 points

Problem Statement

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?

Constraints

All values in input are integers.

1 \leq N \leq 20

1 \leq H_i \leq 100

Input

Input is given from Standard Input in the following format:

N
H_1 H_2 ... H_N

Output

Print the number of inns from which you can see the ocean.

Sample Input 1

4
6 5 6 8

Sample Output 1

3

You can see the ocean from the first, third and fourth inns from the west.

Sample Input 2

5
4 5 3 5 4

Sample Output 2

3

Sample Input 3

5
9 5 6 8 4

Sample Output 3

1



Sample input:
4
6 5 6 8


Sample output:
3

Submission status: Wrong Answer

Solution code:
n = int(input())

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

mountain = int(1)
for i in range(1, n):
    for j in range(i):
        if int(L[j]) >= int(L[i]):
            break
        else:
            mountain += 1
            break

print(mountain)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

mountain = int(1)
for i in range(1, n):
    for j in range(i):
        if int(L[j]) > int(L[i]):
            break
        else:
            mountain += 1
            break

print(mountain)

Submission status: Wrong Answer

Solution code:
n = int(input())
p = list(map(int,input().split()))
count = 0
for i in range(n):
    if i == 0 or p[i-1] < p[i]:
        count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
b = list(map(int, input().split()))
count = 0
if a == len(b):
  for i, b_c in enumerate(b):
    if (i == 0):
      count = count + 1
    else:
      if (b_c == max(b[i-1:i+2:1])):
          count = count + 1
print(count)

Submission status: Wrong Answer

Solution code:
def q39(n, h):
    count = 1
    for i in range(1, n):
        if h[i - 1] <= h[i] and h[0] <= h[i]:
            count += 1
    return count
    #eturn count


N = int(input())
H = [int(i) for i in input().split()]
print(q39(N, H))

Submission status: Wrong Answer

Solution code:
n = int(input())

L = input().split()

mountain = int(1)
for i in range(n):
    for j in range(i):
            if int(L[j]) >= int(L[i]):
          			break
            else:
                    mountain += 1
print(mountain)

Submission status: Wrong Answer

Solution code:
n = int(input())

h = input().split()

ans = 1

for i in range(1, n):
    if int(h[0]) <= int(h[i]) and int(h[1]) <= int(h[i]) and int(h[i - 1]) <= int(h[i]):
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

h = input().split()

ans = 1

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

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
hotel = list(map(int, input().split()))
count = 0
for i in range(0,N):
  if i == 0:
    pass
  elif hotel[i] >= hotel[i-1]:
    count += 1
print(count+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
p = list(map(int, input().split()))
count = 1
max = p[0]

for num in range(1,n):
    if max <= p[num] and p[num - 1] <= p[num]:
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
n=int(input())
h=list(map(int,input().split()))
c=1
if len(h)>1 and h[0]<=h[1]:
  c=2
for i in range(2,n):
  if h[i]>=max(h[0:i-1]):
    c+=1
print(c)

Submission status: Wrong Answer

Solution code:
n = input()
n = int(n)
l=[]
l=input().split(" ")
maximum=l[0]
c=0
for i in range(n):
	if(l[i]>=maximum):
		maximum=l[i]
		c=c+1
print(c)

Submission status: Wrong Answer

Solution code:
n = input()
n = int(n)
l=[]
l=input().split(" ")
maximum=l[0]
c=1
for i in range(1,n):
	if(l[i]>=maximum):
		maximum=l[i]
		c=c+1
print(c)

Submission status: Wrong Answer

Solution code:
n=int(input())
H=list(map(int,input().split()))
count=0
for i,h in enumerate(H):
    if i!=len(H)-1:
        if h<=H[i+1]:
            print(i)
            count+=1
    else:
        count+=1
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int,input().split()))
saidai = 0
cnt = 0

for i in H:
    print(N)
    if(i >= saidai):
        saidai = i
        cnt += 1
    

print(cnt)

Submission status: Wrong Answer

Solution code:
n1 = int(input())
n2 = [int(i) for i in input().split()]

c1 = 0
for i1 in range(n1):
    if i1 == 0:
        c1 += 1
        continue
    if n2[0] <= n2[i1] and n2[1] <= n2[i1] and  n2[i1 - 1] <= n2[i1] :
        c1 += 1

print(c1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
a = [int(i) for i in input().split()]
b = a[0]
c = 0
ans = 0
for i in range(N-1):
  c += 1
  if b <= a[c] and a[c - 1]  <= a[c] :
    ans += 1
print(ans + 1)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = [int(i) for i in input().split()]
b = a[0]
c = 0
ans = 0
for i in range(N-1):
  c += 1
  if b < a[c] and a[c - 1]  <a[c] :
    ans += 1
print(ans + 1)

Submission status: Wrong Answer

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

ans = 1

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

print(ans)

Submission status: Wrong Answer

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

ans = 1

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

print(ans)

Submission status: Wrong Answer

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

ans = 1
if(N >= 2):
    if(H[1] > H[0]):
        ans += 1

if(N >= 3):
    for i in range(2,N):
        if(H[i] >= max(H[:i-1])):
            ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int,input().split()))
count = 0
sum = 1
for i in range(1,n):
  for s in range(i-1,-1,-1):
    if h[i]>=h[s]:
      count+=1
  if count==i:
       sum+=1
print(sum)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int,input().split()))
n = 1

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

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int,input().split()))
n = 0

for i in range(N):
    if 0 < i:
        if H[0] <= H[i] and H[i-2] <= H[i] and H[i-1] < H[i]:
            n += 1
    elif i == 0:
        n += 1
print(n)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = list(map(int,input().split()))
n = 0

for i in range(N):
    if 0 < i:
        if H[0] <= H[i] and H[i-1] <= H[i]:
            n += 1
    elif i == 0:
        n += 1
print(n)

Submission status: Wrong Answer

Solution code:


def problem():
    N = int(input())
    H = list(map(int, input().split()))
    print(H)
    print(algorithm(N,H))


def algorithm(N: int, H):
  currentMax = H[0]
  counter = 1
  for i in range(1, N):
    if currentMax <= H[i]:
      counter += 1
      currentMax = H[i]
    
  return counter

problem()

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
n = int(input())
num_list = [ int(v) for v in range(n)]
s = 0
for i in range(n):
	if max(num_list[:i+1]) <= num_list[i]:
		s += 1
print(s)

Submission status: Wrong Answer

Solution code:
n = int(input())
num_list = [ int(v) for v in range(n)]
s = 0
for i in range(n):
	if max(num_list[:i+1]) <= i:
		s += 1
print(s)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int,input().split()))
num = 1
for i in range(1,n):
    if h[i]>=h[0]and h[i]>=h[1] and h[i]>=h[i-1]:
        num+=1
else:
    pass
print(num)

Submission status: Wrong Answer

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

count=1
for i in range(1,N) :
    if H[i-1] < H[i]:
        dammy=H[i]
        count+=1
    else :
        dammy=H[i-1]

print(count)

Submission status: Wrong Answer

Solution code:
a = [int(i) for i in input().split()]
h = a[1:]
num = 1
for i in range(1,len(h)):
    if h[i] >= max(h[:i]):
        num += 1

print(num)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = input()
N = int(N)
str = input().split()
H = []
i = 0
j = 0
for i in range(N):
  H.append( int(str[i]) )
flag = 0
ans = 0
for i in range(N):
  for j in range(i):
    if H [i] < H[j]:
      flag = flag + 1
    else:
      flag = 0
  if flag == 0:
    ans = ans+1
  flag = 0

print(ans)

Submission status: Wrong Answer

Solution code:
N = input()
N = int(N)
str = input().split()
H = []
i = 0
j = 0
for i in range(N):
  H.append( int(str[i]) )
flag = 0
ans = 0
for i in range(N):
  for j in range(i):
    if H [i] < H[j]:
      flag = 1
    else:
      flag = 0
  if flag == 0:
    ans = ans+1

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=list(map(int,input().split()))
ans=1
for i in range(1,len(l)):
  if l[i]>=l[0] and l[i]>=l[i-1] and l[i]>=l[1]:
    ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=list(map(int,input().split()))
ans=1
for i in range(1,len(l)):
  if l[i]>=l[0] and l[i]>=l[i-1]:
    ans+=1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
lst = [int(x) for x in input().split()]

count = 1
for i in range(0,n-1):
  if(lst[i]<lst[i+1]):
    count+=1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int,input().split()))
count = 0
sum = 1
for i in range(1,n):
  for s in range(i-1,-1,-1):
    if h[i]>h[s]:
      count+=1
  if count==i:
       sum+=1
print(sum)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int,input().split()))
count = 0
sum = 1
for i in range(1,n):
  for s in range(i-1,-1,-1):
    if h[i]>h[s]:
      count+=1
  if count==n-1:
       sum+=1
print(sum)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int,input().split()))
count = 0
sum = 1
for i in range(1,n):
  for s in range(i-1,-1,-1):
    if h[i]>h[s]:
      count+=1
  if count==n:
       sum+=1
print(sum)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int,input().split()))
count = 0
sum = 1
for i in range(1,n):
  for s in range(i-1,0):
    if h[i]>h[s]:
      count+=1
  if count==n:
       sum+=1
print(sum)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int,input().split()))
count = 0
sum = 0
for i in range(1,n):
  for s in range(i-1,0):
    if h[i]>h[s]:
      count+=1
  if count==n:
       sum+=1
print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=input()
list1=[int(i) for i in input().split()]
list2=[x - list1[0] for (x) in list1] 
list3=[x - list1[0] for (x) in list1] 
list2.insert(0,0)
list3.append(0)
list4= [x - y for (x, y) in zip(list3,list2)]
print(len([i for i in list4 if i >=0]))

Submission status: Wrong Answer

Solution code:
N=input()
list1=[int(i) for i in input().split()]
list2=[x - list1[0] for (x) in list1] 
list3=[x - list1[0] for (x) in list1] 
list2.insert(0,list1[0])
list3.append(0)
list4= [x - y for (x, y) in zip(list3,list2)]
print(len([i for i in list4 if i >=0]))

Submission status: Wrong Answer

Solution code:
N=input()
list1=[int(i) for i in input().split()]
list2=[x - list1[0] for (x) in list1] 
list3=[x - list1[0] for (x) in list1] 
list2.insert(0,0)
list3.append(0)
list4= [x - y for (x, y) in zip(list2,list3)]
print(len([i for i in list4 if i > 0]))

Submission status: Wrong Answer

Solution code:
N=input()
list1=[int(i) for i in input().split()]
list2=[x - list1[0] for (x) in list1] 
list3=[x - list1[0] for (x) in list1] 
list2.insert(0,0)
list3.append(0)
list4= [x - y for (x, y) in zip(list2,list3)]
print(len([i for i in list4 if i > 0])+1)

Submission status: Wrong Answer

Solution code:
N=input()
list=[int(i) for i in input().split()]
replace=[0 if i < list[0] else i for i in list]
print(len([i for i in replace if i > 0]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int, input().split()))
ans = 1
highest = h.index(max(h))
h_c = h.count(max(h))
if h_c >= 1:
    h_c -= 1

for i in range(1, highest+1):
    if h[0] <= h[i] and h[i-1] <= h[i]:
        ans += 1

print(ans+h_c)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int, input().split()))
ans = 1

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

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split(" ")))
m = float('-inf')
count = 1
for i in range(N-2,-1,-1):
    m = max(m,A[i+1])
    if A[i]>=m: count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

k= 1
for i in range(1,N):
    if sorted(H[0:i])[-1]<H[i]:
        k=k+1
    else:
        k=k
print(k)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

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

if __name__ == '__main__':
    N = int(input())
    H = [int(h) for h in input().split()]
    
    main(N, H)

Submission status: Wrong Answer

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

count = 0

High = H[0]

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

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
x = 0
h = list(map(int, input().split()))

for i in range(n-1):
    if h[0] <= h[i] and h[i-1] <= h[i]:
        x += 1
print(x)

Submission status: Wrong Answer

Solution code:
n = int(input())
x = 0
h = list(map(int, input().split()))

for i in range(1,n):
    if h[0] <= h[i] and h[i-1] <= h[i]:
        x += 1
print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int, input().split()))
a = h
answer = 0
for i in range(n):
    if i == 0:
        answer += 1
        
    elif a[0] <= a[i] and a[1] <= a[i]:
        if a[i - 1] <= a[i]:
            answer += 1
            

print(answer)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int, input().split()))
a = h
answer = 0
for i in range(n):
    if i == 0:
        answer += 1
       
    elif a[0] <= a[i] or a[1] <= a[i]:
        if a[i - 1] <= a[i]:
            answer += 1
            

print(answer)

Submission status: Wrong Answer

Solution code:
def countInn(n, L):
  numInn = 1
  mainHurdle = L[0]
  hurdle = L[1]
  for i in range(1, n):
    currentH = L[i]
    if currentH >= mainHurdle and currentH >= hurdle:
      numInn += 1
      hurdle = currentH
    #if currentH < mainHurdle or currentH < hurdle:
     # continue
    #numInn += 1
    #hurdle = currentH
  print(numInn)
  
n = int(input())
a = list(map(int, input().split()))

Submission status: Wrong Answer

Solution code:
def countInn(n, L):
  numInn = 1
  mainHurdle = L[0]
  hurdle = L[1]
  for i in range(1, n):
    currentH = L[i]
    if currentH < mainHurdle or currentH < hurdle:
      continue
    numInn += 1
    hurdle = currentH
  print(numInn)
  
n = int(input())
a = list(map(int, input().split()))

Submission status: Wrong Answer

Solution code:
N = int(input())
num = input().split()

max = num[0]
count = 1

for i in range(N-1):
    if max <= num[i+1]:
        count += 1
        max = num[i+1]

print(count)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
n = int(input())
*h, = map(int, input().split())
ans = sum([1 if h[0]<=i else 0 for i in h])
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = list(map(int, input().split()))
cnt = [h[0]]
cnt += ([h[i + 1] for i in range(n-1) if h[0] <= h[i] if h[i+1] >= h[i]])
print(len(cnt))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input().rstrip().split(' ')

count = 1

for i in range(1,n):
  flag = True
  for j in range(0,i-1):
    if(s[j]>s[i]):
      flag = False
      break
  if(flag==True):
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input().rstrip().split(' ')

count = 1

for i in range(1,n):
  print(i)
  flag = True
  for j in range(0,i-1):
    if(s[j]>s[i]):
      flag = False
      break
  if(flag==True):
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input().rstrip().split(' ')

count = 1

for i in range(1,n):
  flag = True
  for j in range(0,i):
    if(s[j]<=s[i]):
      pass
    else:
      flag = False
  if(flag==True):
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input().rstrip().split(' ')

count = 1

for i in range(1,n):
  flag = True
  for j in range(0,i-1):
    if(s[j]<=s[i]):
      pass
    else:
      flag = False
  if(flag==True):
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input().rstrip().split(' ')

count = 1

for i in range(1,n):
  flag = True
  for j in range(0,i-1):
    if(s[j]<=s[i]):
      pass
    else:
      flag = False
      break
  if(flag==True):
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input().rstrip().split(' ')

count = 1

for i in range(1,n):
  flag = True
  for j in range(0,i):
    if(s[j]<=s[i]):
      pass
    else:
      flag = False
      break
  if(flag==True):
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
k = int(input())
l = list(map(int, input().split()))
for i in range(len(l)):
    if(l[i]==max(l)):
        ans = i
if(ans==0):
    print(1)
else:
    print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = input()
l = list(input().split())
 
cnt = 0
max_height = 0
for i in range(len(l)):
  if int(l[i]) > int(max_height):
    cnt +=1
    max_height = l[i]
    
print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
hl = list(map(int,input().split()))

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

print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
h_list = [int(i) for i in input().split()]
whole_list = [h_list[0:i] for i in range(1, n+1)]
count = sum(max(i) == whole_list[-1] for i in whole_list)
print(count)

Submission status: Wrong Answer

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

count = 0
max_h = 0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-

n = int(input())
h = input().split()
count = 0
flag = 0

for i in range(n):
    #print(i)
    for j in range(i):
        if h[i] < h[i-1-j]:
            #print("{} {}".format(h[i-j], h[i]))
            flag = 1
            break
    if flag == 0:
        count += 1
    else:
        flag = 0

print(count)

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-

n = int(input())
h = input().split()
count = 0

for i in range(n):
    flag = 0
    #print(i)
    for j in range(i):
        if h[i] < h[i-1-j]:
            #print("{} {}".format(h[i-j], h[i]))
            flag = 1
            break
    if flag == 0:
        count += 1

print(count)

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-

n = int(input())
h = input().split()
count = 0

for i in range(n):
    flag = 0
    for j in range(i):
        if h[i-1-j] <= h[i]:
            #print("{} {}".format(h[i-j], h[i]))
            pass
        else:
            flag = 1
            break
    if flag == 0:
        count += 1

print(count)

Submission status: Wrong Answer

Solution code:
h_list = map(int, input().split())
a = 0
b = 0
for h in h_list:
  if h <= b:
    b = h
    a += 1
print(a)

Submission status: Wrong Answer

Solution code:
h_list = map(int, input().split())
a = 0
b = 0
for h in h_list:
  if h >= b:
    b = h
    a += 1
print(a)

Submission status: Wrong Answer

Solution code:
h_list = list([int(input())])
a = 0
b = 0
for h in h_list:
  if h >= b:
    b = h
    a += 1
print(a)

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-

n = int(input())
h = input().split()
flag = 0
count = 0

for i in range(1, n+1):
    #print(i)
    flag = 0
    for j in range(1, i):
        if h[i-1-j] <= h[i-1]:
            pass
        else:
            flag = 1
    if flag == 0:
        count += 1

print(count)

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-

n = int(input())
h = input().split()
flag = 0
count = 0

for i in range(1, n+1):
    #print(i)
    for j in range(1, i):
        if h[i-1-j] <= h[i-1]:
            pass
        else:
            flag = 1
    if flag == 0:
        count += 1

print(count)

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-

n = int(input())
h = input().split()
flag = 0
count = 0

for i in range(1, n+1):
    print(i)
    for j in range(1, i):
        if h[i-1-j] <= h[i-1]:
            pass
        else:
            flag = 1
    if flag == 0:
        count += 1

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
lst = list(map(int,input().split()))

ans = 0
for i in range(N):
    flag = True
    for j in range(N-1):
        if lst[j] > lst[i]:
            flag = False 
    if flag:
        ans = ans + 1

print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
lst = list(map(int,input().split()))

ans = 0
for i in range(N):
    flag = True
    for j in range(N-1):
        if lst[j] > lst[i]:
            flag = False 
    if flag:
        ans = ans + 1

print(sum)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from sys import stdin

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

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

print(c)

Submission status: Wrong Answer

Solution code:
from sys import stdin

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

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

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

print(c)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

cansee = False
count = 0

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

print(count)

Submission status: Wrong Answer

Solution code:
N = int(input()) 
hotel = list(map(int, input().split())) #入力してint型リストに格納
view = 1

for i in range (1, N-1, 1):
    judge = 1
    for j in range (0, i, 1):
        if hotel[i] >= hotel[j]:
            pass #何もしない
        else:
            judge = 0
    if judge == 1:
        view += 1

print (view)

Submission status: Wrong Answer

Solution code:
# B - Great Ocean View
n = int(input())
heights = list(map(int, input().split()))
highest = heights[0]
hotels = 1
for i in heights[1:]:
	if i >= highest:
		hotels += 1
print(hotels)

Submission status: Wrong Answer

Solution code:
# ABC124B - Great Ocean View
n = int(input())
data = list(map(int, input().rstrip().split()))
count = 1

for i in range(1, n):
    print(count)
    if data[i] == max(data[:i + 1]):
        count += 1
    
print(count)

Submission status: Wrong Answer

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

can_view = [1]

for i in range(N):
    if i == 0:
        continue
    
    count = 0
    for j in range(i):
        if H[i] > H[j]:
            count += 1
    
    if count == i:
        can_view.append(i)

print(len(can_view))

Submission status: Wrong Answer

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

ans = 1
for i in range(0, N):
  for j in range(0, i):
    if H[i] < H[j]:
      break
    if  i == j:
      ans += 1
    
print (ans)

Submission status: Wrong Answer

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

ans = 0
for i in range(0, N):
  for j in range(0, i):
    if H[i] < H[j]:
      break
    if  i == j:
      ans += 1
    
print (ans)

Submission status: Wrong Answer

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