ZhenlongDai/ACPR huggingface dataset:
Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = list(map(int, input().split()))
cnt = 1
m = H[0]
for i in range(1, N):
    if m <= H[i] and H[i-1] <= H[i]:
        cnt += 1
        m = max(H[0], H[i])
    else:
        m = max(H[0], H[i])
print(cnt)

Failing test case input:
5
0 8 1 6 1

Expected output:
2


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
H = list(map(int, input().split()))
cnt = 1
m = H[0]
for i in range(1, N):
    if m <= H[i] and H[i-1] <= H[i]:
        cnt += 1
        m = max(H[0], H[i])

print(cnt)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = list(map(int, input().split()))
result = 1
 
for i in range(N):
    dec = True
    for j in range(i):
        if H[i] <= H[j]:
            dec = False
            break
    if dec == True:
        result += 1
print(result)

Failing test case input:
5
0 4 1 2 2

Expected output:
2


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
H = list(map(int, input().split()))
result = 1
 
for i in range(1, N):
    dec = True
    for j in range(i):
        if H[i] < H[j]:
            dec = False
            break
    if dec == True:
        result += 1
print(result)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
hight = input().split()
cnt = 1
max = hight[0]
for i in range(n-1):
    if max <= hight[i+1]:
        cnt = cnt +1
        max = hight[i+1]
    else:
         continue
    
print(cnt)

Failing test case input:
4
11 5 0 8

Expected output:
1


Actual output:
3


Fixed submission (verdict: Accepted):
n = int(input())
hight = list(map(int,input().split()))
cnt = 1
maxd = hight[0]

for i in range(n-1):
    if maxd <= hight[i+1]:
        cnt = cnt +1
        maxd = hight[i+1]
    else:
         continue
        
print(cnt)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
h = [int(i) for i in input().split()]
ans = 1
for i in range(n):
    if h[i-1] < h[i]:
        if h[0] == max(h):
            break
        ans += 1

print(ans)

Failing test case input:
5
0 0 0 7 2

Expected output:
4


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
h = [int(i) for i in input().split()]
ans = 1
for i in range(1, n):
    if max(h[:i]) <= h[i]:
        ans += 1

print(ans)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
h = list(map(int, input().split()))

ans = n
for i in range(n-1):
    if h[i] > h[i+1]:
        ans = i + 1
        break
print("\n")
print(ans)

Failing test case input:
5
0 1 0 7 2

Expected output:
3


Actual output:


2


Fixed submission (verdict: Accepted):
n = int(input())
h = list(map(int, input().split()))

ans = 0
mx = h[0]
for i in range(n):
    if h[i] >= mx:
        ans = ans + 1
        mx = h[i]
print(ans)
Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
h=list(map(int,input().split()))
h.insert(0,0)

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

Failing test case input:
4
9 2 0 9

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n=int(input())
h=list(map(int,input().split()))
h.insert(0,0)

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

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
H=list(map(int,input().split()))
ans=0
for i in range(1,N):
    for j in range(i-1):
        if H[i]>=H[j]:
            ans+=1
print(ans)

Failing test case input:
5
0 8 2 4 1

Expected output:
2


Actual output:
3


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

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = list(map(int, input().split()))
cnt = 1
m = H[0]
for i in range(1, N):
    if m <= H[i] and H[i-1] <= H[i]:
        cnt += 1
    else:
        m = max(H[0], H[i-1], H[i])
print(cnt)

Failing test case input:
5
0 4 1 2 2

Expected output:
2


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
H = list(map(int, input().split()))
cnt = 1
m = H[0]
for i in range(1, N):
    if m <= H[i] and H[i-1] <= H[i]:
        cnt += 1
        m = max(H[0], H[i])

print(cnt)

Problem: p03072
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
l = list(map(int, input().split()))

th = 0
ans = 0
for x in l:
  if x >= th:
    ans += 1
  th = x
print(ans)

Failing test case input:
5
4 4 3 3 4

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
N = int(input())
l = list(map(int, input().split()))

th = 0
ans = 0
for x in l:
  if x >= th:
    ans += 1
    th = x
print(ans)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
h = list(map(int, input().split()))

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

Failing test case input:
5
0 5 3 4 1

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
h = list(map(int, input().split()))

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

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = list(map(int, input().split()))
count = 0
max = 0
for i in range (N):
	if (max <= H[i]):
		count += 1
	max = H[i]
print(count)

Failing test case input:
5
9 4 4 0 6

Expected output:
1


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
H = list(map(int, input().split()))
count = 0
max = 0
for i in range (N):
	if (max <= H[i]):
		count += 1
		max = H[i]
print(count)
Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))

res = 0
for indexa, valuea in enumerate(a):
  for indexb, valueb in enumerate(a):
    if valuea < valueb and indexa != indexb:
      break
    if indexa == indexb:
      res += 1
    if indexa >= indexb:
      break

print(res)

Failing test case input:
5
2 5 3 4 8

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))

res = 0
for indexa, valuea in enumerate(a):
  for indexb, valueb in enumerate(a):
    if valuea < valueb and indexa != indexb:
      break
    if indexa == indexb:
      res += 1

print(res)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
5
2 5 3 4 8

Expected output:
3


Actual output:
8


Fixed submission (verdict: Accepted):
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)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
*q, = map(int,input().split())
ans = [q[0]]
for i in range(1,n):
  if q[i] >= q[i-1]:
    ans.append(q[i])
print(len(ans))
  

Failing test case input:
4
94 -1 -1 3

Expected output:
1


Actual output:
3


Fixed submission (verdict: Accepted):
n = int(input())
*q, = map(int,input().split())
ans = [q[0]]
mh = q[0]
for i in range(1,n):
  if q[i] >= mh:
    ans.append(q[i])
    mh = q[i]

print(len(ans))

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
h = list(map(int, input().split()))
ans = 1
tmp = h[0]
for i in range(1,n):
    if tmp <= h[i]:
          ans += 1
print(ans)

Failing test case input:
5
0 8 1 4 1

Expected output:
2


Actual output:
5


Fixed submission (verdict: Accepted):
n = int(input())
h = list(map(int, input().split()))
ans = 1
tmp = h[0]
for i in range(1,n):
    if tmp <= h[i]:
          ans += 1
          tmp = h[i]
print(ans)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = list(map(int,input().split()))
ans = 1
for i in range(1,N):
  for j in range(i+1,N):
    if H[i] > H[j]:
      break
    if j == N-1:
      ans +=1

print(ans)

Failing test case input:
5
9 4 4 1 4

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
H = list(map(int,input().split()))
ans = 1
for i in range(1,N):
  for j in range(i):
    if H[i] < H[j]:
      break
    if j == i-1:
      ans +=1

print(ans)
Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

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

print(ans)


Failing test case input:
5
0 5 3 4 1

Expected output:
2


Actual output:
3


Fixed submission (verdict: Accepted):

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

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

print(ans)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
if __name__ == "__main__":
    a = int(input())
    ryokan= input().split(" ")
    total=1
    for x in range(1,a):
        flag=True
        for y in range(x-1):
            if int(ryokan[x])<=int(ryokan[y]):
                flag=False
                break
        if flag:
            total+=1
                
    print(total)

Failing test case input:
5
4 4 3 2 4

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
if __name__ == "__main__":
    N = int(input())
    ryokan= input().split(" ")
    total=1
    for x in range(1,N):
        flag=True
        for y in range(x):
            if int(ryokan[x])<int(ryokan[y]):
                flag=False
                break
        if flag:
            total+=1
                
    print(total)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = list(map(int, input().split()))
cnt = 0

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

Failing test case input:
5
2 5 3 4 8

Expected output:
3


Actual output:
5


Fixed submission (verdict: Accepted):
N = int(input())
H = list(map(int, input().split()))
cnt = 1

for i in range(N):
  flg = False
  for j in range(0, i):
    if H[j] <= H[i]:
      flg = True
    else:
      flg = False
      break
  if flg == True:
    cnt += 1
        
print(cnt)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = list(map(int, input().split()))

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

Failing test case input:
5
0 3 1 4 2

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
H = list(map(int, input().split()))

ans = 1
if N > 1:
  for i in range(1, N):
    if H[i] >= max(H[:i]):
      ans += 1
print(ans)
Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
l = input().split()

result = 0





for i in range(len(l)):
    flg = 0

    if i == 0:
        result = 1
    else:
        for j in range(0, i):
            if l[i] < l[j]:
                flg = 1

        if flg == 0:
            result = result + 1

print(result)


Failing test case input:
5
4 4 3 3 2

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
N = input()
l = input().split()


result = 0

for i in range(len(l)):
    flg = 0

    if i == 0:
        result = 1
    else:
        for j in range(0, i):
            if int(l[i]) < int(l[j]):
                flg = 1

        if flg == 0:
            result = result + 1

if len(l) <= 20:
    print(result)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
5
1 1 -1 7 2

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
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)

Problem: p03072
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import math
import copy

inputa = input().split()
inputb = input().split()


a = int(inputa[0])














b = [int(n) for n in inputb]


sum = 1
for i in range(1, len(b)):
    if b[i] >= b[i-1]:
       sum += 1
    else:
        break

print(sum)




Failing test case input:
4
9 2 0 18

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
import math
import copy

inputa = input().split()
inputb = input().split()


a = int(inputa[0])














b = [int(n) for n in inputb]


sum = 0
for i in range(len(b)-1, -1, -1):
    flg = True
    for j in range(i):
            if b[j] > b[i]:
               flg = False
               break
    if flg == True:
        sum += 1

print(sum)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = list(map(int, input().split()))

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


Failing test case input:
5
4 4 8 2 4

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
N = int(input())
H = list(map(int, input().split()))

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

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
listNum = [int(x) for x in input().split()]
answer = []
answer.append(listNum[0])
for i in range(1,n):
    if(listNum[i-1] <= listNum[i]):
        answer.append(i)
print(len(answer))

Failing test case input:
4
11 2 0 8

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
listNum = [int(x) for x in input().split()]
cnt = 1
big = listNum[0]
for i in range(1,n):
	if(big <= listNum[i]):
		big = listNum[i]
		cnt+=1
print(cnt)
Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
m=list(map(int,input().split()))
ans=0

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

Failing test case input:
5
0 4 2 2 2

Expected output:
2


Actual output:
5


Fixed submission (verdict: Accepted):
n=int(input())
m=list(map(int,input().split()))
ans=1

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

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = map(int, input())
H = list(map(int, input().split()))
count = 1
for i in range(len(H) -1):
    if H[i] < H[i + 1]:
        count += 1
print(count)

Failing test case input:
4
18 0 -1 3

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
n = map(int, input())
H = list(map(int, input().split()))
count = 1
for i in range(1, len(H)):
    if max(H[:i]) <= H[i]:
        count += 1
print(count)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
H=list(map(int,input().split()))
H.append(0)

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


Failing test case input:
4
11 5 11 8

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
N=int(input())
H=list(map(int,input().split()))
H.append(0)
max1=H[0]

X=1
for i in range(N):
    if max1 <= H[i+1]:
        X+=1
        max1=H[i+1]
        
print(X)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = list(map(int, input().split()))

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

print(ans + 1)


Failing test case input:
5
4 4 8 2 4

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
N = int(input())
H = list(map(int, input().split()))

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

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
5
9 4 4 2 4

Expected output:
1


Actual output:
5


Fixed submission (verdict: Accepted):
n = int(input())
num_list = [ int(v) for v in input().split() ]
s = 0
for i in range(n):
  if max(num_list[:i+1]) <= num_list[i]:
    s += 1
print(s)

Problem: p03072
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
h = list(map(int,input().split()))
ans = 1

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

print(ans)

Failing test case input:
5
9 2 4 8 4

Expected output:
1


Actual output:
3


Fixed submission (verdict: Accepted):
n = int(input())
h = list(map(int,input().split()))
ans = 1
max_h = 0
for i in range(1,n):
    if h[0] <= h[i] and max_h <= h[i] and h[i] >= h[i-1]:
        ans += 1

    max_h = max(h[i],max_h)

print(ans)
Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
5
4 8 6 2 4

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
h = list(map(int, input().split()))
sum = 0
m = 0
for i in h:
    if m <= i:
        sum += 1
        m = i
print(sum)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
H=list(map(int,input().split()))
count=1
for i in range(N-1):
    for j in range(i):
        if H[i]<H[j]:
            break
        count+=1
print(count)

Failing test case input:
4
9 2 0 23

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
N=int(input())
H=list(map(int,input().split()))
count=0
flag=1
for i in range(N):
    flag=1
    for j in range(i):
        if H[i]<H[j]:
            flag=0
            break
    if flag==1:
        count+=1
print(count)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
h=list(map(int,input().split()))
a=h[0]
count=1
for i in range(1,len(h)):
    if h[i]>=a:
        count+=1
print(count)

Failing test case input:
5
2 5 3 4 8

Expected output:
3


Actual output:
5


Fixed submission (verdict: Accepted):
n=int(input())
h=list(map(int,input().split()))
a=h[0]
count=1
for i in range(1,len(h)):
    if h[i]>=a:
        count+=1
        a=h[i]
print(count)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin

H_list = stdin.readline().rstrip().split()
H_list_int = list(map(lambda x: int(x), H_list))  
print(H_list_int)

ables = 1
max = H_list_int.pop(0)

for i in H_list_int:
    if max <= i:
        ables += 1
        max = i

print(ables)

Failing test case input:
5
4 4 3 2 4

Expected output:
3


Actual output:
[5]
1


Fixed submission (verdict: Accepted):
from sys import stdin

N = stdin.readline().rstrip()
H_list = stdin.readline().rstrip().split()
H_list_int = list(map(lambda x: int(x), H_list))  

ables = 1
max = H_list_int.pop(0)

for i in H_list_int:
    if max <= i:
        ables += 1
        max = i

print(ables)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
l = []
n = int(input())
l = [int(i) for i in input().split()] 
ok = 0

print(l)
for i in range(1,n):
	for j in range(i):
		if l[i] >= l[j]:
			if i -1 == j:
				ok += 1
			
		else:
			break

print(ok + 1)

Failing test case input:
4
9 2 0 23

Expected output:
2


Actual output:
[9, 2, 0, 23]
2


Fixed submission (verdict: Accepted):
l = []
n = int(input())
l = [int(i) for i in input().split()] 
ok = 0

for i in range(1,n):
	for j in range(i):
		if l[i] >= l[j]:
			if i -1 == j:
				ok += 1
			
		else:
			break

print(ok + 1)
Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
h=list(map(int,input().split()))
cnt=1
for i in range(1,n):
	if h[i]>=h[0]:
		cnt+=1
print(cnt)

Failing test case input:
5
0 1 0 7 2

Expected output:
3


Actual output:
5


Fixed submission (verdict: Accepted):
n=int(input())
h=list(map(int,input().split()))
cnt=1
maxh=h[0]
for i in range(1,n):
	if maxh<=h[i]:
		maxh=h[i]
		cnt+=1
print(cnt)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
line_len = int(input())
s = input().rstrip().split(' ')
inns = []
ans = 1
total = 0
for i in range(line_len):
    inns.append(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)

Failing test case input:
4
11 2 0 8

Expected output:
1


Actual output:
3


Fixed submission (verdict: Accepted):
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)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    N = int(input())
    H = [int(n) for n in input().split()]

    counter = 0
    canView = False
    for i, h in enumerate(H):
        for j in range(i):
            if H[j] > h:
                canView = True
        if canView:
            counter += 1

    print(counter)


if __name__ == '__main__':
    main()


Failing test case input:
5
9 0 6 8 4

Expected output:
1


Actual output:
4


Fixed submission (verdict: Accepted):
def main():
    N = int(input())
    H = [int(n) for n in input().split()]

    counter = 0
    for i, h in enumerate(H):
        canView = True
        for j in range(i):
            if H[j] > h:
                canView = False
        if canView:
            counter += 1

    print(counter)


if __name__ == '__main__':
    main()

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
List=list(map(int,input().split()))
count=1
W=0
for i in range(1,N):
    for j in range(i):
        if List[j]>List[i]:
            W+=1
    if W==0:  
        count+=1
print(count)
   
    

Failing test case input:
5
1 5 3 2 8

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
N=int(input())
List=list(map(int,input().split()))
count=1

for i in range(1,N):
    W=0
    for j in range(i):
        if List[j]>List[i]:
            W+=1
    if W==0:  
        count+=1
print(count)
Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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
    


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

Failing test case input:
5
2 5 3 4 1

Expected output:
2


Actual output:
3


Fixed submission (verdict: Accepted):
def q39(n, h):
    count = 1
    for i in range(1, n):
        if h[i] >= max(h[:i]):
            count += 1
    return count


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

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
hotels = [int(i) for i in input().split()]
count = 0
max_height = 0
for i in range(len(hotels)):
    if i == 0:
        count += 1
        max_height = hotels[0]
    else:
        if hotels[i] > max_height:
            count += 1
            max_height = hotels[i]
print(count)


Failing test case input:
5
2 3 3 4 2

Expected output:
4


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
hotels = [int(i) for i in input().split()]
count = 0
max_height = 0
for i in range(len(hotels)):
    if i == 0:
        count += 1
        max_height = hotels[0]
    else:
        if hotels[i] >= max_height:
            count += 1
            max_height = hotels[i]
print(count)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
4
18 2 -1 3

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
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)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = input().split(" ")
count = 0
for i in range(N):
  if i == 0:
    nowTop = H[0]
    count += 1
  else:
    if nowTop <= H[i]:
      nowTop = H[i]
      count += 1
      
print(count)

Failing test case input:
4
18 0 -1 3

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
H = input().split(" ")
count = 0
for i in range(N):
  if i == 0:
    nowTop = H[0]
    count += 1
  else:
    if int(H[i]) >= int(nowTop):
      nowTop = H[i]
      count += 1
      
print(count)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
H = [s for s in input().split()]

HIEST = H[0]
COUNT = 0
for i in H:

    if i >= HIEST:
        HIEST = i
        COUNT = COUNT+1

print(COUNT)

Failing test case input:
4
11 5 11 8

Expected output:
2


Actual output:
3


Fixed submission (verdict: Accepted):
N = input()
H = [s for s in input().split()]
[int(x) for x in H]
HIEST = int(H[0])

COUNT = 0
for i in H:
	i = int(i)
	if i >= HIEST:
		HIEST = i
		COUNT = COUNT+1
print(COUNT)
Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
HList = [int(i) for i in input().split(" ")]
stn = HList[0]
count = 0

for i in range(len(HList)) :
    if i == 0 :
        count += 1
    elif HList[i] >= stn  :
        count += 1
        if stn > HList[i] :
            stn = HList[i]

print(count)

Failing test case input:
5
1 0 -1 9 2

Expected output:
2


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
HList = [int(i) for i in input().split(" ")]
stn = -1
count = 0

for i in range(len(HList)) :
    if HList[i] >= stn  :
        count += 1
    if stn < HList[i] :
        stn = HList[i]

print(count)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
4
34 0 -1 3

Expected output:
1


Actual output:
3


Fixed submission (verdict: Accepted):
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)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
l=list(map(int,input().split()))
tmp=l[0]
count=0
for i in range(n):
  if l[i]>=tmp:
    count+=1
print(count)

Failing test case input:
5
0 8 2 4 1

Expected output:
2


Actual output:
5


Fixed submission (verdict: Accepted):
n=int(input())
l=list(map(int,input().split()))
tmp=l[0]
count=0
for i in range(n):
  if l[i]>=tmp:
    count+=1
    tmp=l[i]
print(count)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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(n-2,-1,-1):
        if s[j] > s[i]:
            result = False
            break
    if result:
        cnt +=1
print(cnt)

Failing test case input:
5
3 3 6 2 0

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
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)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
5
9 -1 4 8 4

Expected output:
1


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
H = [int(i) for i in input().split()]
ans = 1
for i in range(1, N):
  for j in range(i):
    if H[j] > H[i]:
      break
  else:
    ans += 1
print(ans)
Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
5
4 4 3 2 4

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
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)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = list(input().split())
n = 1
for i in range(1, N):
    if H [i] == max(H[0:i+1]):
        n = n+1
print(n)

Failing test case input:
4
9 2 0 23

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
N = int(input())
H = list(input().split())
h = [int(s) for s in H]
n = 1
for i in range(1, N):
    if h[i] == max(h[0:i+1]):
        n = n+1
print(n)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H_li = list(map(int, input().split(' ')))

def check(H):
  H_max = max(H_li)
  max_indexs = ([i for i, x in enumerate(H_li) if x == H_max])

  if len(max_indexs) > 1:
    max_index = max(max_indexs)
    min_index = min(max_indexs)

    return min_index + len(max_indexs)

  else:
    return max_indexs[0] + 1


S = check(H_li)
 
print(S)


 

Failing test case input:
5
1 0 0 7 2

Expected output:
2


Actual output:
4


Fixed submission (verdict: Accepted):
N = int(input())
H_li = list(map(int, input().split(' ')))

def check(H):
  H_max = max(H_li)
  max_indexs = ([i for i, x in enumerate(H_li) if x == H_max])

  if len(max_indexs) > 1:
    max_index = max(max_indexs)
    return max_index
  else:
    return max_indexs[0]


max_index = check(H_li)

S = 0

for i in range(max_index):
  num = max_index - i
  try:
    if max(H_li[:num]) <= H_li[num]:
    	S += 1
  except:
    pass
    
print(S+1)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
h = list(map(int, input().split()))
print(h)
a = 1
flag = False
for j in range(1, n):
    for i in range(0, j):
        if h[i] <= h[j]:
            flag = True
        else:
            flag=False
            break
    if flag:
        a = a + 1

print(a)

Failing test case input:
5
0 5 1 4 1

Expected output:
2


Actual output:
[0, 5, 1, 4, 1]
2


Fixed submission (verdict: Accepted):
n = int(input())
h = list(map(int, input().split()))
a = 1
for j in range(1, n):
    flag=False
    for i in range(0, j):
        if h[i] <= h[j]:
            flag = True
        else:
            flag = False
            break
    if flag:
        a = a + 1

print(a)
Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
5
2 5 3 4 8

Expected output:
3


Actual output:
4


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

Problem: p03072
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import deque

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

ans = 0

h = 0

for i in range(n):
    h2 = H.popleft()
    if h2 > h:
        ans += 1
    h = h2

print(ans)

Failing test case input:
5
4 4 4 0 0

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
from collections import deque

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

ans = 0

h = 0

for i in range(n):
    h2 = H.popleft()
    if h2 >= h:
        ans += 1
    h = max(h, h2)

print(ans)

Problem: p03072
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
from sys import stdin

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

if N == 1:
    print(1)
    exit()

cnt = 1
if H_list[1] >= H_list[0]:
    cnt += 1

for i in range(2, N):
    if H_list[i] >= max(H_list[:i-1]):
        cnt += 1
if cnt > N:
    print(N)
else:
    print(cnt)


Failing test case input:
5
1 5 3 2 5

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
from sys import stdin

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

if N == 1:
    print(1)
    exit()

cnt = 1
if H_list[1] >= H_list[0]:
    cnt += 1

for i in range(2, N):
    if H_list[i] >= max(H_list[:i]):
        cnt += 1

print(cnt)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
now = a[0]
ans = 1
for i in a[1:]:
  if i >= now:
    ans += 1
  now = i
print(ans)


Failing test case input:
4
11 2 0 8

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
now = a[0]
ans = 1
for i in a[1:]:
  if i >= now:
    ans += 1
    now = i
print(ans)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

H = [int(i) for i in input().split()] 
counter = 0
standard = N

if H[0] < N:
  counter += 1

for i in H:
  if i >= standard:
    standard = i
    counter += 1
    
print(counter)

Failing test case input:
5
0 4 2 2 2

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
N = int(input())

H = [int(i) for i in input().split()] 
counter = 0
standard = 0

for i in H:
  if i >= standard:
    standard = i
    counter += 1
    
print(counter)
Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = list(map(int, input().split()))
count = 0
for i in range(1, N):
    for j in range(0, i-1):
        if H[j] > H[i]:
            break
        count += 1
if count == 0:
    print(1)
else:
    print(count)

Failing test case input:
5
4 4 4 0 0

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
N = int(input())
H = list(map(int, input().split()))
count = 1

for i in range(1, N):
    f = True
    for j in range(0, i):
        if H[j] > H[i]:
            f = False
            break
    if f:
        count += 1
print(count)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
5
9 0 6 8 4

Expected output:
1


Actual output:
4


Fixed submission (verdict: Accepted):
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)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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) 

Failing test case input:
5
2 5 3 4 8

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
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] :
    b = a[c]
    ans += 1
print(ans + 1)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
h = list(map(int,input().split()))
a=[h[i+1] for i in range(n-1) if h[i] >= max(h[i:])]
print(len([i for i in a])+1)

Failing test case input:
4
20 0 0 3

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
h = list(map(int,input().split()))
print(len([h[i] for i in range(n) if h[i] >= max(h[:i+1])]))

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = list(map(int, input().split()))
c=0
for i in H:
  if H[0] <= i:
    c += 1
print(c)

Failing test case input:
5
2 3 3 4 2

Expected output:
4


Actual output:
5


Fixed submission (verdict: Accepted):
N = int(input())
H = list(map(int, input().split()))
c=0
for i in range(N):
  l=H[:i+1]
  if max(l) == H[i]:
    c += 1
print(c)
Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
l = input().split()

result = 0

for i in range(len(l)):
    flg = 0

    if i == 0:
        result = 1
    else:
        for j in range(0, i):
            if l[i] < l[j]:
                flg = 1

        if flg == 0:
            result = result + 1

print(result)


Failing test case input:
5
4 5 3 5 4

Expected output:
3

Actual output:
1


Fixed submission (verdict: Accepted):
N = input()
l = input().split()


result = 0

for i in range(len(l)):
    flg = 0

    if i == 0:
        result = 1
    else:
        for j in range(0, i):
            if int(l[i]) < int(l[j]):
                flg = 1

        if flg == 0:
            result = result + 1

if len(l) <= 20:
    print(result)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
arr = input().split()
num = 1
tmp = arr[0]

for i in range(N-1):
	if arr[i+1] >= tmp:
		num += 1
		tmp = arr[i+1]

print(num)


Failing test case input:
4
12 5 11 8

Expected output:
1


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
arr = input().split()
num = 0
tmp = 0

for i in range(N):
	if int(arr[i]) >= tmp:
		num += 1
		tmp = int(arr[i])

print(num)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
count = 0
total = 0
H = []
s = input().split()

for i in range(N):
  H.append(int(s[i]))
  for j in range(i):
    if(H[i] >= H[j]):
      count = count + 1
  if(count == i):
    count = 0
    total = total + 1
    
print(total)

Failing test case input:
4
94 -1 -1 3

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
count = 0
total = 0
H = []
s = input().split()

for i in range(N):
  H.append(int(s[i]))
  for j in range(i):
    if(H[i] >= H[j]):
      count = count + 1
  if(count == i):
    count = 0
    total = total + 1
  count = 0
    
print(total)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    n = input()
    s = input()
    raw_list = s.split()

    max = raw_list[0]
    count = 1

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

if __name__ == "__main__":
    main()

Failing test case input:
4
9 2 0 15

Expected output:
2


Actual output:
1


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

    max = raw_list[0]
    count = 1

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

if __name__ == "__main__":
    main()
Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
hotels = [int(i) for i in input().split()]
count = 0
max_height = 0
for i in range(len(hotels)):
    if i == 0:
        count += 1
        max_height = hotels[0]
    else:
        if hotels[i] > max_height:
            count += 1
            max_height = hotels[0]
print(count)


Failing test case input:
5
0 4 2 2 2

Expected output:
2


Actual output:
5


Fixed submission (verdict: Accepted):
N = int(input())
hotels = [int(i) for i in input().split()]
count = 0
max_height = 0
for i in range(len(hotels)):
    if i == 0:
        count += 1
        max_height = hotels[0]
    else:
        if hotels[i] >= max_height:
            count += 1
            max_height = hotels[i]
print(count)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
h = list(map(int, input().split()))
sea = []
mountain = h[0]
for i in range(n):
    if i == 0:
        sea.append(h[0])
    else:
        if h[i] >= mountain and h[i] >= h[0]:
            sea.append(h[i])
        mountain = h[i]
print(len(sea))

Failing test case input:
5
4 2 8 2 4

Expected output:
2


Actual output:
3


Fixed submission (verdict: Accepted):
n = int(input())
h = list(map(int, input().split()))
sea = []
mountain = h[0]
for i in range(n):
    if i == 0:
        sea.append(h[0])
    else:
        if h[i] >= mountain and h[i] >= h[0]:
            mountain = h[i]
            sea.append(h[i])
        
print(len(sea))

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

n=int(input())
lis=list(map(int,input().split()))
ans=0
s=lis.pop(0)

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



print(ans+1)


Failing test case input:
5
0 8 2 6 1

Expected output:
2


Actual output:
3


Fixed submission (verdict: Accepted):

n=int(input())
lis=list(map(int,input().split()))
ans=0


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

print(ans+1)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
input = sys.stdin.readline




def main():
	N = int(input())
	H = input().split(" ")

	ans = 0
	max = 0
	for i, val in enumerate(H):
		if i == 0:
			ans += 1
			max = val
			continue
		if max < val:
			max = val
		if max <= H[i]:
			ans += 1

	print(ans)
	print()



	
	
if __name__ == "__main__":
	main()
	

Failing test case input:
4
18 2 0 23

Expected output:
2


Actual output:
3



Fixed submission (verdict: Accepted):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
input = sys.stdin.readline




def main():
	N = int(input())
	H = input().split(" ")
	H = [int(s) for s in H]
	

		



 
	ans = 0
	max = 0
	for i, val in enumerate(H):
		if i == 0:
			ans += 1
			max = val
			continue
		if max <= val:
			max = val
			ans += 1
			
 
	print(ans)

	
	
if __name__ == "__main__":
	main()
Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = list(map(int, input().split()))
cnt = 1

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

Failing test case input:
4
12 5 11 8

Expected output:
1


Actual output:
2



Fixed submission (verdict: Accepted):
N = int(input())
H = list(map(int, input().split()))
cnt = 1
min = H[0]

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

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
h = list(map(int,input().split()))
ans = 1
for i in range(1,n):
    if h[0] <= h[i]:
        ans += 1
print(ans)   

Failing test case input:
5
4 8 6 2 4

Expected output:
2


Actual output:
4


Fixed submission (verdict: Accepted):
n = int(input())
hs = list(map(int,input().split()))
ans = 0
m = 0
for h in hs:
  if m <= h:
    ans += 1
  m = max(m, h)
 
print(ans)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
H=[int(i) for i in input().split()]
result=0
for h in H:
    if h>=H[0]:
        result+=1
print(result)

Failing test case input:
5
4 8 6 2 4

Expected output:
2


Actual output:
4


Fixed submission (verdict: Accepted):
N=int(input())
H=[int(i) for i in input().split()]
result=0
hmax=H[0]
for i in range(N):
    hmax=max(hmax,H[i])
    if H[i]>=hmax:
        result+=1
print(result)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
mount_count = input()
mount_heights = input()
mount_heights_list = mount_heights.split()
count = 0
max_height = int(mount_heights_list[0])
for mount_height in mount_heights_list:
    if max_height <= int(mount_height):
        count += 1
print(count)

Failing test case input:
5
4 4 6 2 4

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
mount_count = input()
mount_heights = input()
mount_heights_list = mount_heights.split()
count = 0
max_height = int(mount_heights_list[0])
for mount_height in mount_heights_list:
    if max_height <= int(mount_height):
        max_height = int(mount_height)
        count += 1
print(count)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
5
0 4 1 2 2

Expected output:
2


Actual output:
[0, 4] 4
[0, 4, 1] 1
[0, 4, 1, 2] 2
[0, 4, 1, 2, 2] 2
2


Fixed submission (verdict: Accepted):
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)
Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
5
4 8 6 2 4

Expected output:
2


Actual output:
8


Fixed submission (verdict: Accepted):
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)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
5
4 4 3 3 4

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
4
6 5 11 8

Expected output:
2


Actual output:
4
4
4
4
2


Fixed submission (verdict: Accepted):
N = int(input())
H = list(map(int,input().split()))
saidai = 0
cnt = 0

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

print(cnt)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = list(map(int, input().split()))
result = 1
 
for i in range(N):
    dec = True
    for j in range(i-1):
        if H[i] <= H[j]:
            dec = False
            break
    if dec == True:
        result += 1
print(result)

Failing test case input:
5
4 4 3 0 2

Expected output:
2


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
H = list(map(int, input().split()))
result = 1
 
for i in range(1, N):
    dec = True
    for j in range(i):
        if H[i] < H[j]:
            dec = False
            break
    if dec == True:
        result += 1
print(result)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
Hs = input().strip().split(' ')
ans = 0;
H = 0;
for i in Hs:
  i = int(i)
  if (i >= H):
  	ans += 1
  H = max(H, i)

print(ans)

Failing test case input:
5
2 3 3 4 8

Expected output:
5


Actual output:
1


Fixed submission (verdict: Accepted):
N = input()
Hs = input().strip().split(' ')
ans = 0;
H = 0;
for i in Hs:
  i = int(i)
  if (i >= H):
  	ans += 1
  H = max(H, i)

print(ans)

Problem: p03072
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
5
4 4 3 2 4

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
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)