ZhenlongDai/ACPR huggingface dataset:
Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

A, B = map(int, input().split())
cnt = 0
for n in range(2):
    if A > B:
        cnt += A
        A -= 1
    elif A < B:
        cnt += B
        B -= 1
    else:
        cnt += A 
        A -= 1

Failing test case input:
-6 -6

Expected output:
-12


Actual output:

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

cnt = 0
for n in range(2):
    if A > B:
        cnt += A
        A -= 1
    elif A < B:
        cnt += B
        B -= 1
    else:
        cnt += A 
        A -= 1

print(cnt)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A=sorted(map(int,input().split()))
print( A[1]*2-1 if A[1]+A[0]-1 <= A[1]*2-1 else A[1]+A[0]-1 )

Failing test case input:
11 011

Expected output:
22


Actual output:
21


Fixed submission (verdict: Accepted):
A=sorted(map(int,input().split()))
print( A[1]*2-1 if A[1]+A[0] <= A[1]*2-1 else A[1]+A[0] )

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
sum = 0
A, B  = input().split(" ")
if A != int() and B != int():
    A = int(A)
    B = int(B)
    for i in range(2):
        if A > B:
            sum += A
            A -= 1
            print(sum)
        elif B > A:
            sum += B
            B -= 1
            print(sum)
        elif A==B:
            sum += A
            A -= 1
            print(sum)

Failing test case input:
-7 -7

Expected output:
-14


Actual output:
-7
-14


Fixed submission (verdict: Accepted):
sum = 0
A, B  = input().split(" ")
if A != int() and B != int():
    A = int(A)
    B = int(B)
    for i in range(2):
        if A > B:
            sum += A
            A -= 1
        elif B > A:
            sum += B
            B -= 1
        elif A==B:
            sum += A
            A -= 1
    print(sum)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())

def Buttons(x, y):
  if x > y:
    return 2*x-1
  elif x < y:
    return 2*y-1
  elif x==y:
    return x+y


Buttons(a,b)

Failing test case input:
11 011

Expected output:
22


Actual output:

Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
 
def Buttons(x, y):
  if x > y:
    return 2*x-1
  elif x < y:
    return 2*y-1
  else:
    return x+y
 
 
print(Buttons(a,b))

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
numbers = [int(i) for i in input().split()]

num1 = numbers[0]
num2 = numbers[1]

sum = 0
for i in range (2):
    
    if num1 >=num2:
        sum += num1
        num1 = num1 -1
    else:
        sum += num2
        num2 = num1-1

print (sum)



Failing test case input:
-1 46

Expected output:
91


Actual output:
45


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

num1 = numbers[0]
num2 = numbers[1]

sum = 0
for i in range (2):
        
    if num1 >=num2:
        sum += num1
        num1 = num1 -1
    else:
        sum += num2
        num2 = num2-1

print (sum)
Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().split())
ans = 0
for _ in range(2):
    if A >= B:
        ans += A
        A -= 1
print(ans)

Failing test case input:
-47 -9

Expected output:
-19


Actual output:
0


Fixed submission (verdict: Accepted):
A, B = map(int, input().split())
ans = 0
for _ in range(2):
    if A >= B:
        ans += A
        A -= 1
    else:
        ans += B
        B -= 1
print(ans)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = map(int, input().split())
ret = 0

if x == y:
    ret = x + y
else:
    if x > y:
        ret = x
        x -= 1
    elif y > x:
        ret = y
        y -= 1

    if x > y:
        ret += x
        x -= 1
    elif y > x:
        ret += y
        y -= 1

print(ret)

Failing test case input:
-6 -5

Expected output:
-11


Actual output:
-5


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
coin = 0

if a == b:
    coin = a + b
else:
    if a > b:
        coin = a
        a -= 1
    elif b > a:
        coin = b
        b -= 1

    if a > b:
        coin += a
        a -= 1
    elif b > a:
        coin += b
        b -= 1
    else:
        coin += a

print(coin)

Problem: p03071
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):










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

if A>B:
    ans = A*(A-1)
elif A==B:
    ans = A*B
else:
    ans = B*(B-1)
print(ans)

Failing test case input:
-7 -10

Expected output:
-15


Actual output:
56


Fixed submission (verdict: Accepted):










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

if A>B:
    ans = A+(A-1)
elif A==B:
    ans = A+B
else:
    ans = B+(B-1)
print(ans)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split())
if A>B:
  print(2*A-1)
if A<=B:
  print(2*B-1)

Failing test case input:
-5 -5

Expected output:
-10


Actual output:
-11


Fixed submission (verdict: Accepted):
A,B=map(int,input().split())
if A>B:
  print(2*A-1)
if A<B:
  print(2*B-1)
if A==B:
  print(A+B)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=[int(i) for i in input().split()]
print(min([2*a-1,a+b,2*b-1]))

Failing test case input:
-2 -22

Expected output:
-5


Actual output:
-45


Fixed submission (verdict: Accepted):
a,b=[int(i) for i in input().split()]
print(max([2*a-1,a+b,2*b-1]))

Problem: p03071
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A, B = map(int,input().split())
def ma(A, B):
    x = max(A, B)
    ans = 2 * x - 1
    return ans
print(ma(A, B))

Failing test case input:
-5 -5

Expected output:
-10


Actual output:
-11


Fixed submission (verdict: Accepted):
A, B = map(int,input().split())
if A != B:
    x = max(A, B)
    ans = 2 * x - 1
else:
    ans = 2 * A
print(ans)
Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
if a==b:
  print(a*(a-1))
else:
  if a<b:
    print(b*(b-1))
  else:
    print(a*(a-1))

Failing test case input:
-11 -11

Expected output:
-22


Actual output:
132


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
if a==b:
  print(2*a)
else:
  if a<b:
    print(b+(b-1))
  else:
    print(a+(a-1))

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split())
X=int(0)
for i in range(2):
    if A>B:
        X+=int(A)
        A=A-1
    else:
        X+=int(B)
        B=B-1
    print(X)


print(X)

Failing test case input:
11 011

Expected output:
22


Actual output:
11
22
22


Fixed submission (verdict: Accepted):
A,B=map(int,input().split())
X=int(0)
for i in range(2):
    if A>B:
        X+=int(A)
        A=A-1
    else:
        X+=int(B)
        B=B-1
  
print(X)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
print(max(a + a - 1, a + b))

Failing test case input:
-1 53

Expected output:
105


Actual output:
52


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
print(max(max(a, b) + max(a, b) - 1, a + b))

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
i = list(map(int, input().split()))

if i[0] == i[1]:
    num = i[0] + i[0] - 1
else:
    max = max([i[0], i[1]])
    num = max + max-1


Failing test case input:
45 -1

Expected output:
89


Actual output:

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

if i[0] == i[1]:
    num = i[0]*2
else:
    max = max([i[0], i[1]])
    num = max + max-1

print(num)

Problem: p03071
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A,B = (int(x) for x in input().split())
ans = 0
for i in range(2):
  if A > B:
    ans += A
    A -= 1
  else:
    ans += B
    B -= B
print(ans)

Failing test case input:
-11 -11

Expected output:
-22


Actual output:
-11


Fixed submission (verdict: Accepted):
A,B = (int(x) for x in input().split())
ans = 0
for i in range(2):
  if A > B:
    ans += A
    A -= 1
  else:
    ans += B
    B -= 1
print(ans)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
n = 0
if a > b:
    n += a
    a -= 1
elif a < b:
	n += b
	b -= 1

if a > b:
    n += a
else:
    n += b

print(n)

Failing test case input:
-10 -10

Expected output:
-20


Actual output:
-10


Fixed submission (verdict: Accepted):
a,b = map(int, input().split( ))
n = 0
if a > b:
    n += a
    a -= 1
else:
    n += b
    b -= 1
    
if a > b:
    n += a
    print(n)
else:
    n += b
    print(n)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int,input().split())
if a > b:
  	print(a * 2)
if b > a:
  	print(b * 2)
else:
  	print(a + b)
  	

Failing test case input:
-11 -13

Expected output:
-23


Actual output:
-22
-24


Fixed submission (verdict: Accepted):
a, b = map(int,input().split())
if a > b:
  	print(a + a - 1)
elif b > a:
  	print(b + b - 1)
else:
  	print(a + b)
Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split())
print(max(A*(A-1),A*B,B*(B-1)))


Failing test case input:
-6 69

Expected output:
137


Actual output:
4692


Fixed submission (verdict: Accepted):
A,B=map(int,input().split())
print(max(A+(A-1),A+B,B+(B-1)))

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B= map(int,input().split())
if A > B:
 print(A + A - 1)
else:
 print(B + B - 1)

Failing test case input:
11 011

Expected output:
22


Actual output:
21


Fixed submission (verdict: Accepted):
A, B= map(int,input().split())
if A > B:
 print(A + A - 1)
elif B > A:
 print(B + B - 1)
else:
 print(A + B)

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

def main():
	A,B = map(int,input().split())
	res = A if A >= B else B
	res += A-1 if A-1>=B else B
	print(res)

if __name__ == "__main__" :
	main()

Failing test case input:
-134 -8

Expected output:
-17


Actual output:
-16


Fixed submission (verdict: Accepted):

def main():
	A,B = map(int,input().split())
	res = A if A >= B else B
	if res == A :
		A -= 1
	else :
		B -= 1
	res += A if A>=B else B
	print(res)

if __name__ == "__main__" :
	main()

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int,input().split())

int(A)
int(B)
sum = 0

for i in range(2):
    if A > B:
        sum = sum + A
        A -= 1
    elif A < B:
        sum = sum + B
        B -= 1

print(sum)

Failing test case input:
-10 -10

Expected output:
-20


Actual output:
0


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

int(A)
int(B)
sum = 0

for i in range(2):
    if A > B:
        sum = sum + A
        A =  A - 1
    elif A < B:
        sum = sum + B
        B = B - 1
    else:
        sum = sum + A

print(sum)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
result_a = a + a - 1
result_b = b + b - 1
result_a_b = a + b
if (result_a > result_b) and (result_a > result_a_b):
    print(result_a)
elif (result_b > result_a) and (result_b > result_a_b):
    print(result_b)
elif (result_a_b > result_a) and (result_a_b > result_b):
    print(result_a_b)

Failing test case input:
-6 -5

Expected output:
-11


Actual output:

Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
result_a = a + a - 1
result_b = b + b - 1
result_a_b = a + b
if (result_a_b >= result_a) and (result_a_b >= result_b):
    print(result_a_b)
elif (result_a >= result_b) and (result_a >= result_a_b):
    print(result_a)
elif (result_b >= result_a) and (result_b >= result_a_b):
    print(result_b)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int,input().split())
if a > b:
  	print(a * 2 - 1)
if b > a:
  	print(b * 2 - 1)
else:
  	print(a + b)
  	


Failing test case input:
35 001

Expected output:
69


Actual output:
69
36


Fixed submission (verdict: Accepted):
a, b = map(int,input().split())
if a > b:
  	print(a + a - 1)
elif b > a:
  	print(b + b - 1)
else:
  	print(a + b)
Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
aa, bb = list(map(int, input().split()))
if aa>bb:
    print(2*aa+1)
elif aa<bb:
    print(2*bb+1)
else:
    print(2*aa)

Failing test case input:
-6 69

Expected output:
137


Actual output:
139


Fixed submission (verdict: Accepted):
aa, bb = list(map(int, input().split()))
if aa>bb:
    print(2*aa-1)
elif aa<bb:
    print(2*bb-1)
else:
    print(2*aa)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().split())

pattern1 = A+A-1
pattern2 = A+B-1
pattern3 = B+B-1

print(max(pattern1, pattern2, pattern3))

Failing test case input:
-5 -5

Expected output:
-10


Actual output:
-11


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

pattern1 = A+A-1
pattern2 = A+B
pattern3 = B+B-1

print(max(pattern1, pattern2, pattern3))

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

ma = max(n)
print(2 * ma - 1)

Failing test case input:
-7 -7

Expected output:
-14


Actual output:
-15


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

ma = max(n)
if n[0] == n[1]:
  print(2 * ma)
else:
  print(2 *ma - 1)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
result_a = a = a
result_b = b + b
result_a_b = a + b
if result_a > result_b:
    if result_a > result_a_b:
        print(result_a)
elif result_b > result_a:
    if result_b > result_a_b:
        print(result_b)
else:
    print(result_a_b)

Failing test case input:
-2 19

Expected output:
37


Actual output:
38


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
result_a = a + a - 1
result_b = b + b - 1
result_a_b = a + b
if (result_a_b >= result_a) and (result_a_b >= result_b):
    print(result_a_b)
elif (result_a >= result_b) and (result_a >= result_a_b):
    print(result_a)
elif (result_b >= result_a) and (result_b >= result_a_b):
    print(result_b)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a ,b = map(int, input().split())

if a==b:
    print(a * 2)
else:
    print((a*2)-1)

Failing test case input:
-1 46

Expected output:
91


Actual output:
-3


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

if a==b:
    print(a * 2)
else:
    c = max([a,b])
    print((c*2)-1)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
if abs(a-b) < 2:
    print(a+b)
else:
    print(a + a-1)

Failing test case input:
-1 53

Expected output:
105


Actual output:
-3


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
if abs(a-b) <= 1:
    print(a+b)
elif a > b:
    print(a + a-1)
else:
    print(b + b-1)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split())
l=[2*A-1,A+B,2*B-1]
print(l[0])


Failing test case input:
-13 -10

Expected output:
-21


Actual output:
-27


Fixed submission (verdict: Accepted):
A,B=map(int,input().split())
l=[2*A-1,A+B,2*B-1]
l.sort()
print(l[-1])
Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
i = list(map(int, input().split()))

if i[0] == i[1]:
    num = i[0] + i[0] - 1
else:
    max = max([i[0], i[1]])
    num = max + max-1

print(num)


Failing test case input:
11 011

Expected output:
22


Actual output:
21


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

if i[0] == i[1]:
    num = i[0]*2
else:
    max = max([i[0], i[1]])
    num = max + max-1

print(num)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int, input().split())
total = max(a,b)
print(total+(total-1))

Failing test case input:
-7 -7

Expected output:
-14


Actual output:
-15


Fixed submission (verdict: Accepted):
a,b = map(int, input().split())
total = max(a,b)
print(total*2 if a == b else total+(total-1))

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
buttons = input().split(' ')
but1 = 0
but2 = 0
a = int(buttons[0])
b = int(buttons[1])

if a >= b:
    but1 = a - 1
else:
    but1 = b - 1

if a >= b:
    but2 = a
else:
    but2 = b

print (but1 + but2)

Failing test case input:
-7 -7

Expected output:
-14


Actual output:
-15


Fixed submission (verdict: Accepted):
buttons = input().split(' ')
but1 = 0
but2 = 0
a = int(buttons[0])
b = int(buttons[1])

if a >= b:
    but2 = a - 1
else:
    but2 = b - 1


if a > b:
    print (a + but2) 
elif a == b:
    print(a + but2 + 1)
else:
    print(b + but2)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
if a == b:
    print(a+b)
else:
    c = b-1
    print(b+c)


Failing test case input:
-4 -16

Expected output:
-9


Actual output:
-33


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
if a == b:
    print(a+b)
elif a > b:
    print(a+a-1)
else:
    print(b+b-1)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().split())

ans = 0

for i in range(2):
  if B > A:
    ans += B
  else:
    ans += A
 
print(ans)

Failing test case input:
-6 69

Expected output:
137


Actual output:
138


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

ans = 0

for i in range(2):
  if B > A:
    ans += B
    B -= 1
  else:
    ans += A
    A -= 1
 
print(ans)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())

if a >= b + 1:
  coins = 2 * a - 1
elif b + 1 >= a:
  coins = 2 * b - 1
else:
  coins = a + b
  
print(coins)

Failing test case input:
-7 -7

Expected output:
-14


Actual output:
-15


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
coins=0

for i in range(2):
  if a > b:
    coins += a
    a-=1
  else:
    coins += b
    b-=1
  
print(coins)
Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
  if 'get_ipython' not in globals():  
    a,b = map(int,input().split())
  else:
    a,b = 3,11
    s = "test"
 
  def get(a,b, count, ans):
    if count == 0:
      return(ans)
    
    if a >= b:
      print(a, b, ans)
      return(get(a-1, b, count -1, ans + a))
    else:
      return(get(a, b-1, count -1, ans + b))
  
  print(get(a, b, 2, 0))
  
main()

Failing test case input:
11 011

Expected output:
22


Actual output:
11 11 0
22


Fixed submission (verdict: Accepted):
def main():
  if 'get_ipython' not in globals():  
    a,b = map(int,input().split())
  else:
    a,b = 5,3
    s = "test"
 
  
  def get(a,b, count, ans):
    if count == 0:
      return(ans)
    
    if a >= b:
      return(get(a-1, b, count -1, ans + a))
    else:
      return(get(a, b-1, count -1, ans + b))
  
  print(get(a, b, 2, 0))
  
main()

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


def main():
    a, b = map(int, input().split())

    max = a
    if a > b:
        max = b
    
    if a == b:
        print (2 * a)
    
    print (2*max - 1)

if __name__ == "__main__":
    main()

Failing test case input:
-5 -5

Expected output:
-10


Actual output:
-10
-11


Fixed submission (verdict: Accepted):


def main():
    a, b = map(int, input().split())

    max = a
    if a < b:
        max = b
    
    if a == b:
        print (2 * a)
    else:
        print (2 * max - 1)

if __name__ == "__main__":
    main()

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x=list(map(int,input().split()))
x.sort()
if x[0]-x[1]>=2:
  print(2*x[0])
else:
  print(x[0]+x[1])

Failing test case input:
1 52

Expected output:
103


Actual output:
53


Fixed submission (verdict: Accepted):
x=list(map(int,input().split()))
x.sort(reverse=True)
if x[0]-x[1]>=2:
  print(2*x[0]-1)
else:
  print(x[0]+x[1])

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
i = list(map(int, input().split()))
if i[0]>i[1] and i[0]-i[1]>=2:
	print(2*(i[0])-1)
elif i[1]>i[0] and i[1]-i[0]>=2:
	print(2*(i[1])-1)
else:
	i[1]+i[0]

Failing test case input:
11 011

Expected output:
22


Actual output:

Fixed submission (verdict: Accepted):
i = list(map(int, input().split()))
if i[0]>i[1] and i[0]-i[1]>=2:
	print(2*(i[0])-1)
elif i[1]>i[0] and i[1]-i[0]>=2:
	print(2*(i[1])-1)
else:
	print(i[1]+i[0])

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().split())

print(max([A + B, A + A - 1, A + B - 1, B + A - 1]))

Failing test case input:
-38 -6

Expected output:
-13


Actual output:
-44


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

print(max([A + B, A + A - 1, A + B - 1, B + A - 1, B + B - 1]))

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())

print(a+b)

Failing test case input:
1 31

Expected output:
61


Actual output:
32


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

print(max(a+b, a*2-1,b*2-1))
Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int,input().split())

if A == B:
    print(2*A)
else:
    print(2*A-1)

Failing test case input:
-6 69

Expected output:
137


Actual output:
-13


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

if A == B:
    print(2*A)
else:
    print(max(A,B)*2 - 1)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
 
ans = 0
a = max(a,b)
b = min(a,b)
ans += a
a -= 1
a = max(a,b)
b = min(a,b)
ans += a
 
print(ans)

Failing test case input:
1 31

Expected output:
61


Actual output:
62


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
 
ans = 0
c = max(a,b)
d = min(a,b)
ans += c
c -= 1
e = max(c,d)
f = min(a,b)
ans += e
 
print(ans)

Problem: p03071
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b=input().split()
a=int(a)
b=int(b)
if a-b>=2:
  print(2*a-1)
if b-a>=2:
  print(2*b-1)
else:
  print(a+b)

Failing test case input:
-7 -10

Expected output:
-15


Actual output:
-15
-17


Fixed submission (verdict: Accepted):
a,b=input().split()
a=int(a)
b=int(b)
if a-b>=2:
  print(2*a-1)
if b-a>=2:
  print(2*b-1)
if -2<a-b<2:
  print(a+b)

Problem: p03071
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b = map(int,input().split())

count = 0
if a>b:
    count += a
    a -= 1
else:
    count += b
    a -= 1
if a>b:
    count += a
    a -= 1
else:
    count += b
    a -= 1
print(count)

Failing test case input:
-134 -8

Expected output:
-17


Actual output:
-16


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

count = 0
if a>b:
    count += a
    a -= 1
else:
    count += b
    b -= 1
if a>b:
    count += a
    a -= 1
else:
    count += b
    b -= 1
print(count)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())

num = 0
if a>=b:
	num = a*(a-1)
else:
	num = b*(b-1)
	
print(num)

Failing test case input:
35 001

Expected output:
69


Actual output:
1190


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

num = 0
if a>b:
	num = a + (a-1)
elif a<b:
	num = b + (b-1)
else:
	num = a + b
	
print(num)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split())
print(max(2*A-1,2*B-1))

Failing test case input:
-10 -10

Expected output:
-20


Actual output:
-21


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

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int, input().split())

if a >= b + 2:
    print(a + (a-1))
else:
    print(a + b)

Failing test case input:
-1 46

Expected output:
91


Actual output:
45


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

if a > b:
    print(a + (a-1))
elif a < b:
    print(b + (b-1))
else:
    print(a + b)
Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

def main():
	A,B = map(int,input().split())
	res = A if A >= B else B
	A -= 1 if res == A else 0
	B -= 1 if res == B else 0
	res += A-1 if A-1>=B else B
	print(res)

if __name__ == "__main__" :
	main()

Failing test case input:
45 -1

Expected output:
89


Actual output:
88


Fixed submission (verdict: Accepted):

def main():
	A,B = map(int,input().split())
	res = A if A >= B else B
	if res == A :
		A -= 1
	else :
		B -= 1
	res += A if A>=B else B
	print(res)

if __name__ == "__main__" :
	main()

Problem: p03071
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
a,b=map(int,input().split())
if a==b:
  print(2*a)
else:
  print(2*a-1)

Failing test case input:
-6 13

Expected output:
25


Actual output:
-13


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
if a==b:
  print(2*a)
else:
  print(2*max(a,b)-1)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
result_a = a + a - 1
result_b = b + b - 1
result_a_b = a + b
if result_a > result_b:
    if result_a > result_a_b:
        print(result_a)
elif result_b > result_a:
    if result_b > result_a_b:
        print(result_b)
else:
    print(result_a_b)

Failing test case input:
-6 -5

Expected output:
-11


Actual output:

Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
result_a = a + a - 1
result_b = b + b - 1
result_a_b = a + b
if (result_a_b >= result_a) and (result_a_b >= result_b):
    print(result_a_b)
elif (result_a >= result_b) and (result_a >= result_a_b):
    print(result_a)
elif (result_b >= result_a) and (result_b >= result_a_b):
    print(result_b)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
if a > b:
  print(a + a -1)
else:
  print(b + b -1)

Failing test case input:
-11 -11

Expected output:
-22


Actual output:
-23


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
if a > b:
  print(a + a -1)
elif a == b:
  print(a + b)
else:
  print(b + b -1)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = (int(x) for x in input().split())

m = max(A, B)
m = m*2 +1;

print(m)

Failing test case input:
-2 -22

Expected output:
-5


Actual output:
-3


Fixed submission (verdict: Accepted):
A, B = (int(x) for x in input().split())

if A == B:
	print(A+B)
else :
	m = max(A, B)
	m = m*2 - 1
	print(m)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int,input().split())
if A == B:
  print(A + B)
else:
  print(A + A -1)

Failing test case input:
-6 13

Expected output:
25


Actual output:
-13


Fixed submission (verdict: Accepted):
A,B = map(int,input().split())
if A == B:
  print(A + B)
elif A > B:
  print(A + A - 1)
else:
  print(B + B - 1)
Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=list(input().split())
a.sort()
if int(a[1])!=int(a[0]):
	print (2*int(a[1])-1)
else:
	print (2*int(a[1]))

Failing test case input:
-11 -13

Expected output:
-23


Actual output:
-27


Fixed submission (verdict: Accepted):
a_str=input().split()
a=[int(i) for i in a_str]
a.sort()

if int(a[1]) != int(a[0]):
	print (2*int(a[1])-1)
else:
	print (int(a[0]) + int(a[1]))

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().split())

print (max(A, B) * 2 - 1)


Failing test case input:
-5 -5

Expected output:
-10


Actual output:
-11


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

print (max(A, B) * 2 - 1 if A != B else max(A, B) * 2)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
total=0
A,B = map(int,input().split(" "))
if A>=B:
    tmp=B
    B=A
    A=tmp
total+=B
B=B-1
if A>=B:
    tmp=B
    B=A
    A=tmp
total+=B
print(B)    

Failing test case input:
-2 19

Expected output:
37


Actual output:
18


Fixed submission (verdict: Accepted):
total=0
A,B = map(int,input().split(" "))
if A>=B:
    tmp=B
    B=A
    A=tmp
total+=B
B=B-1
if A>=B:
    tmp=B
    B=A
    A=tmp
total+=B
print(total)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().split())
ans = 0

if A > B:
  ans += A
  A -= 1
else:
  ans += B
  B -= 1
  
print(ans)

Failing test case input:
-10 -10

Expected output:
-20


Actual output:
-10


Fixed submission (verdict: Accepted):
A, B = map(int, input().split())
ans = 0

for i in range(2):
  if A > B:
    ans += A
    A -= 1
  else:
    ans += B
    B -= 1
  
print(ans)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split())
lst=[A,A-1,B,B-1]
lst.sort()
print(lst)
print(lst[-1]+lst[-2])

Failing test case input:
11 011

Expected output:
22


Actual output:
[10, 10, 11, 11]
22


Fixed submission (verdict: Accepted):
A,B=map(int,input().split())
lst=[A,A-1,B,B-1]
lst.sort()
print(lst[-1]+lst[-2])

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().split())

if abs(A - B) >= 2:
    print(A + A - 1)
else:
    print(A + B)


Failing test case input:
-38 -6

Expected output:
-13


Actual output:
-77


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

if abs(A - B) >= 2:
    max_num = max(A, B)
    print(max_num + max_num - 1)
else:
    print(A + B)

Problem: p03071
Buggy submission (Python (3.4.3), 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 submission (verdict: Accepted):
A,B = map(int,input().split())
if A == B:
  print(2*A)
else:
  print(max(2*A-1,2*B-1))
Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = list(map(int, input().split()))

ans = max(A, B) * 2 - 1

print(ans)

Failing test case input:
-7 -7

Expected output:
-14


Actual output:
-15


Fixed submission (verdict: Accepted):
A, B = list(map(int, input().split()))

if A != B:
  ans = max(A, B) * 2 - 1
  
else:
  ans = A * 2

print(ans)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
if(a-1)>b:
  print(a*2-1)
else:
  print(a+b)

Failing test case input:
-6 13

Expected output:
25


Actual output:
7


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
if(a-1)>b:
  print(a*2-1)
elif (b-1)>a:
  print(2*b-1)
else:
  print(a+b)

Problem: p03071
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b=map(int,input().split())
if a>b and a-b>2:
  print(2*a-1)
elif a>b and a-b<2:
  print(a+b)
elif b>a and b-a>2:
  print(2*b-1)
elif b>a and b-a<2:
  print(a+b)
elif a==b:
  print(a+b)

Failing test case input:
-11 -13

Expected output:
-23


Actual output:

Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
if a>b and a-b>=2:
  print(2*a-1)
elif a>b and a-b<2:
  print(a+b)
elif b>a and b-a>=2:
  print(2*b-1)
elif b>a and b-a<2:
  print(a+b)
elif a==b:
  print(a+b)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
c=max(a,b)
if(a!=b):
    print(a+a-1)
else:
    print(a+b)

Failing test case input:
1 31

Expected output:
61


Actual output:
1


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
c=max(a,b)
if(a!=b):
    print(c+c-1)
else:
    print(a+b)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int,input().split())

print(max(2*A-1, A-B, 2*B+1))


Failing test case input:
-13 -10

Expected output:
-21


Actual output:
-3


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

print(max(2*A-1, A+B, 2*B-1))

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a_bt, b_bt = map(int, input().split())
result = a_bt > b_bt
sum = a_bt if result else b_bt
result = a_bt - 1 > b_bt if result else a_bt > b_bt - 1
sum += a_bt - 1 if result else b_bt - 1

print(sum)


Failing test case input:
-6 -6

Expected output:
-12


Actual output:
-13


Fixed submission (verdict: Accepted):
a_bt, b_bt = map(int, input().split())
result = a_bt > b_bt
sum = a_bt if result else b_bt
a_bt = a_bt - 1 if result else a_bt
b_bt = b_bt - 1 if not result else b_bt
result = a_bt > b_bt
sum += a_bt if result else b_bt

print(sum)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
cnt = 0
for i in range(2):
  if a >= b:
    cnt += a
    a -= 1
  elif a <= b:
    cnt *= b
    b -= 1


Failing test case input:
-7 -10

Expected output:
-15


Actual output:

Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
cnt = 0
for i in range(2):
  if a >= b:
    cnt += a
    a -= 1
  elif a <= b:
    cnt += b
    b -= 1
print(cnt)
Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())

n = 2
total = 0
while n > 0:
  if a > b:
    total=total+a
  else:
    total=total+b
  n-=1
print(total)

Failing test case input:
-1 65

Expected output:
129


Actual output:
130


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

n = 2
total = 0
while n > 0:
  if a > b:
    total=total+a
    a-=1
  else:
    total=total+b
    b-=1
  n-=1
print(total)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
if a > b:print(2*b-1)
elif b < a: print(2*a-1)
else:print(a+b)


Failing test case input:
-2 -22

Expected output:
-5


Actual output:
-45


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
if a > b:print(2*a-1)
elif b > a: print(2*b-1)
else:print(a+b)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x=list(map(int,input().split()))
x.sort(reverse=True)
if x[0]-x[1]>=2:
  print(2*x[0])
else:
  print(x[0]+x[1])

Failing test case input:
-47 -9

Expected output:
-19


Actual output:
-18


Fixed submission (verdict: Accepted):
x=list(map(int,input().split()))
x.sort(reverse=True)
if x[0]-x[1]>=2:
  print(2*x[0]-1)
else:
  print(x[0]+x[1])

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int,input().split())
print(max(A+A-1,A+B-1,B+B-1))


Failing test case input:
-10 -10

Expected output:
-20


Actual output:
-21


Fixed submission (verdict: Accepted):
A,B = map(int,input().split())
print(max(A+A-1,A+B,B+B-1))

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int,input().split())
tmp=0
cnt=0

while tmp<3:
  if A > B:
    cnt+=A
    A-=1
    tmp+=1
  elif A < B:
    cnt+=B
    B-=1
    tmp+=1
  else:
    cnt+=A
    A-=1
    tmp+=1
print(cnt)
  


Failing test case input:
-13 -10

Expected output:
-21


Actual output:
-33


Fixed submission (verdict: Accepted):
A,B = map(int,input().split())
tmp=0
cnt=0

while tmp<2:
  if A > B:
    cnt+=A
    A-=1
    tmp+=1
  elif A < B:
    cnt+=B
    B-=1
    tmp+=1
  else:
    cnt+=A
    A-=1
    tmp+=1
print(cnt)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int, input().split())
if A>B:
    print(A+A-1)
elif B<A:
    print(B+B-1)
else:
    print(A+B)

Failing test case input:
-134 -8

Expected output:
-17


Actual output:
-142


Fixed submission (verdict: Accepted):
A,B = map(int, input().split())
if A>B:
    print(A+A-1)
elif B>A:
    print(B+B-1)
else:
    print(A+B)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
if a > b:
	print(a+b-1)
else:
	if a == b:
		print(a+b)
	else:
		print(b+b-1)

Failing test case input:
-2 -22

Expected output:
-5


Actual output:
-25


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
if a > b:
	print(a+a-1)
else:
	if a == b:
		print(a+b)
	else:
		print(b+b-1)
Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

a, b = map(int, input().split())
if a == b:
    print(a*2-1)
else:
    print(max(a,b)*2-1)

Failing test case input:
-7 -7

Expected output:
-14


Actual output:
-15


Fixed submission (verdict: Accepted):

a, b = map(int, input().split())
if a == b:
    print(a*2)
else:
    print(max(a,b)*2-1)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
if a<b:
  a,b=b,a
ans=a
a-=1
if a<b:
  a,b=b,a
ans+=a

Failing test case input:
-6 69

Expected output:
137


Actual output:

Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
if a<b:
  a,b=b,a
ans=a
a-=1
if a<b:
  a,b=b,a
ans+=a
print(ans)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
print(max(a*(a-1),a*b,b*(b-1)))

Failing test case input:
-1 53

Expected output:
105


Actual output:
2756


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
print(max(a+(a-1),a+b,b+(b-1)))

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().rstrip().split())
print(max(A, B)*2 -1)

Failing test case input:
-10 -10

Expected output:
-20


Actual output:
-21


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

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input().split()
 
if int(s[0]) < int(s[1]):
  s1 = int(s[0])
  s2 = int(s[1])
else:
  s1 = int(s[1])
  s2 = int(s[0])
  
result = 0
if (s2-s1) > 2:
  result = s2*2 - 1
else:
  result = s2 + s1
 
print(result)

Failing test case input:
-11 -13

Expected output:
-23


Actual output:
-24


Fixed submission (verdict: Accepted):
s = input().split()
 
if int(s[0]) < int(s[1]):
  s1 = int(s[0])
  s2 = int(s[1])
else:
  s1 = int(s[1])
  s2 = int(s[0])
  
result = 0
if (s2-s1) >= 2:
  result = s2*2 - 1
else:
  result = s2 + s1
 
print(result)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int , input().split())

if A==B:
    print(A*2)
else:
    print(2*A-1)

Failing test case input:
1 31

Expected output:
61


Actual output:
1


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

if A==B:
    print(A*2)
else:
    print(2*max(A,B)-1)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=list(map(int,input().split()))
if a==b:
    print(a*2)
else:
    if a<b:
        print(a*2-1)
    else:print(a*2-1)

Failing test case input:
-13 -10

Expected output:
-21


Actual output:
-27


Fixed submission (verdict: Accepted):
a,b=list(map(int,input().split()))
if a==b:
    print(a*2)
else:
    if a<b:
        print(b*2-1)
    else:print(a*2-1)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split())
s=0
if A > B:
    s=A+(A-1)
else:
    s=B+(B+1)
print(s)

Failing test case input:
-7 -7

Expected output:
-14


Actual output:
-13


Fixed submission (verdict: Accepted):
A,B=map(int,input().split())
s=0
if A > B:
    s=A+(A-1)
elif A < B:
    s=B+(B-1)
else:
    s=A+B
print(s)
Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
ab=[a,(a-1),b,(b-1)]
ab.reverse()
print(ab[0]+ab[1])

Failing test case input:
-10 -10

Expected output:
-20


Actual output:
-21


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
ab=[a,(a-1),b,(b-1)]
ab.sort()
print(ab[2]+ab[3])

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())

l_button = max([a,b])

l_button += (l_button-1)

print(l_button)   

Failing test case input:
-7 -7

Expected output:
-14


Actual output:
-15


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

l_button = max([a,b])

if a == b:
  l_button += l_button
else:  
  l_button += (l_button-1)

print(l_button)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int, input().split())
if a != b:
    x= a*2 -1
else:
    x =a*2
print(x)


Failing test case input:
-3 47

Expected output:
93


Actual output:
-7


Fixed submission (verdict: Accepted):
a,b = map(int, input().split())
if a != b:
    x= max([a,b])*2 -1
else:
    x =a*2
print(x)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=list(map(int,input().split()))
C=0
for i in range(1):
    if A>B:
        C+=A
        A=A-1
    else:
        C+=B
        B=B-1
print(C)

Failing test case input:
-4 -16

Expected output:
-9


Actual output:
-4


Fixed submission (verdict: Accepted):
A,B=list(map(int,input().split()))
C=0
for i in range(2):
    if A>B:
        C+=A
        A=A-1
    else:
        C+=B
        B=B-1
print(C)
Problem: p03552
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,z,w=[int(x) for x in input().split()]

a=[int(x) for x in input().split()]

if(n==1):
  print(abs(a[0]-w))
else:
  print(min(abs(a[-1]-w),abs(a[-1]-a[-2])))

Failing test case input:
3 011 1101
1 110 110

Expected output:
991


Actual output:
0


Fixed submission (verdict: Accepted):
n,z,w=[int(x) for x in input().split()]
 
a=[int(x) for x in input().split()]
 
if(n==1):
  print(abs(a[0]-w))
else:
  print(max(abs(a[-1]-w),abs(a[-1]-a[-2])))

Problem: p03552
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, Z, W = map(int, input().split())
a = list(map(int, input().split()))
ans = max(abs(Z-W), abs(a[N-1]-W))
if N > 1:
  ans = max(ans,abs(a[N-2]-a[N-1]))
print(ans)

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

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
N, Z, W = map(int, input().split())
a = list(map(int, input().split()))
ans = abs(a[N-1]-W)
if N > 1:
  ans = max(ans,abs(a[N-2]-a[N-1]))
print(ans)

Problem: p03552
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N,Z,W=map(int,input().split())
a=[int(i) for i in input().split()]
if N==1:
  print(W-a[0])
else:
  print(max(abs(W-a[-1]),abs(a[-2]-a[-1])))

Failing test case input:
1 1 1
1010000000

Expected output:
1009999999


Actual output:
-1009999999


Fixed submission (verdict: Accepted):
N,Z,W=map(int,input().split())
a=[int(i) for i in input().split()]
if N==1:
  print(abs(W-a[0]))
else:
  print(max(abs(W-a[-1]),abs(a[-2]-a[-1])))

Problem: p03552
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,Z,W=map(int,input().split())
A=list(map(int, input().split()))
if N==1:
  print(abs(A[-1]-W))
elif N==2:
  print(abs(A[-1]-W),abs(A[0]-A[-1]))
else:
  a=abs(A[-1]-W)
  b=abs(max(A[:N-1])-A[-1])
  print(max(a,b))

Failing test case input:
5 -1 1
0 -1 3 1 1

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
N,Z,W=map(int,input().split())
A=list(map(int, input().split()))
if N==1:
  print(abs(A[-1]-W))
else:
  a=abs(A[-1]-W)
  b=abs(A[-2]-A[-1])
  print(max(a,b))

Problem: p03552
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N,Z,W=list(map(int,input().split()))
i=0
a=list(map(int,input().split()))
b=math.fabs(a[N-1]-W)
c=math.fabs(a[N-2]-a[N-1])
print(max(b,c))

Failing test case input:
3 001 100
6 1000 110

Expected output:
890


Actual output:
890.0


Fixed submission (verdict: Accepted):
import math
N,Z,W=list(map(int,input().split()))
a=list(map(int,input().split()))
b=math.fabs(a[N-1]-W)
c=math.fabs(a[N-2]-a[N-1])
print(int(max(b,c)))
Problem: p03552
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,Z,W = map(int,input().split())
A = list(map(int,input().split()))
abs_last = [abs(A[i]-A[N-1])for i in range(N)]

max_abs_last = max(abs_last)
if max_abs_last >= abs(A[-1]-W):
  print(max_abs_last)
else:
  print(abs(A[-1]-W))

Failing test case input:
5 1 1
0 -3 3 1 1

Expected output:
0


Actual output:
4


Fixed submission (verdict: Accepted):
N,Z,W = map(int,input().split())
A = list(map(int,input().split()))
if N == 1:
  print(abs(A[0]-W))
  exit()
  
if abs(A[-1]-A[-2]) >= abs(A[-1]-W):
  print(abs(A[-1]-A[-2]))
else:
  print(abs(A[-1]-W))

Problem: p03552
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x, y = map(int, input().split())
a = list(map(int, input().split()))

if n == 1:
    print(abs(a[0] - y))
else:
    print(max(abs(a[0] - y), abs(a[-1] - a[-2])))


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

Expected output:
9


Actual output:
8


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

if n == 1:
    print(abs(a[-1] - y))
else:
    print(max(abs(a[-1] - y), abs(a[-1] - a[-2])))

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


def main():
    N, Z, W = map(int, input().split(" "))
    a = list(map(int, input().split(" ")))
    
    if N == 1:
        print(abs(a[0] - W))
    else:
        print(max(abs(a[0] - W), abs(a[N - 2] - a[N - 1])))

if __name__ == '__main__':
    main()


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

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):


def main():
    N, Z, W = map(int, input().split(" "))
    a = list(map(int, input().split(" ")))
    
    if N == 1:
        print(abs(a[0] - W))
    else:
        print(max(abs(a[N - 1] - W), abs(a[N - 2] - a[N - 1])))

if __name__ == '__main__':
    main()
Problem: p03890
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

N = int(sys.stdin.readline().strip())

array = [None for _ in range(2**N)]
for i in range(int(2**N)):
    array[i] = int(sys.stdin.readline().strip())

for stage in range(N):
    for i in range(int(2**(N-stage-1))):
        tmp = abs(array[i*2] - array[i*2+1])
        array[i*2] = tmp if tmp != 0 else array[i*2]
        

print(array[0])

Failing test case input:
2
2
11
8
0

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
import sys

N = int(sys.stdin.readline().strip())

array = [None for _ in range(2**N)]
for i in range(int(2**N)):
    array[i] = int(sys.stdin.readline().strip())

for stage in range(N):
    for i in range(int(2**(N-stage-1))):
        tmp = abs(array[i*2] - array[i*2+1])
        array[i] = tmp if tmp != 0 else array[i*2]
        

print(array[0])

Problem: p03890
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

N = int(sys.stdin.readline().strip())

array = [None for _ in range(2**N)]
for i in range(int(2**N)):
    array[i] = int(sys.stdin.readline().strip())

for stage in range(N):
    for i in range(int(2**(N-stage-1))):
        array[i*2] = array[i*2] + array[i*2+1]
        

print(array[0])

Failing test case input:
3
2
1
-3
4
0
25
110
1014

Expected output:
873


Actual output:
5


Fixed submission (verdict: Accepted):
import sys

N = int(sys.stdin.readline().strip())

array = [None for _ in range(2**N)]
for i in range(int(2**N)):
    array[i] = int(sys.stdin.readline().strip())

for stage in range(N):
    for i in range(int(2**(N-stage-1))):
        tmp = abs(array[i*2] - array[i*2+1])
        array[i] = tmp if tmp != 0 else array[i*2]
        

print(array[0])

Problem: p03890
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

N = int(sys.stdin.readline().strip())

array = [None for _ in range(2**N)]
for i in range(int(2**N)):
    array[i] = int(sys.stdin.readline().strip())

for stage in range(N):
    for i in range(int(2**(N-stage-1))):
        array[i*2] = abs(array[i*2] - array[i*2+1])
        

print(array[0])


Failing test case input:
2
1
1
43
1

Expected output:
41


Actual output:
1


Fixed submission (verdict: Accepted):
import sys

N = int(sys.stdin.readline().strip())

array = [None for _ in range(2**N)]
for i in range(int(2**N)):
    array[i] = int(sys.stdin.readline().strip())

for stage in range(N):
    for i in range(int(2**(N-stage-1))):
        tmp = abs(array[i*2] - array[i*2+1])
        array[i] = tmp if tmp != 0 else array[i*2]
        

print(array[0])