ZhenlongDai/ACPR huggingface dataset:
Buggy program (verdict: Wrong Answer):
N = int(input())
A_list = list(map(int, input().split()))
A_list = sorted(A_list, reverse = True)
A_list1 = A_list[0:2*N]
A_list2 = A_list[2*N:3*N]
print(sum(A_list1[N:2*N]))

Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 1100000110 1010000001 1100110000 1001011000 1011000000 1101100011 0100110000 0011100101 1000000000 1001000111 1000000011 1000110001 0010000110 1100000001 1001010100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10333334225


Actual output:
10033344414


Fixed program (verdict: Accepted):
N = int(input())
A_list = list(map(int, input().split()))
A_list = sorted(A_list, reverse = True)
A_list1 = A_list[0:2*N]
A_list2 = A_list[2*N:3*N]
print(sum(A_list1[1:2*N:2]))

Diff:
 N = int(input())
 A_list = list(map(int, input().split()))
 A_list = sorted(A_list, reverse = True)
 A_list1 = A_list[0:2*N]
 A_list2 = A_list[2*N:3*N]
-print(sum(A_list1[N:2*N]))
+print(sum(A_list1[1:2*N:2]))
Buggy program (verdict: Wrong Answer):
N = int(input())
arr = [0]*100
for num in range(1,N):
  arr[int(str(num)[0]+str(num)[-1])] += 1
print(sum([arr[i*10+j]*arr[j*10+i]  for i in range(10) for j in range(10)]))

Failing test case input:
2011

Expected output:
40631


Actual output:
40409


Fixed program (verdict: Accepted):
N = int(input())
arr = [0]*100
for num in range(1,N+1):
  arr[int(str(num)[0]+str(num)[-1])] += 1
print(sum([arr[i*10+j]*arr[j*10+i]  for i in range(10) for j in range(10)]))

Diff:
 N = int(input())
 arr = [0]*100
-for num in range(1,N):
+for num in range(1,N+1):
   arr[int(str(num)[0]+str(num)[-1])] += 1
 print(sum([arr[i*10+j]*arr[j*10+i]  for i in range(10) for j in range(10)]))
Buggy program (verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
while a > 0 and b > 0: c -= b; a -= d
print('Yes' if c == 0 else 'No')

Failing test case input:
350 8 4 7

Expected output:
Yes


Actual output:
No


Fixed program (verdict: Accepted):
a, b, c, d = map(int, input().split())
while a > 0 and b > 0: c -= b; a -= d
print('Yes' if c <= 0 else 'No')

Diff:
 a, b, c, d = map(int, input().split())
 while a > 0 and b > 0: c -= b; a -= d
-print('Yes' if c == 0 else 'No')
+print('Yes' if c <= 0 else 'No')
Buggy program (verdict: Wrong Answer):
A = list(map(int, input().split()))
ans = A[0]-A[1]*2
print(ans)


Failing test case input:
20 15

Expected output:
0

Actual output:
-10


Fixed program (verdict: Accepted):
A = list(map(int, input().split()))
ans = A[0]-A[1]*2
if ans < 0:
    print("0")
else:
    print(ans)


Diff:
 A = list(map(int, input().split()))
 ans = A[0]-A[1]*2
-print(ans)
+if ans < 0:
+    print("0")
+else:
+    print(ans)
Buggy program (verdict: Wrong Answer):
def main():
    A = int(input())
    B = int(input())

    if A>B:
        print('GREATER')
    elif B<A:
        print('LESS')
    else:
        print('EQUAL')

if __name__ == "__main__":
    main()


Failing test case input:
9720246
89020153

Expected output:
LESS


Actual output:
EQUAL


Fixed program (verdict: Accepted):
def main():
    A = int(input())
    B = int(input())

    if A>B:
        print('GREATER')
    elif A<B:
        print('LESS')
    else:
        print('EQUAL')

if __name__ == "__main__":
    main()


Diff:
 def main():
     A = int(input())
     B = int(input())
 
     if A>B:
         print('GREATER')
-    elif B<A:
+    elif A<B:
         print('LESS')
     else:
         print('EQUAL')
 
 if __name__ == "__main__":
     main()
Buggy program (verdict: Wrong Answer):
n,a,b = map(int,input().split())
ans = 0
for i in range(2):
  for j in range(10):
    for k in range(10):
      for l in range(10):
        for m in range(10):
          if i*10000+j*1000+k*100+l*10+m <= n and a <= i+j+k+l+m <= b:
            ans += 1
print(ans)

Failing test case input:
37 1 6

Expected output:
332


Actual output:
21


Fixed program (verdict: Accepted):
n,a,b = map(int,input().split())
ans = 0
for i in range(2):
  for j in range(10):
    for k in range(10):
      for l in range(10):
        for m in range(10):
          if i*10000+j*1000+k*100+l*10+m <= n and a <= i+j+k+l+m <= b:
            ans += i*10000+j*1000+k*100+l*10+m
print(ans)

Diff:
 n,a,b = map(int,input().split())
 ans = 0
 for i in range(2):
   for j in range(10):
     for k in range(10):
       for l in range(10):
         for m in range(10):
           if i*10000+j*1000+k*100+l*10+m <= n and a <= i+j+k+l+m <= b:
-            ans += 1
+            ans += i*10000+j*1000+k*100+l*10+m
 print(ans)
Buggy program (verdict: Wrong Answer):
from math import ceil
n, *A = map(int, open(0).readlines())
print(5 + max(ceil(n / a) for a in A))

Failing test case input:
10
241
219
123
123
194

Expected output:
5


Actual output:
6


Fixed program (verdict: Accepted):
from math import ceil
n, *A = map(int, open(0).readlines())
print(4 + max(ceil(n / a) for a in A))

Diff:
 from math import ceil
 n, *A = map(int, open(0).readlines())
-print(5 + max(ceil(n / a) for a in A))
+print(4 + max(ceil(n / a) for a in A))
Buggy program (verdict: Wrong Answer):
a = int(input())
count = 0
for i in range(a):
  if len(str(i)) % 2 == 1:
    count += 1
print(count - 1)

Failing test case input:
215

Expected output:
125


Actual output:
124


Fixed program (verdict: Accepted):
a = int(input())
count = 0
for i in range(a + 1):
  if len(str(i)) % 2 == 1:
    count += 1
print(count - 1)

Diff:
 a = int(input())
 count = 0
-for i in range(a):
+for i in range(a + 1):
   if len(str(i)) % 2 == 1:
     count += 1
 print(count - 1)
Buggy program (verdict: Wrong Answer):
N = int(input())

for i in range(100):
    for j in range(100):
        if 4*i+7*j == N:
            print("Yes")
            exit()

Failing test case input:
-226

Expected output:
No


Actual output:

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

for i in range(100):
    for j in range(100):
        if 4*i+7*j == N:
            print("Yes")
            exit()
print("No")

Diff:
 N = int(input())
 
 for i in range(100):
     for j in range(100):
         if 4*i+7*j == N:
             print("Yes")
             exit()
+print("No")
Buggy program (verdict: Wrong Answer):
n,m = map(int,input().split())
h = list(map(int,input().split()))
ans = [1] * n
for i in range(m):
  a,b, = map(int,input().split())
  if h[a-1] >= h[b-1]:
    ans[b-1] =0
  if h[a-1] <= h[b-1]:
    ans[a-1] = 0
  print(ans)
print(sum(ans))

Failing test case input:
6 5
8 6 6 1 2 1
1 3
4 2
4 3
4 6
4 6

Expected output:
3


Actual output:
[1, 1, 0, 1, 1, 1]
[1, 1, 0, 0, 1, 1]
[1, 1, 0, 0, 1, 1]
[1, 1, 0, 0, 1, 0]
[1, 1, 0, 0, 1, 0]
3


Fixed program (verdict: Accepted):
n,m = map(int,input().split())
h = list(map(int,input().split()))
ans = [1] * n
for i in range(m):
  a,b, = map(int,input().split())
  if h[a-1] >= h[b-1]:
    ans[b-1] =0
  if h[a-1] <= h[b-1]:
    ans[a-1] = 0
print(sum(ans))

Diff:
 n,m = map(int,input().split())
 h = list(map(int,input().split()))
 ans = [1] * n
 for i in range(m):
   a,b, = map(int,input().split())
   if h[a-1] >= h[b-1]:
     ans[b-1] =0
   if h[a-1] <= h[b-1]:
     ans[a-1] = 0
-  print(ans)
 print(sum(ans))
Buggy program (verdict: Wrong Answer):
s = input()
res = 1000
for i in range(3, len(s)):
    res = min(res, abs(753-int(s[i-3:i])))
print(res)

Failing test case input:
23764

Expected output:
11


Actual output:
377


Fixed program (verdict: Accepted):
s = input()
res = 1000
for i in range(3, len(s)+1):
    res = min(res, abs(753-int(s[i-3:i])))
print(res)


Diff:
 s = input()
 res = 1000
-for i in range(3, len(s)):
+for i in range(3, len(s)+1):
     res = min(res, abs(753-int(s[i-3:i])))
 print(res)
+
Buggy program (verdict: Wrong Answer):
n,x,t=map(int,input().split())
s=n
print(s*t)

Failing test case input:
26 2 -1

Expected output:
-13


Actual output:
-26


Fixed program (verdict: Accepted):
import math
n,x,t=map(int,input().split())
s=math.ceil(n/x)
print(s*t)

Diff:
+import math
 n,x,t=map(int,input().split())
-s=n
+s=math.ceil(n/x)
 print(s*t)
Buggy program (verdict: Wrong Answer):
A = int(input())
B = int(input())

answers = {1:True, 2:True, 3:True}
answers.pop(A)
answers.pop(B)
list(answers.keys())[0]

Failing test case input:
3
001

Expected output:
2


Actual output:

Fixed program (verdict: Accepted):
A = int(input())
B = int(input())

answers = {1:True, 2:True, 3:True}
answers.pop(A)
answers.pop(B)
print(list(answers.keys())[0])

Diff:
 A = int(input())
 B = int(input())
 
 answers = {1:True, 2:True, 3:True}
 answers.pop(A)
 answers.pop(B)
-list(answers.keys())[0]
+print(list(answers.keys())[0])
Buggy program (verdict: Wrong Answer):
s = int(input())
a = []

while s not in a:
    print("xxx")
    a.append(s)
    if s % 2 == 0:
        s = s / 2
    else:
        s = s * 3 + 1

print(len(a) + 1)


Failing test case input:
159

Expected output:
56


Actual output:
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
56


Fixed program (verdict: Accepted):
s = int(input())
a = []

while s not in a:
    a.append(s)
    if s % 2 == 0:
        s = s / 2
    else:
        s = s * 3 + 1

print(len(a) + 1)


Diff:
 s = int(input())
 a = []
 
 while s not in a:
-    print("xxx")
     a.append(s)
     if s % 2 == 0:
         s = s / 2
     else:
         s = s * 3 + 1
 
 print(len(a) + 1)
Buggy program (verdict: Wrong Answer):
n,m,a,b=map(int, input().split())
x=list(map(int, input().split()))
y=list(map(int, input().split()))
j=False
for i in range(a+1,b+1):
    if i<max(x) and min(y)>=i:
        j=True

print("No War" if j else "War")

Failing test case input:
3 2 10 40
8 11 15
16 11

Expected output:
War


Actual output:
No War


Fixed program (verdict: Accepted):
n,m,a,b=map(int, input().split())
x=list(map(int, input().split()))
y=list(map(int, input().split()))
j=False
for i in range(a+1,b+1):
    if max(x)<i and min(y)>=i:
        j=True

print("No War" if j else "War")

Diff:
 n,m,a,b=map(int, input().split())
 x=list(map(int, input().split()))
 y=list(map(int, input().split()))
 j=False
 for i in range(a+1,b+1):
-    if i<max(x) and min(y)>=i:
+    if max(x)<i and min(y)>=i:
         j=True
 
 print("No War" if j else "War")
Buggy program (verdict: Wrong Answer):
s = int(input())
n = input()
str_list = list(n)
w_cnt = str_list.count('W')
r_cnt = str_list.count('R')
if w_cnt == 0 or r_cnt == 0:
    print(0)
else:
    w_result = str_list[w_cnt:]
    r_result = str_list[:r_cnt]
    r = w_result.count('R')
    w = r_result.count('W')
    if w <= r:
        print(r)
    else:
        print(w)


Failing test case input:
8
RRWRVRWW

Expected output:
1


Actual output:
2


Fixed program (verdict: Accepted):
s = int(input())
n = input()
str_list = list(n)
w_cnt = str_list.count('W')
r_cnt = str_list.count('R')
if w_cnt == 0 or r_cnt == 0:
    print(0)
else:
    w_result = str_list[r_cnt:]
    r_result = str_list[:r_cnt]
    r = w_result.count('R')
    w = r_result.count('W')
    if w <= r:
        print(w)
    else:
        print(r)


Diff:
 s = int(input())
 n = input()
 str_list = list(n)
 w_cnt = str_list.count('W')
 r_cnt = str_list.count('R')
 if w_cnt == 0 or r_cnt == 0:
     print(0)
 else:
-    w_result = str_list[w_cnt:]
+    w_result = str_list[r_cnt:]
     r_result = str_list[:r_cnt]
     r = w_result.count('R')
     w = r_result.count('W')
     if w <= r:
-        print(r)
-    else:
         print(w)
+    else:
+        print(r)
Buggy program (verdict: Wrong Answer):
n = input()
num = len(n)-2
for i in range(num,0,2):
  f = int(i/2)
  if s[:f]==s[f:i]:
    print(i)
    break

Failing test case input:
bbcaccaacabb

Expected output:
2


Actual output:

Fixed program (verdict: Accepted):
n = input()
num = len(n)-2
for i in range(num,0,-2):
  f = int(i/2)
  if n[:f]==n[f:i]:
    print(i)
    break

Diff:
 n = input()
 num = len(n)-2
-for i in range(num,0,2):
+for i in range(num,0,-2):
   f = int(i/2)
-  if s[:f]==s[f:i]:
+  if n[:f]==n[f:i]:
     print(i)
     break
Buggy program (verdict: Wrong Answer):
n = int(input())
x =list(map(int, input().split()))
y =list(map(int, input().split()))
diff = [x[i]-y[i] for i in range(n)]
num = 0
for d in diff:
    if(d > 0):
        num += d

Failing test case input:
4
0 -2 1 180
0 4 0 1

Expected output:
180


Actual output:

Fixed program (verdict: Accepted):
n = int(input())
x =list(map(int, input().split()))
y =list(map(int, input().split()))
diff = [x[i]-y[i] for i in range(n)]
num = 0
for d in diff:
    if(d > 0):
        num += d
print(num)

Diff:
 n = int(input())
 x =list(map(int, input().split()))
 y =list(map(int, input().split()))
 diff = [x[i]-y[i] for i in range(n)]
 num = 0
 for d in diff:
     if(d > 0):
         num += d
+print(num)
Buggy program (verdict: Wrong Answer):
N = int(input())
h = list(map(int,input().split()))
dp = [0] * N
for i in range(1, N):
    if i == 1:
        dp[i] = abs(h[1] - h[0])
    else:
        dp[i] = min(abs(h[i] - h[i-1]), abs(h[i] - h[i-2]))
print(dp[N-1])


Failing test case input:
4
43 11 -2 2

Expected output:
41


Actual output:
4


Fixed program (verdict: Accepted):
N = int(input())
h = list(map(int,input().split()))
dp = [0] * N
for i in range(1, N):
    if i == 1:
        dp[i] = abs(h[1] - h[0])
    else:
        dp[i] = min(abs(h[i] - h[i-1])+dp[i-1], abs(h[i] - h[i-2])+dp[i-2])
print(dp[N-1])


Diff:
 N = int(input())
 h = list(map(int,input().split()))
 dp = [0] * N
 for i in range(1, N):
     if i == 1:
         dp[i] = abs(h[1] - h[0])
     else:
-        dp[i] = min(abs(h[i] - h[i-1]), abs(h[i] - h[i-2]))
+        dp[i] = min(abs(h[i] - h[i-1])+dp[i-1], abs(h[i] - h[i-2])+dp[i-2])
 print(dp[N-1])
Buggy program (verdict: Wrong Answer):
n,p = map(int,input().split())
a = [int(i) for i in input().split()]
odd = 0
evil = 0
for i in range(n):
    if i % 2== 0:
        evil += 1
    else:
        odd += 1
if p==1 and odd ==0:
    print(0)
elif evil ==n:
    print(pow(2,n))
else:
    print(pow(2,n-1))

Failing test case input:
1 1
67

Expected output:
1


Actual output:
0


Fixed program (verdict: Accepted):
n,p = map(int,input().split())
a = [int(i) for i in input().split()]
odd = 0
evil = 0
for i in a:
    if i % 2== 0:
        evil += 1
    else:
        odd += 1
if p==1 and odd ==0:
    print(0)
elif evil ==n:
    print(pow(2,n))
else:
    print(pow(2,n-1))

Diff:
 n,p = map(int,input().split())
 a = [int(i) for i in input().split()]
 odd = 0
 evil = 0
-for i in range(n):
+for i in a:
     if i % 2== 0:
         evil += 1
     else:
         odd += 1
 if p==1 and odd ==0:
     print(0)
 elif evil ==n:
     print(pow(2,n))
 else:
     print(pow(2,n-1))
Buggy program (verdict: Wrong Answer):
A,B = map(int,input().split())
if A == B:
  print(2*A)
else:
  print(2*max(A,B))

Failing test case input:
-1 53

Expected output:
105


Actual output:
106


Fixed program (verdict: Accepted):
A,B = map(int,input().split())
if A == B:
  print(2*A)
else:
  print(max(2*A-1,2*B-1))

Diff:
 A,B = map(int,input().split())
 if A == B:
   print(2*A)
 else:
-  print(2*max(A,B))
+  print(max(2*A-1,2*B-1))
Buggy program (verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))

def calc(tmp, cnt=0):
    for i in a[1:]:
        if tmp < 0:
            tmp = tmp + i
            if tmp <= 0:
                cnt += -tmp + 1
                tmp = 1
        elif tmp > 0:
            tmp = tmp + i
            if tmp >= 0:
                cnt += tmp + 1
                tmp = -1
    return cnt

if a[0]:
    hugou = 1 if a[0] > 0 else -1
    min(calc(a[0]), calc(-hugou, abs(a[0]) + 1))
else:
    print(min(calc(1, 1), calc(-1, 1)))

Failing test case input:
4
1 -3 1 0

Expected output:
4

Actual output:

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

def calc(tmp, cnt=0):
    for i in a[1:]:
        if tmp < 0:
            tmp = tmp + i
            if tmp <= 0:
                cnt += -tmp + 1
                tmp = 1
        elif tmp > 0:
            tmp = tmp + i
            if tmp >= 0:
                cnt += tmp + 1
                tmp = -1
    return cnt

if a[0]:
    hugou = 1 if a[0] > 0 else -1
    print(min(calc(a[0]), calc(-hugou, abs(a[0]) + 1)))
else:
    print(min(calc(1, 1), calc(-1, 1)))


Diff:
 n = int(input())
 a = list(map(int,input().split()))
 
 def calc(tmp, cnt=0):
     for i in a[1:]:
         if tmp < 0:
             tmp = tmp + i
             if tmp <= 0:
                 cnt += -tmp + 1
                 tmp = 1
         elif tmp > 0:
             tmp = tmp + i
             if tmp >= 0:
                 cnt += tmp + 1
                 tmp = -1
     return cnt
 
 if a[0]:
     hugou = 1 if a[0] > 0 else -1
-    min(calc(a[0]), calc(-hugou, abs(a[0]) + 1))
+    print(min(calc(a[0]), calc(-hugou, abs(a[0]) + 1)))
 else:
     print(min(calc(1, 1), calc(-1, 1)))
+
Buggy program (verdict: Wrong Answer):
import sys
li  =   lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw  =   lambda : sys.stdin.readline().strip().split()
ni  =   lambda : int(sys.stdin.readline().strip())
nsi =   lambda : sys.stdin.readline().strip()

from collections import defaultdict as df
import math

n=ni()
l=list(map(int,input().split()))
mn=l[0]
ans=0
for i in range(1,n):
    if(mn<l[i]):
        mn=l[i]
        print(l[i])
    else:
        ans+=mn-l[i]
print(ans)


Failing test case input:
5
1 1 2 96 8

Expected output:
88


Actual output:
2
96
88


Fixed program (verdict: Accepted):
import sys
li  =   lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw  =   lambda : sys.stdin.readline().strip().split()
ni  =   lambda : int(sys.stdin.readline().strip())
nsi =   lambda : sys.stdin.readline().strip()

from collections import defaultdict as df
import math

n=ni()
l=list(map(int,input().split()))
mn=l[0]
ans=0
for i in range(1,n):
    if(mn<l[i]):
        mn=l[i]
    else:
        ans+=mn-l[i]
print(ans)


Diff:
 import sys
 li  =   lambda : [int(x) for x in sys.stdin.readline().strip().split()]
 rw  =   lambda : sys.stdin.readline().strip().split()
 ni  =   lambda : int(sys.stdin.readline().strip())
 nsi =   lambda : sys.stdin.readline().strip()
 
 from collections import defaultdict as df
 import math
 
 n=ni()
 l=list(map(int,input().split()))
 mn=l[0]
 ans=0
 for i in range(1,n):
     if(mn<l[i]):
         mn=l[i]
-        print(l[i])
     else:
         ans+=mn-l[i]
 print(ans)
Buggy program (verdict: Wrong Answer):
import sys
input=sys.stdin.readline
n=int(input())
mod=10**9+7
a=list(map(int,input().split()))
s=[0]*61
for i in range(n):
  c=format(a[i], 'b')
  L=len(c)
  for j in range(L)[::-1]:
    s[L-j-1]+=int(c[j])
ans=0
for i in range(61)[::-1]:
  ans+=2**(i)*(s[L-i-1])*(n-s[L-i-1])
  ans%=mod
print(ans)


Failing test case input:
10
0 0 1 358 39763 7015634 92549 663262 332665684 12968449561

Expected output:
727852887


Actual output:
121052619


Fixed program (verdict: Accepted):
import sys
input=sys.stdin.readline
n=int(input())
mod=10**9+7
a=list(map(int,input().split()))
s=[0]*61
for i in range(n):
  c=format(a[i], 'b')
  L=len(c)
  for j in range(L)[::-1]:
    s[L-j-1]+=int(c[j])
ans=0
for i in range(61):
  ans+=2**(i)*(s[i])*(n-s[i])
  ans%=mod
print(ans)


Diff:
 import sys
 input=sys.stdin.readline
 n=int(input())
 mod=10**9+7
 a=list(map(int,input().split()))
 s=[0]*61
 for i in range(n):
   c=format(a[i], 'b')
   L=len(c)
   for j in range(L)[::-1]:
     s[L-j-1]+=int(c[j])
 ans=0
-for i in range(61)[::-1]:
-  ans+=2**(i)*(s[L-i-1])*(n-s[L-i-1])
+for i in range(61):
+  ans+=2**(i)*(s[i])*(n-s[i])
   ans%=mod
 print(ans)
Buggy program (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 program (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)


Diff:
 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)
+print(t)
Buggy program (verdict: Wrong Answer):
A, B, C = map(int, input().split())


if C <= A and C <= B:
    print('Yes')
else:
    print('No')

Failing test case input:
84 49 0

Expected output:
No


Actual output:
Yes


Fixed program (verdict: Accepted):
A, B, C = map(int, input().split())


if (C >= A and C <= B) or (C >= B and C <= A):
    print('Yes')
else:
    print('No')

Diff:
 A, B, C = map(int, input().split())
 
 
-if C <= A and C <= B:
+if (C >= A and C <= B) or (C >= B and C <= A):
     print('Yes')
 else:
     print('No')
Buggy program (verdict: Wrong Answer):
S=input()
T=input()

for i in range(100):
  if S[-1-i:-1:-1]+S[0:100-i] ==T:
    print("Yes")
    break
else:
  print("No")

Failing test case input:
aaaaaaaaaaaaaaab
aaaabaaaaaaaaaaa

Expected output:
Yes


Actual output:
No


Fixed program (verdict: Accepted):
S=input()
T=input()

for i in range(100):
  if S[-i:]+S[0:len(S)-i] ==T:
    print("Yes")
    break
else:
  print("No")

Diff:
 S=input()
 T=input()
 
 for i in range(100):
-  if S[-1-i:-1:-1]+S[0:100-i] ==T:
+  if S[-i:]+S[0:len(S)-i] ==T:
     print("Yes")
     break
 else:
   print("No")
Buggy program (verdict: Wrong Answer):
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))

x.append(X)
y.append(Y)
if(max(x)>min(y)):
  print('War')
else:
  print('No War')



Failing test case input:
3 2 10 40
8 11 9
16 11

Expected output:
War


Actual output:
No War


Fixed program (verdict: Accepted):
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))

x.append(X)
y.append(Y)
if((max(x)+1)>min(y) or (X+1)>Y):
  print('War')
else:
  print('No War')



Diff:
 N,M,X,Y=map(int,input().split())
 x=list(map(int,input().split()))
 y=list(map(int,input().split()))
 
 x.append(X)
 y.append(Y)
-if(max(x)>min(y)):
+if((max(x)+1)>min(y) or (X+1)>Y):
   print('War')
 else:
   print('No War')
Buggy program (verdict: Wrong Answer):
N = int(input())

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

for i in range(1,N):
	v = A[i]
	j = i-1
	while j >= 0 and A[j] > v:
		A[j+1] = A[j]
		j -= 1
	A[j+1] = v
	B = [print(" ".join(map(str, A))) for k in range(N)]

Failing test case input:
6
0 2 6 0 0 -2

Expected output:
0 2 6 0 0 -2
0 2 6 0 0 -2
0 2 6 0 0 -2
0 0 2 6 0 -2
0 0 0 2 6 -2
-2 0 0 0 2 6


Actual output:
0 2 6 0 0 -2
0 2 6 0 0 -2
0 2 6 0 0 -2
0 2 6 0 0 -2
0 2 6 0 0 -2
0 2 6 0 0 -2
0 2 6 0 0 -2
0 2 6 0 0 -2
0 2 6 0 0 -2
0 2 6 0 0 -2
0 2 6 0 0 -2
0 2 6 0 0 -2
0 0 2 6 0 -2
0 0 2 6 0 -2
0 0 2 6 0 -2
0 0 2 6 0 -2
0 0 2 6 0 -2
0 0 2 6 0 -2
0 0 0 2 6 -2
0 0 0 2 6 -2
0 0 0 2 6 -2
0 0 0 2 6 -2
0 0 0 2 6 -2
0 0 0 2 6 -2
-2 0 0 0 2 6
-2 0 0 0 2 6
-2 0 0 0 2 6
-2 0 0 0 2 6
-2 0 0 0 2 6
-2 0 0 0 2 6


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

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

for i in range(1,N):
	print(" ".join(map(str, A)))
	v = A[i]
	j = i-1
	while j >= 0 and A[j] > v:
		A[j+1] = A[j]
		j -= 1
	A[j+1] = v
print(" ".join(map(str, A)))

Diff:
 N = int(input())
 
 A = list(map(int, input().split()))
 
 for i in range(1,N):
+	print(" ".join(map(str, A)))
 	v = A[i]
 	j = i-1
 	while j >= 0 and A[j] > v:
 		A[j+1] = A[j]
 		j -= 1
 	A[j+1] = v
-	B = [print(" ".join(map(str, A))) for k in range(N)]
+print(" ".join(map(str, A)))