ZhenlongDai/ACPR huggingface dataset:
Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
w = input()
duplex = set(w)
before_w = ''
diff = 0
for i in duplex:
    before_w = w.replace(i, '')
    diff = diff + (len(w) - len(before_w))
    w = before_w

if diff % 2 == 0:
    print('Yes')
else:
    print('No')


Failing test case input:
a`_cd^ad

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
w = input()
duplex = set(w)
before_w = ''
result = 'Yes'
diff = 0
for i in duplex:
    before_w = w.replace(i, '')
    diff = diff + (len(w) - len(before_w))
    w = before_w
    if diff % 2 == 0:
        pass
    else:
        result = 'No'
        break

print(result)

Problem: p04012
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

w = l()

cnt = 0
w.sort()
for i in range(len(w) - 1):
	print(cnt)
	if w[i] == w[i+1]:
		cnt += 1
		if  i == len(w) - 2:
			print("No")
			exit()
	elif w[i] != w[i+1]:
		if cnt%2 == 0:
			print("No")
			exit()
		cnt = 0
	
print("Yes")

Failing test case input:
daac`c^`

Expected output:
No


Actual output:
0
No


Fixed submission (verdict: Accepted):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

w = l()

cnt = 0
w.sort()
if len(w) == 1:
	print("No")
else:
	for i in range(len(w) - 1 ):
		if w[i] == w[i+1]:
			cnt += 1
			if  cnt%2 == 0 and i == len(w) - 2:
				print("No")
				exit()
		elif w[i] != w[i+1]:
			if cnt%2 == 0:
				print("No")
				exit()
			cnt = 0
	print("Yes")

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

s=input()
moji=dict()
flag=True
for i in range(len(s)):
    if i not in moji:
        moji[i]=1
    else:
        moji[i]+=1
for i in moji.values():
    if i%2==1:
        flag=False
        break
print("Yes" if flag else "No")

Failing test case input:
abaccaba

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):

s=input()
moji=dict()
flag=True
for i in s:
    if i not in moji:
        moji[i]=1
    else:
        moji[i]+=1

for i in moji.values():
    if i%2==1:
        flag=False
        break
print("Yes" if flag else "No")

Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
w = list(input())
for i in w:
  if w.count(i) %2 == 1:
    print("No")
    break
print("Yes")
  


Failing test case input:
a``cc_ad

Expected output:
No


Actual output:
No
Yes


Fixed submission (verdict: Accepted):
import sys
w = list(input())
for i in w:
  if w.count(i) %2 == 1:
    print("No")
    sys.exit()
print("Yes")
Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    w = input()

    for o in range(ord('a'), ord('z')+1):
        c = chr(o)
        if w.count(c) % 2 == 1:
            print("NO")
            return

    print("YES")


if __name__ == '__main__':
    main()


Failing test case input:
hthtg

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
def main():
    w = input()

    for o in range(ord('a'), ord('z')+1):
        c = chr(o)
        if w.count(c) % 2 == 1:
            print("No")
            return

    print("Yes")


if __name__ == '__main__':
    main()

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



w = input()

english = {}

for ch in w:
    if ch in english:
        english[ch] += 1
    else:
        english[ch] = 1

beautiful = True
for value in english.values():
    if value%2 == 1:
        beautiful = False

if beautiful:
    print("YES")
else:
    print("NO")


Failing test case input:
rjkti

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):



w = input()

english = {}

for ch in w:
    if ch in english:
        english[ch] += 1
    else:
        english[ch] = 1

beautiful = True
for value in english.values():
    if value%2 == 1:
        beautiful = False

if beautiful:
    print("Yes")
else:
    print("No")

Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter

w = input()

char_counter = Counter()

for c in w:
  char_counter[c] += 1
  
print(char_counter)

is_beautiful = "Yes"
for c in char_counter.most_common():
  if c[1] % 2 == 1:
    is_beautiful = "No"

print(is_beautiful)

Failing test case input:
daac`c^`

Expected output:
No


Actual output:
Counter({'a': 2, 'c': 2, '`': 2, 'd': 1, '^': 1})
No


Fixed submission (verdict: Accepted):
from collections import Counter
 
w = input()
 
char_counter = Counter()
 
for c in w:
  char_counter[c] += 1
 
is_beautiful = "Yes"
for c in char_counter.most_common():
  if c[1] % 2 == 1:
    is_beautiful = "No"
 
print(is_beautiful)

Problem: p04012
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
d = {}
for letter in s:
  if letter in d:
    d[letter] += 1
  else:
    d[letter] = 1
flag = 1
for key in d:
  if d[key] % 2 != 0:
    print("No")
    flag = 0
if(flag == 1):
	print("Yes")


Failing test case input:
hgsti

Expected output:
No


Actual output:
No
No
No
No
No


Fixed submission (verdict: Accepted):
s = input()
d = {}
for letter in s:
  if letter in d:
    d[letter] += 1
  else:
    d[letter] = 1
flag = 1
for key in d:
  if d[key] % 2 != 0:
   
    flag = 0
if(flag == 1):
	print("Yes")
else:
	print("No")
Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
ec = 0
c = {}
for each in S:
    try:
        c[each] += 1
        if c[each] % 2 == 0:
            ec -= 1
        else:
            ec += 1
    except:
        c[each] = 1
        ec += 1
if (ec == 0):
    print("YES")
else:
    print("NO")


Failing test case input:
__bdc`ac

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
S = input()
ec = 0
c = {}
for each in S:
    try:
        c[each] += 1
        if c[each] % 2 == 0:
            ec -= 1
        else:
            ec += 1
    except:
        c[each] = 1
        ec += 1
if (ec == 0):
    print("Yes")
else:
    print("No")

Problem: p04012
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

w = l()

cnt = 0
w.sort()
for i in range(len(w) - 1):
	if w[i] == w[i+1]:
		cnt += 1
		if  i == len(w) - 2:
			print("No")
			exit()
	elif w[i] != w[i+1]:
		if cnt%2 == 0:
			print("No")
			exit()
		cnt = 0
	
print("Yes")

Failing test case input:
ab`cc`ba

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

w = l()

cnt = 0
w.sort()
if len(w) == 1:
	print("No")
else:
	for i in range(len(w) - 1 ):
		if w[i] == w[i+1]:
			cnt += 1
			if  cnt%2 == 0 and i == len(w) - 2:
				print("No")
				exit()
		elif w[i] != w[i+1]:
			if cnt%2 == 0:
				print("No")
				exit()
			cnt = 0
	print("Yes")

Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
w = input()

for i in range(len(w)):
    count = 0
    for j in range(len(w)):
        if w[i] == w[j]:
            count = count + 1
            print(count)
    if count%2 == 1:
        print('No')
        break
    
    
if i == len(w):
    print('Yes')

Failing test case input:
hgtuh

Expected output:
No


Actual output:
1
2
1
No


Fixed submission (verdict: Accepted):
w = input()

if len(w)%2 == 1:
    print('No')
else:
    count = 0
    for i in range(len(w)):
        if w.count(w[i])%2 == 1:
            print('No')
            count = count + 1
            break
        else:
            continue
        
    if count == 0:
        print('Yes')

Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
w = str(input())

for i in range(len(w)):
    if w.count(w[i]) % 2 ==0:
        print('Yes')
    else:
        print('No')


Failing test case input:
hgsth

Expected output:
No


Actual output:
Yes
No
No
No
Yes


Fixed submission (verdict: Accepted):
w = str(input())
count = int()

for i in range(len(w)):
    if w.count(w[i]) % 2 == 0:
        count += 1

if count == len(w):
    print('Yes')
else:
    print('No')
Problem: p04012
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
w = list(map(str,input()))
flg = 0
w.sort()
if len(w) % 2 == 1:
    flg == 1

else:
    for i in range(0, len(w)-1, 2):
        if w[i] != w[i+1]:
            flg += 1
            break

if flg == 1:
    print('No')
else:
    print('Yes')


Failing test case input:
rjkit

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
w = list(map(str, input()))
flg = 0
w.sort()
if len(w) % 2 == 1:
    flg += 1

else:
    for i in range(0, len(w)-1, 2):
        if w[i] != w[i+1]:
            flg += 1
            break

if flg == 1:
    print('No')
else:
    print('Yes')

Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections

s = input()
cnt = collections.Counter()

for i in s:
    cnt[i] += 1


if all([True if i % 2 == 0 else False for i in cnt.values()]):
    print("YES")
else:
    print("NO")
    

Failing test case input:
ab`ccaba

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
import collections

s = input()
cnt = collections.Counter()

for i in s:
    cnt[i] += 1


if all([True if i % 2 == 0 else False for i in cnt.values()]):
    print("Yes")
else:
    print("No")

Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
w = input()
f = [False]*26

for c in w:
    f[ord(c)-ord('a')] = not f[ord(c)-ord('a')]
for b in f:
    if f:
        print("Yes")
        break
else:
    print("No")


Failing test case input:
kjtjr

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
w = input()
f = [False]*26

for c in w:
    f[ord(c)-ord('a')] = not f[ord(c)-ord('a')]
for b in f:
    if b:
        print("No")
        break
else:
    print("Yes")

Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter

w = input()

char_counter = Counter()

for c in w:
  char_counter[c] += 1
  
print(char_counter)

is_beautiful = "YES"
for c in char_counter.most_common():
  if c[1] % 2 == 1:
    is_beautiful = "NO"

print(is_beautiful)

Failing test case input:
__bdc`ac

Expected output:
No


Actual output:
Counter({'_': 2, 'c': 2, 'b': 1, 'd': 1, '`': 1, 'a': 1})
NO


Fixed submission (verdict: Accepted):
from collections import Counter
 
w = input()
 
char_counter = Counter()
 
for c in w:
  char_counter[c] += 1
 
is_beautiful = "Yes"
for c in char_counter.most_common():
  if c[1] % 2 == 1:
    is_beautiful = "No"
 
print(is_beautiful)
Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
s_list = [s[_] for _ in range(len(s))]

dic = dict()
for c in s_list:
  if c in dic:
    dic[c] += 1
  else:
    dic[c] = 1

flg = True
for key in dic:
  if dic[key] != 2:
    flg = False
    
if flg:
  print('Yes')
else:
  print('No')
  
  

Failing test case input:
abaccaba

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
s = input()
s_list = [s[_] for _ in range(len(s))]

dic = dict()
for c in s_list:
  if c in dic:
    dic[c] += 1
  else:
    dic[c] = 1

flg = True
for key in dic:
  if dic[key]%2 != 0:
    flg = False
    break
    
if flg:
  print('Yes')
else:
  print('No')

Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    w = input()
    judge = 0
    for i in w:
        if w.count(i) %2 ==0:
            judge = "yes"
        else:
            judge = "No"
    print(judge)
main()


Failing test case input:
`a_cd^ad

Expected output:
No


Actual output:
yes


Fixed submission (verdict: Accepted):
def main2():
    w = input()
    judge = "Yes"
    for i in w:
        if w.count(i) % 2 != 0:
            judge = "No"
    print(judge)

main2()

Problem: p04012
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
str_line = input()
str_line = list(str_line)
str_line.sort()

temp = 0
stnum_list = []

for i in range(1,len(str_line)-1):
    if str_line[i] == str_line[i-1]:
        temp += 1
        
    else:
        stnum_list.append(temp)
        temp = 0
        
rsult = 1        
for i in range(len(stnum_list)):
    rsult *= stnum_list[i]

if rsult%2 == 1:
    print("YES")
else:
    print("NO")

Failing test case input:
da^dc_`a

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
str_line = input()
str_line = list(str_line)
str_line.sort()

temp = 0
stnum_list = []

for i in range(1,len(str_line)-1):
    if str_line[i] == str_line[i-1]:
        temp += 1
        
    else:
        stnum_list.append(temp)
        temp = 0
        

rsult = 1


if len(str_line) == 1:
    rsult = 0
else:
    for i in range(len(stnum_list)):
        rsult *= stnum_list[i]

if rsult%2 == 1:
    print("Yes")
else:
    print("No")

Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
w=input()
c=Counter(w)
a=0
c=list(c.values())
for i in range(len(c)):
    a+=c[i]
if a%2==0:
    print("Yes")
else:
    print("No")

Failing test case input:
`^c_daad

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
from collections import Counter
w=input()
c=Counter(w)
a=0
c=list(c.values())
for i in range(len(c)):
    if c[i]%2!=0:
        print("No")
        exit()
print("Yes")
Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
w = input()

def is_beutifull_str(char_str):
    for s in w:
        if w.count(s)%2 == 1:
            return 'NO'
    return 'YES'

print (is_beutifull_str(w))

Failing test case input:
tikjr

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
w = input()

def is_beutifull_str(char_str):
    for s in w:
        if w.count(s)%2 == 1:
            return 'No'
    return 'Yes'

print (is_beutifull_str(w))

Problem: p04012
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
w = str(input())
List = [w[i] for i in range(len(w))]
lis = sorted(List)

uni = list(set(lis))

ans = []
q = 0
for i in range(len(uni)):
    p = lis.count(uni[i])
    ans.append(p)
for j in range(len(ans)):
    q += ans[j]%2
if q == 0:
    print("YES")
else:
  print("NO")


Failing test case input:
`ac_db^c

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
w = str(input())
List = [w[i] for i in range(len(w))]
lis = sorted(List)

uni = list(set(lis))

ans = []
q = 0
for i in range(len(uni)):
    p = lis.count(uni[i])
    ans.append(p)
for j in range(len(ans)):
    q += ans[j]%2
if q == 0:
    print("Yes")
else:
  print("No")

Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
w = input()

w_set = set( w )

for each_ch in w_set:
	if w.count( each_ch ) % 2 == 1:
		print( "NO" )
		exit()

print( "YES" )

Failing test case input:
`ac_d^ad

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
w = input()
w_set = set( w )
for each_ch in w_set:
	if w.count( each_ch ) % 2 == 1:
		print( "No" )
		exit()

print( "Yes" )

Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
w = input()

for i in range(len(w)):
    count = 0
    for j in range(len(w)):
        if w[i] == w[j]:
            count = count + 1
    if count%2 == 1:
        print('No')
        break
        
if i+1 == len(w):
    print('Yes')


Failing test case input:
jrrji

Expected output:
No


Actual output:
No
Yes


Fixed submission (verdict: Accepted):
w = input()

if len(w)%2 == 1:
    print('No')
else:
    count = 0
    for i in range(len(w)):
        if w.count(w[i])%2 == 1:
            print('No')
            count = count + 1
            break
        else:
            continue
        
    if count == 0:
        print('Yes')

Problem: p04012
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
w = input()
wl = list(w)
wu = list(set(wl))
wu_len  = len(wu)
counter = 0
for wo in wu:
  if wl.count(wo) % 2 == 0:
    counter+=1
  else:
    print("No")
    break
if counter == int(wu_len):
  print("Yes")
else:
  print("No")

Failing test case input:
`ac_cb^d

Expected output:
No


Actual output:
No
No


Fixed submission (verdict: Accepted):
w = input()
wl = list(w)
wu = list(set(wl))
wu_len  = len(wu)
counter = 0
for wo in wu:
  if wl.count(wo) % 2 == 0:
    counter+=1
  else:
    break
if counter == int(wu_len):
  print("Yes")
else:
  print("No")
Problem: p04012
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
flag=True
a=list(input())
a.sort
while len(a)>0 and flag:
    n=a.count(a[0])
    if n%2==0:
        a=a[n:]
    else:
        flag=False
if flag:
    print("Yes")
else:
    print("No")    

Failing test case input:
abaccaba

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
flag=True
a=list(input())
a=sorted(a)
while len(a)>0 and flag:
    n=a.count(a[0])
    if n%2==0:
        a=a[n:]
    else:
        flag=False
if flag:
    print("Yes")
else:
    print("No")

Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import re

list = input()
list_set = set(list)
for set_string in list_set:
    cheak = re.findall(set_string, list)
    if len(cheak) % 2 ==0:
        continue
    else:
        print('No')
        exit()
print('YES')


Failing test case input:
ab`cc`ba

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
import re

list = input()
list_set = set(list)
for set_string in list_set:
    cheak = re.findall(set_string, list)
    if len(cheak) % 2 ==0:
        continue
    else:
        print('No')
        exit()
print('Yes')

Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(input())
ans = "Yes"
for i in range(len(a)):
  if a.count(a[i])%2==1:
    print("No")
    break
print(ans)

Failing test case input:
hrktk

Expected output:
No


Actual output:
No
Yes


Fixed submission (verdict: Accepted):
a = list(input())
ans = "Yes"
for i in range(len(a)):
  if a.count(a[i])%2==1:
    ans = "No"
    break
print(ans)

Problem: p04012
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
w = input()
while len(w) > 0:
    a = w[0]
    if w.count(a)%2 != 0:
        print("No")
        exit()
    w = w.replace(a,"")
    print(w)
print("Yes")


Failing test case input:
`b_cc`ca

Expected output:
No


Actual output:
b_ccca
No


Fixed submission (verdict: Accepted):
w = input()
while len(w) > 0:
    a = w[0]
    if w.count(a)%2 != 0:
        print("No")
        exit()
    w = w.replace(a,"")
print("Yes")

Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
w = input()

w_set = set( w )

print( w_set )

for each_ch in w_set:
	if w.count( each_ch ) % 2 == 1:
		print( "No" )
		exit()

print( "Yes" )

Failing test case input:
hgtth

Expected output:
No


Actual output:
{'h', 't', 'g'}
No


Fixed submission (verdict: Accepted):
w = input()
w_set = set( w )
for each_ch in w_set:
	if w.count( each_ch ) % 2 == 1:
		print( "No" )
		exit()

print( "Yes" )

Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
w = list(input())
s = set(w)
s = list(s)
ans = 'Yes'

for i in range(len(s)):
  if w.count(s[0]) % 2 == 1:
    ans = 'No'
    break

print(ans)


Failing test case input:
kqhtk

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
w = list(input())
s = set(w)
s = list(s)
ans = 'Yes'

for i in range(len(s)):
  if w.count(s[i]) % 2 == 1:
    ans = 'No'
    break

print(ans)
Problem: p04012
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

import sys
input = sys.stdin.readline
w = input()
w_set = set(w)
for i in w_set:
  if list(w).count(i)%2==1:
    print("No")
    sys.exit()
  else:
    continue
print("Yes")

Failing test case input:
abaccaba

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):

import sys

w = list(input())
w_set = set(w)
for i in w_set:
  if w.count(i)%2==1:
    print("No")
    sys.exit()
  else:
    continue
print("Yes")

Problem: p04012
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
cnt = 0
for i in s:
    if s.count(i) % 2 == 0:
        cnt += 1
    
    else:
        print("No")
if cnt == len(s):
    print("Yes")
else:
    print("No")
        
        

Failing test case input:
ab`ccaba

Expected output:
No


Actual output:
No
No
No
No
No


Fixed submission (verdict: Accepted):
s = input()
cnt = 0
for i in s:
    if s.count(i) % 2 == 0:
        cnt += 1
    
    else:
        pass
if cnt == len(s):
    print("Yes")
else:
    print("No")
Problem: p02923
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
h=[int(i) for i in input().split()]
r=0
k=0
for i in range(n-1):
  if h[i+1]>=h[i]:
    k+=1
  else:
    r=max(k,r)
    k=0
print(r)

Failing test case input:
7
7 4 3 6 6 5 5

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
n=int(input())
h=[int(i) for i in input().split()]
r=0
k=0
for i in range(n-1):
  if h[i+1]<=h[i]:
    k+=1
  else:
    r=max(k,r)
    k=0
r=max(k,r)
print(r)

Problem: p02923
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):
    cnt = 0
    now = H[i]
    for j in H[i+1:]:
        if now >= j:
            now = j
            cnt += 1

    ans = max(cnt, ans)

print(ans)


Failing test case input:
7
20 7 0 0 3 -1 2

Expected output:
3


Actual output:
4


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

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

h_cnt = 0
for i in cnt:
    if i == 1:
        h_cnt += 1
    else:
        ans = max(ans, h_cnt)
        h_cnt = 0

print(ans)

Problem: p02923
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
h = list(map(int, input().split()))
l = []
cnt = 0
ans = 0
for i in reversed(range(1, n)):
  if h[i]<=h[i-1]:
    cnt += 1
  else:
    l.append(cnt)
    cnt = 0
if len(l)!=0: ans = max(l)
print(ans)

Failing test case input:
7
20 7 -1 1 3 -2 2

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
h = list(map(int, input().split()))
l = []
cnt = 0
ans = 0
for i in reversed(range(1, n)):
  if h[i]<=h[i-1]:
    cnt += 1
  else:
    l.append(cnt)
    cnt = 0
  if i==1:
    l.append(cnt)

if len(l)!=0: ans = max(l)
print(ans)

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

for i in reversed(range(N)):
  minicounter = 0
  for j in range(N-i-1):
    if H[i] >=H[i+1]:
      minicounter +=1
    else:
      break
  if minicounter > counter:
    counter = minicounter

print(counter/2)

Failing test case input:
7
7 3 8 6 6 5 8

Expected output:
3


Actual output:
3.0


Fixed submission (verdict: Accepted):
N = int(input())
H = list(map(int,input().split()))
counter = 0
Ans = 0
temp = 0
for i in range(N-1):
  if H[counter]>=H[counter+1]:
    temp += 1
    if temp > Ans:
      Ans = temp
    counter += 1
  else:
    temp = 0
    counter += 1
    
print(Ans)
Problem: p02923
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = [int(i) for i in input().split()]

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

Failing test case input:
7
20 7 0 0 3 -1 2

Expected output:
3


Actual output:
0


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

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

print(max)

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

Failing test case input:
4
-1 -1 0 10

Expected output:
1


Actual output:
0


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

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

i = 0
cnt = 0
max = -1
while(i!=N-1):
  if H[i+1]<=H[i]:
    cnt += 1
  else:
    if max<cnt:
      max = cnt
    cnt = 0
  i += 1
if max<cnt:
  max = cnt
print(cnt)

Failing test case input:
7
10 4 3 0 6 5 2

Expected output:
3


Actual output:
2


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

i = 0
cnt = 0
max = -1
while(i!=N-1):
  if H[i+1]<=H[i]:
    cnt += 1
  else:
    if max<cnt:
      max = cnt
    cnt = 0
  i += 1
if max<cnt:
  max = cnt
print(max)

Problem: p02923
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
width = int(input())
heights = list(input().split())
score = 0
best = 0
for x in range(width - 1):
  if heights[x] >= heights[x + 1]:
    score = score + 1
    if best < score:
      best = score
  else:
    score = 0
print("{}".format(best))

Failing test case input:
5
1 11 28 3 3

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
width = int(input())
heights = list(input().split())
score = 0
best = 0
for x in range(width - 1):
  if int(heights[x]) >= int(heights[x + 1]):
    score = score + 1
    if best < score:
      best = score
  else:
    score = 0
print("{}".format(best))
Problem: p02923
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

input = sys.stdin.readline

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

pre = 0
total = 0
max_total = 0
for i in range(1, N):
    if pre>=H[i]:total+=1
    else:total=0
    if total>max_total:max_total=total
    pre=H[i]
print(max_total)

Failing test case input:
7
10 4 3 0 3 5 2

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
import sys

input = sys.stdin.readline

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

pre = H[0]
total = 0
max_total = 0
for i in range(1, N):
    if pre>=H[i]:
        total+=1
        if total>max_total:max_total=total
    else:total=0
    
    pre=H[i]
print(max_total)

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

for i in range(n-1):
    if H[i] >= H[i+1]:
        cnt += 1
    else:
        cnt = 0

print(max(cnt, 0))


Failing test case input:
7
20 7 3 0 3 0 2

Expected output:
3


Actual output:
0


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

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

print(ans)

Problem: p02923
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
h = [int(i) for i in input().split()]
ans = []
tmp = 0

for i in range(1,len(h)):
    if h[i-1] - h[i] >= 0:
        tmp += 1
    else:
        ans.append(tmp)
        tmp = 0

print(tmp)


Failing test case input:
4
0 4 0 10

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
h = [int(i) for i in input().split()]
ans = []
tmp = 0
if len(h) == 1:
    print(0)
    exit()

for i in range(1,len(h)):
    if h[i-1] - h[i] >= 0:
        tmp += 1
    else:
        tmp = 0
    ans.append(tmp)

print(max(ans))

Problem: p02923
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
h = [int(xi) for xi in input().split()]

step = 0
mstep = 0
for xi in range(n-1):
    if h[xi]>=h[xi+1]:
        step +=1
        if mstep<step:
            mstep = step
    
    
    
    

if mstep<step:
    mstep = step

print(mstep)


Failing test case input:
7
20 7 0 1 3 -2 2

Expected output:
2


Actual output:
3


Fixed submission (verdict: Accepted):
n = int(input())
h = [int(xi) for xi in input().split()]

step = 0
mstep = 0
for xi in range(n-1):
    if h[xi] >= h[xi+1]:
        step += 1
    else:
        if mstep<step:
            mstep = step
        step = 0

if mstep<step:
    mstep = step

print(mstep)
Problem: p02923
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = list(map(int, input().split()))
Hl = len(H)
can_move_list = [0 for i in range(Hl+1)]
bf = 10**9+1
for i, h in enumerate(reversed(H)):
    print(len(H)-i-1,h)
    if bf <= h:
        can_move_list[Hl-i-1] += can_move_list[Hl-i] + 1
    else:
        can_move_list[Hl-i-1] = 0
    bf = h
print(max(can_move_list))

Failing test case input:
4
-2 2 4 0

Expected output:
1


Actual output:
3 0
2 4
1 2
0 -2
1


Fixed submission (verdict: Accepted):
N = int(input())
H = list(map(int, input().split()))
Hl = len(H)
can_move_list = [0 for i in range(Hl+1)]
bf = 10**9+1
for i, h in enumerate(reversed(H)):
    if bf <= h:
        can_move_list[Hl-i-1] += can_move_list[Hl-i] + 1
    else:
        can_move_list[Hl-i-1] = 0
    bf = h
print(max(can_move_list))

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



t=0
k=0

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


Failing test case input:
7
64 7 0 1 2 -2 2

Expected output:
2


Actual output:
0


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



t=0
k=0

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

Problem: p02923
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
h = list(map(int,input().split()))
ans = 1
running = 1
for i in range(1,n):
  if h[i] <= h[i-1]:
    running += 1
  else:
    ans = max(ans, running)
    running = 1
print(ans)

Failing test case input:
5
12 4 8 12 3

Expected output:
1


Actual output:
2


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

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

tmp = -1
min = 0
for i in range(N-1):
    if H[i+1] - H[i] > 0:
        tmp = 0
    else:
        tmp -= 1

    if tmp < min:
        min = tmp

    if N - i - 1 < -min:
        break

print(-min)

Failing test case input:
5
10 4 8 12 3

Expected output:
1


Actual output:
2


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

tmp = 0
min = 0
for i in range(N-1):
    if H[i+1] - H[i] > 0:
        tmp = 0
    else:
        tmp -= 1

    if tmp < min:
        min = tmp

    
    

print(-min)
Problem: p02923
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = list(map(int, input().split()))
a = [0] * N

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

Failing test case input:
7
4 4 5 6 6 5 5

Expected output:
3

Actual output:
1


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

for i in range(N - 1):
  if H[i] >= H[i+1]:
    a[start] += 1
  else:
    start += 1

      
print(max(a))

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

Failing test case input:
7
10 4 3 0 3 5 2

Expected output:
3


Actual output:
2


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

Problem: p02923
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
h = list(map(int, input().split()))
prev = 1000000000
max = 0
idx = 0
for i, v in enumerate(h):
    if v > prev:
        idx = i
        if max <= i - idx:
            max = i - idx
    prev = v
if max < n - 1 - idx:
    max = n - 1 - idx
print(max)


Failing test case input:
7
7 4 8 6 6 5 8

Expected output:
3


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
h = list(map(int, input().split()))
prev = 1000000000
max = 0
idx = 0
for i, v in enumerate(h):
    if v > prev:
        if max <= i - 1 - idx:
            max = i - 1 - idx
        idx = i
    prev = v
if max <= n - 1 - idx:
    max = n - 1 - idx
print(max)

Problem: p02923
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N = int(input())
H = list(map(int,input().split()))
step = 0
answer = 0
for i in range(N-1):
    if H[i]>=H[i+1]:
        step += 1
    else:
        answer = max(answer,step)
        step = 0
print(step)

Failing test case input:
7
7 3 8 6 6 5 7

Expected output:
3


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
H = list(map(int,input().split()))
step = 0
answer = 0
for i in range(N-1):
    if H[i]>=H[i+1]:
        step += 1
    if H[i]<H[i+1] or i==N-2:
        answer = max(answer,step)
        step = 0
print(answer)
Problem: p02923
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = list(map(int, input().split()))
count = 0
index_new = N
count_new = 0
flag = 0
for i in range(N):
    if H[N - 1 - i] <= H[N - 1 - (i + 1)]:
        count_new += 1
        index_new -= 1
    else:
        flag = 1
        if count_new > count:
            count = count_new
            index = index_new
        count_new = 0
        index_new = i
if flag == 1:
    print(count)
else:
    print(N)

Failing test case input:
4
0 -1 1 10

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):

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

count = 0
count_new = 0
flag = 0

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

        count_new += 1

        if i == N - 2 and flag == 0:
            flag = 1
            count = count_new 

        elif i == N - 2 and count_new > count:
            count = count_new

    else:
        flag = 1
        if count_new > count:
            count = count_new
        count_new = 0

print(count)

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

movable = [0]*N
i = 1
while i < N:
    j = i
    while j < N-1 and H[j] >= H[j+1]:
        movable[i] += 1
        j += 1
    i = i + movable[i] + 1

print(max(movable))

Failing test case input:
7
6 4 3 0 6 5 2

Expected output:
3


Actual output:
2


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

movable = [0]*N
i = 0
while i < N-1:
    j = i
    while j < N-1 and H[j] >= H[j+1]:
        movable[i] += 1
        j += 1
    i = i + movable[i] + 1

print(max(movable))

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

Failing test case input:
7
6 4 3 0 6 5 2

Expected output:
3


Actual output:
2


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

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

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

c = 0
max_c = 0
for i in range(N - 1):
    if HS[i] >= HS[i + 1]:
        c += 1
    else:
        max_c = max(max_c, c)
        c = 0

print(c)


Failing test case input:
7
10 4 3 0 3 0 2

Expected output:
3


Actual output:
0


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

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

c = 0
max_c = 0
for i in range(N - 1):
    if HS[i] >= HS[i + 1]:
        c += 1
        max_c = max(max_c, c)
    else:
        c = 0

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


Failing test case input:
7
6 4 3 0 6 5 2

Expected output:
3


Actual output:

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

Problem: p02923
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
x = list(map(int, input().split()))
count = 0
maxnum = 0
i = 0

while i < n - 1:
    if x[i] >= x[i + 1]:
        count += 1
    if x[i] < x[i + 1]:
        print(i)
        if maxnum < count:
            maxnum = count
        count = 0
    i+=1

print(maxnum)


Failing test case input:
4
-2 3 0 3

Expected output:
1


Actual output:
0
2
1


Fixed submission (verdict: Accepted):
n = int(input())
x = list(map(int, input().split()))
count = 0
maxnum = 0
i = 0

while i < n - 1:
    if x[i] >= x[i + 1]:
        count += 1
    if x[i] < x[i + 1]:
        if maxnum < count:
            maxnum = count
        count = 0
    i+=1

if maxnum < count:
    maxnum = count
print(maxnum)

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

diff = []
for i in range(len(H)-1):
    diff.append(H[i+1]- H[i])

cnt = 0
ans = 0
for d in diff:
    if d<=0:
        cnt += 1
        ans = cnt
    else:
        cnt = 0
        
print(ans)

Failing test case input:
7
7 4 3 0 6 5 5

Expected output:
3


Actual output:
2


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

diff = []
for i in range(len(H)-1):
    diff.append(H[i+1]- H[i])

cnt = 0
ans = 0
for d in diff:
    if d<=0:
        cnt += 1
        ans = max(cnt, ans)
    else:
        ans = max(cnt, ans)
        cnt = 0
        
print(ans)

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

Failing test case input:
7
7 4 3 0 6 5 5

Expected output:
3


Actual output:
0
1
2
4
5
3


Fixed submission (verdict: Accepted):
N=int(input())
H=list(map(int,input().split()))
max=0
ans=0
for i in range(N-1):
    if H[i]>=H[i+1]:
        max+=1
    else:
        max=0
    if ans<=max:
        ans=max
print(ans)
Problem: p02923
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
H = list(map(int, input().split()))

ans = 0
prev = H[N-1]
count = 0
for i in range(1, N):
    ind = N-1-i
    if H[ind] < prev:
        ans = max(ans, count)
        count = 0
    else:
        count += 1
    prev = H[ind]

print(ans)


Failing test case input:
7
6 4 3 0 6 5 2

Expected output:
3


Actual output:
2


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

ans = 0
prev = H[0]
count = 0
for i in range(1, N):
    if H[i] <= prev:
        count += 1
    else:
        ans = max(ans, count)
        count = 0
    prev = H[i]

ans = max(ans, count)
print(ans)

Problem: p02923
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
Hs = input().split()
A = []
b = 0
b_h = 0
for i in range(N-1):
  if int(Hs[i]) < int(Hs[i+1]):
    b = i
    A.append(b-b_h)
    b_h = b
if len(A) != N-1:
  b = i
  A.append(b-b_h)
  print(max(A))
else:
  print(0)

Failing test case input:
5
12 4 10 4 5

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
Hs = input().split()
A = []
b = 0
b_h = 0
for i in range(N-1):
  if int(Hs[i]) < int(Hs[i+1]):
    b = i
    A.append(b-b_h)
    b_h = b+1

if len(A) != N-1:
  b = i + 1
  A.append(b-b_h)
  print(max(A))
else:
  print(0)

Problem: p02923
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
    read_all = [tuple(map(int, input().split())) for _ in range(N)]
    return map(list,zip(*read_all))



N = I()
H = III()

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

print(ans)

Failing test case input:
7
20 7 0 0 3 -1 2

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
    read_all = [tuple(map(int, input().split())) for _ in range(N)]
    return map(list,zip(*read_all))



N = I()
H = III()

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

print(max(ans,temp))
Problem: p02923
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
H = list(map(int,input().split()))
ans = 0

for i in range(N-1):
  p = 0
  if H[i] < H[i+1]:
    if ans < p:
      ans = p
    ans = 0
  else:
    ans += 1

print(ans)

Failing test case input:
7
10 4 3 0 3 0 2

Expected output:
3


Actual output:
0


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

for i in range(N-1):
  if H[i] < H[i+1]:
    if ans < p:
      ans = p
    p = 0
  else:
    p += 1

if ans < p:
  ans = p

print(ans)

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

ans,tmp=0,0
for i in range(n-1):
    if h[i]>=h[i+1]:
        tmp+=1
        ans=max(ans,tmp)
    else:
        tep=0
print(ans)

Failing test case input:
7
64 7 0 1 0 -2 3

Expected output:
2


Actual output:
4


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

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

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



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

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

print(max(record,count))

Failing test case input:
7
10 4 3 0 3 5 2

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):



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

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

print(ans)

Problem: p02923
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
ls = list(map(int,input().split()))
ls = ls[::-1]
ls2 = [0]*(n+1)
ans = 0
for i in range(0,n-1):
  if ls[i]>ls[i+1]:
    ls2[i]=ls[i]*0
  elif ls[i]<=ls[i+1]:
    ls2[i+1]=ls2[i]+1
print(max(ls2))

Failing test case input:
5
6 7 7 1 3

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n=int(input())
ls = list(map(int,input().split()))
ls2 = [0]*(n+1)
for i in range(n-1):
  if ls[i]<ls[i+1]:
    ls2[i+1]=ls2[i]*0
  elif ls[i]>=ls[i+1]:
    ls2[i+1]=ls2[i]+1
print(max(ls2))

Problem: p02923
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def solve():
  n = int(input())
  h = list(map(int, input().split()))
  ans, now = 0, 0
  for i in range(n-1):
    if h[i] < h[i+1]:
      if ans < now:
        ans = now
      now = 0
  now += 1
  print(ans)
  return 0
 
if __name__ == "__main__":
  solve()


Failing test case input:
4
-2 3 0 2

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
def solve():
  n = int(input())
  h = list(map(int, input().split()))
  ans, now = 0, 0
  for i in range(n-1):
    if h[i] < h[i+1]:
      now = 0
    else:
      now += 1
      if ans < now:
        ans = now
  print(ans)
  return 0
 
if __name__ == "__main__":
  solve()
Problem: p02923
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = input().split()

Move = 0
tmp = 0
for i in range(N-1):
    if int(H[i+1]) > int(H[i]):
        tmp = 0
        if Move < tmp:
            Move = tmp
        
    else:
        tmp += 1     

if Move < tmp:
    Move = tmp

print(Move)

Failing test case input:
7
64 3 0 4 0 -2 5

Expected output:
2


Actual output:
0


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

Move = 0
tmp = 0
for i in range(N-1):
    if int(H[i+1]) > int(H[i]):
        if Move <= tmp:
            Move = tmp
        tmp = 0
        
    else:
        tmp += 1     

if Move < tmp:
    Move = tmp

print(Move)

Problem: p02923
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()
hs = list(map(int, input().split(" ")))
max = 0
count = 0
for i in range(len(hs) - 1):

    if hs[i+1] <= hs[i]:
        count += 1

    else:
        if max < count:
            max = count
        count = 0

print(max)

Failing test case input:
4
-2 2 4 1

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
n = input()
hs = list(map(int, input().split(" ")))
max = 0
count = 0
for i in range(len(hs) - 1):

    if hs[i+1] <= hs[i]:
        count += 1
    else:
        count = 0
    if max < count:
        max = count
print(max)

Problem: p02923
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import defaultdict, deque, Counter
import sys
import heapq
import math



sys.setrecursionlimit(1000000000)

MIN = -10 ** 9
MOD = 10 ** 9 + 7


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

    last = 10 ** 10
    res = 0
    count = 0
    for hi in reversed(H):
        if hi >= last:
            count += 1
        else:
            res = max(res, count)
            count = 0
        last = hi
    print(res)


if __name__ == '__main__':
    main()


Failing test case input:
7
20 7 0 0 3 -1 2

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
from collections import defaultdict, deque, Counter
import sys
import heapq
import math



sys.setrecursionlimit(1000000000)

MIN = -10 ** 9
MOD = 10 ** 9 + 7


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

    last = 10 ** 10
    res = 0
    count = 0
    for hi in reversed(H):
        if hi >= last:
            count += 1
        else:
            res = max(res, count)
            count = 0
        last = hi
    if count != 0:
        res = max(res, count)

    print(res)


if __name__ == '__main__':
    main()