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


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



gusu = 0
for a in A:
    if a%2 ==0:
        gusu += 1

ans = int((2**gusu) * ( 2**(N-gusu-1) ))
print(ans)

Failing test case input:
1 1
42

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):


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


k = 0
for a in A:
    k += a%2
if ( k ==0 ):
    ans = (3-P)%2 * 2**N
else:
    ans = 2**(N-1)
print(ans)

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

odd = 0
even = 0

for i in range(n):
    if ls[i] % 2 == 0:
        even += 1
    elif ls[i] % 2 == 1:
        odd += 1

if p == 0:
    print((2 ** even) * max(2 ** (odd - 1), 1))
elif p == 1:
    print((2 ** even) * max(2 ** (odd - 1) - 1, 0))

Failing test case input:
45 1
17 43 85 55 74 20 90 94 40 70 2 89 91 50 16 9 14 43 24 66 25 9 89 71 41 16 53 13 61 15 85 72 62 67 42 26 21 66 4 87 59 91 7 20 26

Expected output:
17592186044416


Actual output:
17592183947264


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

odd = 0
even = 0

for i in range(n):
    if ls[i] % 2 == 0:
        even += 1
    elif ls[i] % 2 == 1:
        odd += 1

if p == 0:
    print((2 ** even) * max(2 ** (odd - 1), 1))
elif p == 1:
    if odd == 0:
        print(0)
    else:
        print((2 ** even) * max((2 ** (odd - 1), 1)))

Problem: p03665
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, p = map(int, input().split())
a = [int(i)&1 for i in input().split()]
odd = sum(a)
ans = 0
if odd:
    ans = 2**(n-1)
else:
    ans = 2**n

print(ans)

Failing test case input:
1 1
50

Expected output:
0

Actual output:
2


Fixed submission (verdict: Accepted):
n, p = map(int, input().split())
a = [int(i)&1 for i in input().split()]
odd = sum(a)
ans = 0
if odd:
    ans = 2**(n-1)
else:
    ans = 2**n*(1-p)

print(ans)

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


def input():
    return sys.stdin.readline().strip()


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

odd = sum([a % 2 for a in A])
even = len(A) - odd

ans = (2 ** even) * (2 ** (odd - 1))



Failing test case input:
45 1
17 55 85 55 74 20 90 94 40 70 2 89 91 50 16 9 14 43 24 66 25 9 89 71 41 16 53 13 61 15 85 72 62 67 42 26 36 66 4 87 59 91 4 20 26

Expected output:
17592186044416


Actual output:

Fixed submission (verdict: Accepted):
import sys


def input():
    return sys.stdin.readline().strip()


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

odd = sum([a % 2 for a in A])
even = len(A) - odd

if odd == 0 and P == 1:
    print(0)
elif odd == 0 and P == 0:
    print(2 ** even)
else:
    ans = (2 ** even) * (2 ** (odd - 1))
    print(ans)
Problem: p03665
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,r=map(int,input().split())
c=[i%2for i in list(map(int,input().split()))]
p=sum(c)
print((2**(p-1))*(2**(n-p)))

Failing test case input:
1 1
50

Expected output:
0

Actual output:
1.0


Fixed submission (verdict: Accepted):
n,r=map(int,input().split())
c=[i%2for i in list(map(int,input().split()))]
p=sum(c)
print(0if p==0 and r!=0else(2**n if p==0 and r!=1else (2**(n-1))))

Problem: p03665
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,P=map(int,input().split())
A=list(map(int,input().split()))
for i in range(N):
    A[i]%=2

odds=sum(A)
evens=N-odds 
if odds>0:
    ans=2**evens 
    ans+=2**(odds-1)
    print(ans)
else:
    if P==0:
        print(2**evens)
    else:
        print(0)

Failing test case input:
45 1
11 77 15 77 74 20 125 67 40 70 39 89 91 48 16 24 6 43 24 68 45 9 89 71 41 16 61 13 61 15 85 72 62 71 42 26 36 66 4 87 57 132 4 25 26

Expected output:
17592186044416


Actual output:
10485760


Fixed submission (verdict: Accepted):
N,P=map(int,input().split())
A=list(map(int,input().split()))
for i in range(N):
    A[i]%=2

odds=sum(A)
evens=N-odds 
if odds>0:
    ans=2**evens 
    ans*=2**(odds-1)
    print(ans)
else:
    if P==0:
        print(2**evens)
    else:
        print(0)

Problem: p03665
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,p = map(int,input().split())
l = [0,0]
for i in map(int,input().split()):
  l[i%2] += 1
if p:
  
  print(2**l[0]*2**(l[1]-1))
else:
  
  print(2**l[0]*2**(l[1]-1))

Failing test case input:
1 1
50

Expected output:
0

Actual output:
1.0


Fixed submission (verdict: Accepted):
n,p = map(int,input().split())
l = [0,0]
for i in map(int,input().split()):
  l[i%2] += 1
if p:
  if l[1] == 0:
    print(0)
  else:
    
    print(2**l[0]*2**(l[1]-1))
else:
  if l[1] == 0:
    print(2**l[0])
  else:
    
    print(2**l[0]*2**(l[1]-1))

Problem: p03665
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,P = map(int,input().split())
A = list(map(int,input().split()))
cnt = 0
for i in range(N):
    cnt += A[i]%2
print(2**(N-1))

Failing test case input:
1 1
42

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
N,P = map(int,input().split())
A = list(map(int,input().split()))
cnt = 0
for i in range(N):
    cnt += A[i]%2
if cnt>0:
    print(2**(N-1))
elif P==1:
    print(0)
else:
    print(2**N)
Problem: p03665
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
N, P = sys.stdin.readline().strip().split()
As = sys.stdin.readline().strip().split()
n_even = 0
n_odd = 0
for a in As:
  if int(a)/2 == 0:
    n_even += 1
  else:
    n_odd +=1
v = 2**n_even
if n_odd <= 1:
  v *= (1 if n_odd == P else 0)
else:
  v *= 2**(n_odd -1)
print(v)

Failing test case input:
1 1
67

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
import sys

def biscuit(N, P, As):
    n_even = 0
    n_odd = 0
    for a in As:
      if int(a) % 2 == 0:
        n_even += 1
      else:
        n_odd +=1
    v = 2**n_even
    
    if n_odd == 0:
      v *= (0 if int(P) == 1 else 1)
    else:
      v *= 2**(n_odd -1)
    return v

N, P = sys.stdin.readline().strip().split()
As = sys.stdin.readline().strip().split()
print(biscuit(N, P, As))

Problem: p03665
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,P=map(int,input().split(' '))
A=list(map(int,input().split(' ')))
for i in A:
    if i != 0:
        print(2**(N-1))
        exit()
if P ==0:
    print(2**N)
else:
    print(0)

Failing test case input:
1 1
42

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
N,P=map(int,input().split(' '))
A=list(map(int,input().split(' ')))
for i in A:
    if i%2 != 0:
        print(2**(N-1))
        exit()
if P ==0:
    print(2**N)
else:
    print(0)

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

jug = True
for i in range(n):
    a[i] % 2 == 1
    jug = False
    break

if jug:
    if p == 0:
        print(2 ** n)
    else:
        print(0)

else:
    print(2 * (n - 1))



Failing test case input:
45 1
17 55 85 55 74 20 90 67 40 70 39 89 91 50 16 24 14 43 24 68 25 9 89 71 41 16 53 11 61 15 85 72 62 67 42 26 36 66 4 87 59 91 4 24 26

Expected output:
17592186044416


Actual output:
88


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

jug = True
for i in range(n):
    if a[i] % 2 == 1:
        jug = False
        break

if jug:
    if p == 0:
        print(2 ** n)
    else:
        print(0)
else:
    print(2 ** (n - 1))

Problem: p03665
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,P=map(int,input().split())
*A,=map(int,input().split())

if N==1:
    print(2*(P==A[0]%2))
else:
    print(2**(N-1))

Failing test case input:
1 1
67

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
N,P=map(int,input().split())
*A,=map(int,input().split())

B=[a%2 for a in A]
if sum(B)==0:
    print((P==0)*2**N)
else:
    print(2**(N-1))
Problem: p03665
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
c = list(map(int, input().split()))
e_odd = False
for i in c:
    if i % 2 == 1:
        e_odd = not e_odd
        break
if not e_odd:
    if b == 1:
        print(0)

Failing test case input:
45 1
17 43 85 55 74 20 90 94 40 70 2 89 91 50 16 9 14 43 24 66 25 9 89 71 41 16 53 13 61 15 85 72 62 67 42 26 21 66 4 87 59 91 4 20 26

Expected output:
17592186044416


Actual output:

Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
c = list(map(int, input().split()))
e_odd = False
for i in c:
    if i % 2 == 1:
        e_odd = not e_odd
        break
if not e_odd:
    if b == 1:
        print(0)
    else:
        print(2 ** a)
else:
    print(2 ** (a-1))

Problem: p03665
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,P = map(int,input().split())
A = list(map(int,input().split()))

odd = 0
for v in A:
    if  v % 2:
        odd += 1 
even = N-odd

ans = (2**even)*(2**(odd-1))

print(ans)

Failing test case input:
1 1
42

Expected output:
0


Actual output:
1.0


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

odd = 0
for v in A:
    if  v % 2:
        odd += 1 
even = N-odd
if odd != 0:
    print((2**even)*int(2**(odd-1)))
else:
    if P == 0:
        print(2**N)
    else:
        print(0)

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

jug = True
for i in range(n):
    a[i] % 2 == 1
    jug = False
    break

if jug:
    if p == 0:
        print(2 ** n)
    elif P == 1:
        print(0)
else:
    print(2 ** (n - 1))


Failing test case input:
1 1
42

Expected output:
0


Actual output:
1


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

jug = True
for i in range(n):
    if a[i] % 2 == 1:
        jug = False
        break

if jug:
    if p == 0:
        print(2 ** n)
    else:
        print(0)
else:
    print(2 ** (n - 1))

Problem: p03665
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,P=map(int,input().split())
a=list(map(int,input().split()))
a=list(map(lambda x:x%2,a))
if 1 in a:
    print(2**N)
else:
    if P%2==0:
        print(2**(N-1))
    else:
        print(0)

Failing test case input:
45 1
17 55 85 55 74 20 90 94 40 70 2 89 91 50 16 9 14 43 24 66 25 9 89 71 41 16 53 13 61 15 85 72 62 67 42 26 36 66 4 87 59 91 4 20 26

Expected output:
17592186044416


Actual output:
35184372088832


Fixed submission (verdict: Accepted):
N,P=map(int,input().split())
a=list(map(int,input().split()))
a=list(map(lambda x:x%2,a))
if 1 in a:
    print(2**(N-1))
else:
    if P%2==0:
        print(2**N)
    else:
        print(0)
Problem: p03665
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,P = map(int,input().split())
A = list(map(int,input().split()))
ans = 0
for i in range(N):
  if A[i]%2 != 0:
    print(2**(N-1))
    exit()
  if P == 1:
    print(0)
    exit()
print(2**N)

Failing test case input:
45 1
6 55 85 55 74 20 90 67 40 70 39 89 91 50 16 24 14 43 24 8 25 9 89 45 41 16 3 11 61 15 167 72 62 67 42 26 36 66 4 87 59 91 4 24 4

Expected output:
17592186044416


Actual output:
0


Fixed submission (verdict: Accepted):
N,P = map(int,input().split())
A = list(map(int,input().split()))
odd = 0 
for i in range(N):
  if A[i]%2 != 0:
    odd += 1

if odd == 0:
  if P == 0:
    ans = 2**N
  else:
    ans = 0
else:
  ans = 2**(N-1)
  
print(ans)

Problem: p03665
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,p = map(int,input().split())
a = list(map(int,input().split()))
m = 0
for i in range(n):
    if a[i]%2 == 1:
        m += 1
if m==0 and p==1:
    print(0)
elif m==0 and p==0:
    print(2*(n))
else:
    print(2*(n-1))

Failing test case input:
45 1
6 55 85 55 138 20 90 67 40 70 39 89 91 50 16 24 14 43 24 8 25 9 89 15 66 16 3 11 61 8 167 72 62 67 42 26 36 66 4 140 59 37 4 24 4

Expected output:
17592186044416


Actual output:
88


Fixed submission (verdict: Accepted):
n,p = map(int,input().split())
a = list(map(int,input().split()))
m = 0
for i in range(n):
    if a[i]%2 == 1:
        m += 1
if m==0 and p==1:
    print(0)
elif m==0 and p==0:
    print(2**(n))
else:
    print(2**(n-1))

Problem: p03665
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,p=map(int,input().split());a=list(map(int,input().split()));b=[0,0]
for i in a:b[i%2]+=1
if 0==b[1]:print(2**n)
else:print(2**(n-1))

Failing test case input:
1 1
50

Expected output:
0

Actual output:
2


Fixed submission (verdict: Accepted):
n,p=map(int,input().split());a=list(map(int,input().split()));b=[0,0]
for i in a:b[i%2]+=1
if 0==b[1]:print(2**n*((p+1)%2))
else:print(2**(n-1))

Problem: p03665
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, P = map(int, input().split())
A = list(map(int, input().split()))
a = [i%2 for i in A]
zero = a.count(0)
one = a.count(1)

print( (2**zero) * (2**(max(0, one-1))) )


Failing test case input:
1 1
50

Expected output:
0

Actual output:
2


Fixed submission (verdict: Accepted):
N, P = map(int, input().split())
A = list(map(int, input().split()))
a = [i%2 for i in A]
zero = a.count(0)
one = a.count(1)

if one == 0 and P == 1:
    print(0)
else:
    print( (2**zero) * (2**(max(0, one-1))) )
Problem: p03665
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections
n, p = list(map(int, input().split()))
a = list(map(int, input().split()))
a2 = [ai%2 for ai in a]
a2 = collections.Counter(a2)

if p == 0:
  if a2[1] == 0:
    print(2 ** n)
  else:
    print(2 ** (n - 1))
    
else:
  print(2 ** (n-1))



Failing test case input:
1 1
42

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
import collections
n, p = list(map(int, input().split()))
a = list(map(int, input().split()))
a2 = [ai%2 for ai in a]
a2 = collections.Counter(a2)

if p == 0:
  if a2[1] == 0:
    print(2 ** n)
  else:
    print(2 ** (n - 1))
    
else:
  if a2[1] == 0:
    print(0)
  else:
    print(2 ** (n-1))

Problem: p03665
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,P=map(int,input().split())
A=list(map(int,input().split()))
odd=0
for i in range(N):
  if A[i]%2==1: odd+=1
  break
if odd==0:
  if P==1: print(0)
  else: print(2**N)
else:
  print(2**(N-1))

Failing test case input:
45 1
6 55 85 55 74 20 90 67 40 70 39 89 91 50 16 24 14 43 24 8 25 9 89 45 41 16 3 11 61 15 167 72 62 67 42 26 36 66 4 87 59 91 4 24 4

Expected output:
17592186044416


Actual output:
0


Fixed submission (verdict: Accepted):
N,P=map(int,input().split())
A=list(map(int,input().split()))
odd=0
for i in range(N):
  if A[i]%2==1: odd+=1
if odd==0:
  if P==1: print(0)
  else: print(2**N)
else:
  print(2**(N-1))

Problem: p03665
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
input1 = list(map(int,input("").split(" ")))
A = list(map(int,input("").split(" ")))
N = input1[0]
P = input1[1]

even = []
odd = []
for a in A:
	if a % 2 == 0:
		even.append(a)
	else:
		odd.append(a)

result = 2**len(even) * 2**(len(odd)-1)
print(result)

Failing test case input:
1 1
50

Expected output:
0

Actual output:
1.0


Fixed submission (verdict: Accepted):
input1 = list(map(int,input("").split(" ")))
A = list(map(int,input("").split(" ")))
N = input1[0]
P = input1[1]

even = []
odd = []
for a in A:
	if a % 2 == 0:
		even.append(a)
	else:
		odd.append(a)

if len(odd) == 0:
	if P == 0:
		result = 2**N
	else:
		result = 0
else:
	result = 2**len(even) * 2**(len(odd)-1)

print(result)

Problem: p03665
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,p = map(int,input().split())
a = list(map(int,input().split()))
m = 0
for i in range(n):
    if a[i]%2 == 1:
        m += 1
print((2**(m-1))*(2**(n-m)))


Failing test case input:
1 1
42

Expected output:
0


Actual output:
1.0


Fixed submission (verdict: Accepted):
n,p = map(int,input().split())
a = list(map(int,input().split()))
m = 0
for i in range(n):
    if a[i]%2 == 1:
        m += 1
if m==0 and p==1:
    print(0)
elif m==0 and p==0:
    print(2**(n))
else:
    print(2**(n-1))
Problem: p03665
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,p=map(int,input().split())
A=list(map(int,input().split()))

for i in range(n):
    A[i]%=2
one=A.count(1)
if one==n and p==0:
    print(2**n)
elif one==n and p==1:
    print(0)
else:
    print(2**(n-1))

Failing test case input:
1 1
42

Expected output:
0


Actual output:
1


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

for i in range(n):
    A[i]%=2
zero=A.count(0)
if zero==n and p==0:
    print(2**n)
elif zero==n and p==1:
    print(0)
else:
    print(2**(n-1))

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

def biscuit(N, P, As):
    n_even = 0
    n_odd = 0
    for a in As:
      if int(a) % 2 == 0:
        n_even += 1
      else:
        n_odd +=1
    v = 2**n_even
    print(n_even, n_odd)
    if n_odd == 0:
      v *= (0 if int(P) == 1 else 1)
    else:
      v *= 2**(n_odd -1)
    return v

N, P = sys.stdin.readline().strip().split()
As = sys.stdin.readline().strip().split()
print(biscuit(N, P, As))

Failing test case input:
45 1
7 68 85 77 74 20 90 67 40 70 39 89 91 50 16 24 14 43 24 68 45 9 89 71 41 16 61 13 61 15 85 72 62 71 42 26 36 66 4 87 59 132 4 25 26

Expected output:
17592186044416


Actual output:
23 22
17592186044416


Fixed submission (verdict: Accepted):
import sys

def biscuit(N, P, As):
    n_even = 0
    n_odd = 0
    for a in As:
      if int(a) % 2 == 0:
        n_even += 1
      else:
        n_odd +=1
    v = 2**n_even
    
    if n_odd == 0:
      v *= (0 if int(P) == 1 else 1)
    else:
      v *= 2**(n_odd -1)
    return v

N, P = sys.stdin.readline().strip().split()
As = sys.stdin.readline().strip().split()
print(biscuit(N, P, As))

Problem: p03665
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, P = map(int, input().split())
A = map(int, input().split())

if all(filter(lambda x: x % 2 == 0, A)):
    if P == 0:
        print(0)
    else:
        print(2 ** N)
else:
    n_even = sum(filter(lambda x: x % 2 == 0, A))
    n_odd = N - n_even
    print(2 ** max(0, n_odd - 1) * 2 ** n_even)


Failing test case input:
45 1
17 55 71 55 74 20 90 67 40 121 39 89 35 50 16 38 21 43 5 68 25 9 67 71 41 16 53 11 61 15 85 72 55 13 42 26 36 66 4 87 59 91 4 24 26

Expected output:
17592186044416


Actual output:
35184372088832


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

n_even = len(list(filter(lambda x: x % 2 == 0, A)))
n_odd = N - n_even
ans = (2 ** max(0, n_odd - 1)) * (2 ** n_even)
if P == 1 and n_odd == 0:
    print(0)
else:
    print(ans)
Problem: p03665
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n,p = map(int,input().split())
a = list(map(int,input().split()))
odd = 0
even = 0
for ai in a:
    if(ai%2==0):
        even += 1
    else:
        odd += 1

if(p==1)&(odd==0):
    print(0)
elif(p==1)&(even==0):
    print(2**n)
else:
    print(2**(n-1))

Failing test case input:
1 1
67

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
n,p = map(int,input().split())
a = list(map(int,input().split()))
odd = 0
even = 0
for ai in a:
    if(ai%2==0):
        even += 1
    else:
        odd += 1

if(p==1)&(odd==0):
    print(0)
elif(p==0)&(odd==0):
    print(2**n)
else:
    print(2**(n-1))
Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = list(map(int,input().split()))
print(max(A[0]*2-1,A[1]*2-1,A[0]*A[1]))

Failing test case input:
-134 -12

Expected output:
-25


Actual output:
1608


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

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

Failing test case input:
-13 -10

Expected output:
-21


Actual output:
-20


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

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

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

print(sum_num)


Failing test case input:
-1 46

Expected output:
91


Actual output:
45


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

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

print(sum_num)

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

for _ in range(2):
    print(A, B, max(A, B))
    c += max(A, B)
    if max(A, B) == A:
        A = A - 1
    elif max(A, B) == B:
        B = B - 1

print(c)

Failing test case input:
-6 -6

Expected output:
-12


Actual output:
-6 -6 -6
-7 -6 -6
-12


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

for _ in range(2):
    c += max(A, B)
    if max(A, B) == A:
        A = A - 1
    elif max(A, B) == B:
        B = B - 1

print(c)

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


Failing test case input:
-1 46

Expected output:
91


Actual output:
92


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

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


Failing test case input:
-4 -16

Expected output:
-9


Actual output:
-9
-20


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 = [int(x) for x in input().split()]
print(max(a+b, max(a*2, b*2)))

Failing test case input:
-11 -13

Expected output:
-23


Actual output:
-22


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

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

Failing test case input:
-6 -5

Expected output:
-11


Actual output:
-12


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

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


Failing test case input:
1 52

Expected output:
103


Actual output:
53


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 = map(int, input().split())

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

Failing test case input:
-38 -6

Expected output:
-13


Actual output:
-7


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

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

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






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





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









Failing test case input:
1 52

Expected output:
103


Actual output:
53


Fixed submission (verdict: Accepted):






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





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

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

Failing test case input:
-6 -6

Expected output:
-12


Actual output:
-13


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(2*A)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
print(max(a,b)+max(a,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(max(a,b)+max(a,b)-1)
else:
  print(a+a)

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

Failing test case input:
-1 78

Expected output:
155


Actual output:
-3


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())
if a == b:
  print(2*a)
if a > b:
  print(2*a-1)
else:
  print(2*b-1)

Failing test case input:
-10 -10

Expected output:
-20


Actual output:
-20
-21


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

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

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

Failing test case input:
-4 -16

Expected output:
-9


Actual output:
-9
-33


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 (PyPy3 (2.4.0), verdict: Wrong Answer):
a,b=map(int,input().split())

lista=[]

lista.append(b)
lista.append(b-1)
lista.append(a)
lista.append(a-1)

lista.sort()
print(lista)
print(lista[-1]+lista[-2])

Failing test case input:
-38 -6

Expected output:
-13


Actual output:
[-39, -38, -7, -6]
-13


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

lista=[]

lista.append(b)
lista.append(b-1)
lista.append(a)
lista.append(a-1)

lista.sort()

print(lista[-1]+lista[-2])

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

if A < B:
    print("{}".format(B + B - 1))
elif B > A:
    print("{}".format(A + A - 1))
else:
    print("{}".format(A + B))

Failing test case input:
-11 -13

Expected output:
-23


Actual output:
-24


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

if A < B:
    print("{}".format(B + (B - 1)))
elif A > B:
    print("{}".format(A + (A - 1)))
else:
    print("{}".format(A + A))

Problem: p03071
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys
input = sys.stdin.readline

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

ans = 0

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

print(ans)

Failing test case input:
-1 37

Expected output:
73


Actual output:
36


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline

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

ans = 0

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

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')
elif a == b:
  print('a + b')
else:
  print('b + b - 1')


Failing test case input:
-7 -7

Expected output:
-14


Actual output:
a + b


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 = map(int, input().split())
print(sum(sorted([a, b, a-1, b-1])[:2]))

Failing test case input:
-38 -6

Expected output:
-13


Actual output:
-77


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
print(sum(sorted([a, b, a-1, b-1])[-2:]))
Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = map(int,input().split())

if x == y:
  ans = x * 2
if x > y:
  ans = 2*x - 1
else:
  ans = 2*y - 1

print(ans)

Failing test case input:
-11 -11

Expected output:
-22


Actual output:
-23


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

if x == y:
  ans = x * 2
elif x > y:
  ans = 2*x - 1
else:
  ans = 2*y - 1

print(ans)

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

Failing test case input:
-134 -12

Expected output:
-25


Actual output:
-23


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

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

Failing test case input:
-1 37

Expected output:
73


Actual output:
1332


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, open(0).read().split())
if a <= b:
  c = 2 * b - 1
  print(c)
else:
  c = 2 * a -1
  print(c)

Failing test case input:
-11 -11

Expected output:
-22


Actual output:
-23


Fixed submission (verdict: Accepted):
a, b = map(int, open(0).read().split())
if a < b:
  c = 2 * b - 1
  print(c)
elif a == b:
  c = 2 * a
  print(c)
else:
  c = 2 * a -1
  print(c)

Problem: p03071
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys
input = sys.stdin.readline

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

ans = 0

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

print(ans)

Failing test case input:
-134 -8

Expected output:
-17


Actual output:
-142


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline

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

ans = 0

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

print(ans)

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

Failing test case input:
1 31

Expected output:
61


Actual output:
62


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

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

def MaxCoinCount(A,B):
  ans = 0
  if A > B:
    ans = A + (A - 1)
  elif A < B:
    ans = B + (B + 1)
  else:
    ans = A + B


MaxCoinCount(a, b)

Failing test case input:
-6 -5

Expected output:
-11


Actual output:

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

def MaxCoinCount(A,B):
  ans = 0
  if A > B:
    ans = A + (A - 1)
  elif A < B:
    ans = B + (B - 1)
  else:
    ans = A + B
  return ans


print(MaxCoinCount(A,B))
Problem: p03071
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
A, B = map(int, input().split())
ans = 0
for i in range(2):
  if A < B:
    B -= 1
    ans += B
  else:
    A -= 1
    ans += A
print(ans)

Failing test case input:
-38 -6

Expected output:
-13


Actual output:
-15


Fixed submission (verdict: Accepted):
A, B = map(int, input().split())
ans = 0
for i in range(2):
  if A < B:
    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:
  print(A*2)
else:
  print(max(A, B)*2)

Failing test case input:
-3 -22

Expected output:
-7


Actual output:
-6


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())
cnt = 0
for i in range(2):
  if a >= b:
    cnt += a
    a -= 1
  elif a <= b:
    cnt *= b
    b -= 1
print(cnt)

Failing test case input:
-38 -6

Expected output:
-13


Actual output:
0


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())

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

Failing test case input:
-38 -6

Expected output:
-13


Actual output:
-77


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):
buttons = input().split()
a = int(buttons[0])
b = int(buttons[1])
count = 0

if a > b:
    count += a
    a -= 1
elif b > a:
    count += b
    b -= 1
elif a == b:
    count += a
    a -= 1
        
if a > b:
    count += a
    a -= 1
elif b > a:
    count += b
    b -= 1
elif a == b:
    count += a
    a -= 1

print(a)
print(b)
print(count)


Failing test case input:
45 -1

Expected output:
89


Actual output:
43
-1
89


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

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

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

Failing test case input:
11 011

Expected output:
22


Actual output:
20


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

Failing test case input:
-1 65

Expected output:
129


Actual output:
64


Fixed submission (verdict: Accepted):
def ll():
    return list(map(int,input().split()))
s = ll()
print(max(2*s[0]-1,2*s[1]-1,s[0]+s[1]))

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b= (int(i) for i in input().split())  
a=3
b=5

if a>=b:
    k=a
else:
    k=b

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

print(k)

Failing test case input:
-5 -5

Expected output:
-10


Actual output:
10


Fixed submission (verdict: Accepted):
a, b= (int(i) for i in input().split())  

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

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

print(k)

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

if a > b:
    sum += a
    a -= -1
else:
    sum += b
    b -= 1

print(sum)

Failing test case input:
35 001

Expected output:
69


Actual output:
71


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

if a > b:
    sum += a
    a -= 1
else:
    sum += b
    b -= 1

if a > b:
    sum += a
    a -= 1
else:
    sum += b
    b -= 1

print(sum)

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

aa = a+a-1
bb = b+b-1
ab = a+b-1

lists = [aa,bb,ab]
print(max(lists))

Failing test case input:
11 011

Expected output:
22


Actual output:
21


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

aa = a+a-1
bb = b+b-1
ab = a+b

lists = [aa,bb,ab]
print(max(lists))

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(a+b)

Failing test case input:
-47 -9

Expected output:
-19


Actual output:
-56


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())
C = 0

for i in range(0,2):
    print(i)
    if A >= B:
        C += A
        A -= 1
    elif A < B:
        C += B
        B -= 1
print(C)

Failing test case input:
-7 -10

Expected output:
-15


Actual output:
0
1
-15


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

for i in range(0,2):
    if A >= B:
        C += A
        A -= 1
    elif A < B:
        C += B
        B -= 1
print(C)

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

n = max(A, B)
print(n + n-1)

Failing test case input:
-6 -6

Expected output:
-12


Actual output:
-13


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

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

A, B = [int(i) for i in input().split(' ')]
     
def f():
    res = 0
    if A > B and A - 1 > B:
        res += A + A - 1
    elif B > A and B - 1 > A:
        res += B + B - 1
    else:
        res = A + B
    return res
f()


Failing test case input:
-7 -7

Expected output:
-14


Actual output:

Fixed submission (verdict: Accepted):
A, B = [int(i) for i in input().split(' ')]
     
def f():
    res = 0
    if A > B and A - 1 > B:
        res = A + A - 1
    elif B > A and B - 1 > A:
        res = B + B - 1
    else:
        res = A + B
    return res
print(f())

Problem: p03071
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=list(map(int,input().split()))
count=0
for v in range(2):
    if a[0]>=a[1]:
        count+=a[0]
    else:
        count+=a[1]
print(count)

Failing test case input:
-1 46

Expected output:
91


Actual output:
92


Fixed submission (verdict: Accepted):
a=list(map(int,input().split()))
count=0
for v in range(2):
    if a[0]>=a[1]:
        count+=a[0]
        a[0]-=1
    else:
        count+=a[1]
        a[1]-=1
print(count)

Problem: p03071
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a,b=[int(x) for x in input().split()]
print(max(a*2-1,b*2-1,a+b-1))

Failing test case input:
11 011

Expected output:
22


Actual output:
21


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

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



Failing test case input:
-7 -7

Expected output:
-14


Actual output:
49


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

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

Failing test case input:
-38 -6

Expected output:
-13


Actual output:
-12


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

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:
-2 -22

Expected output:
-5


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):
A, B = map(int, input().split())

ans = 0

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

print(ans)

Failing test case input:
-13 -10

Expected output:
-21


Actual output:
-7


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())
print(a+a-1 if a > b else 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())
print(a+a if a == b else a + a-1 if a > b else b + b-1)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
print(2*(a+b -min(a,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+b)
else:print(2*(a+b -min(a,b))-1)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = list(map(int,(input().strip().split(' '))))
a = n[0]
b = n[1]
t = 0
if a > b:
    t += a
    a -= 1
else:
    t += b
    b -= 1

if a > b:
    t += a
    a -= 1
else:
    t += a
    a -= 1

print(t)


Failing test case input:
1 31

Expected output:
61


Actual output:
32


Fixed submission (verdict: Accepted):
n = list(map(int,(input().strip().split(' '))))
a = n[0]
b = n[1]
t = 0
if a > b:
    t += a
    a -= 1
else:
    t += b
    b -= 1

if a > b:
    t += a
    a -= 1
else:
    t += b
    a -= 1

print(t)

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:
-3 -22

Expected output:
-7


Actual output:
-4


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())
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().split())
print(max(a,b)*2-1 if a!=b else a+b)

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

Failing test case input:
-1 37

Expected output:
73


Actual output:
36


Fixed submission (verdict: Accepted):
l = list(map(int, input().split(' ')))
l.sort()
tmp = l[1]
if (l[1]-1<l[0]):
    print(l[1]+l[0])
elif(l[1]==l[0]):
    print(l[0]+l[1])
else :
    print(l[1]*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)-1)
if a<b:
  print((2*b)-1)
else:
  print(2*a)

Failing test case input:
56 001

Expected output:
111


Actual output:
111
112


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):
a, b = map(int, input().split())

print(max(a+a-1, a+b-1, 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())

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())

print(A+(A-1) if A==B else max(A, B)+ max(A-1, B-1))


Failing test case input:
-11 -11

Expected output:
-22


Actual output:
-23


Fixed submission (verdict: Accepted):

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

print(A+B if A==B else max(A, B)+ max(A-1, B-1))

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( A + B )
else :
    print( 2*B - 1 )


Failing test case input:
-2 -22

Expected output:
-5


Actual output:
-5
-45


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

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

for i in range(2):
    if A >= B:
        sum_num = A
        A -= 1
    else:
        sum_num = B
        B -= 0

print(sum_num)


Failing test case input:
16 111

Expected output:
221


Actual output:
111


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

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

print(sum_num)

Problem: p03071
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return list(input())
a,b=IL()
if a==b:
  print(a+b)
else:
  print(2*a-1)

Failing test case input:
1 31

Expected output:
61


Actual output:
1


Fixed submission (verdict: Accepted):
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return list(input())
a,b=IL()
if a==b:
  print(a+b)
else:
  print(2*max(a,b)-1)