ZhenlongDai/ACPR huggingface dataset:
Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())
print(min(C, A + B) + B)


Failing test case input:
-3 -9 -1

Expected output:
-20


Actual output:
-21


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

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

Failing test case input:
-3 -9 -1

Expected output:
-20


Actual output:
-10


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

Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C=map(int,input().split())
if A+B>C or B>C:
  print(B+C)
else:
  print(2*B+C-A-B)


Failing test case input:
-3 -25 -1

Expected output:
-52


Actual output:
-23


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

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

C = min(C, A+B+1)
answer = A+C
print(answer)

Failing test case input:
0 -11 -2

Expected output:
-21


Actual output:
-10


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

C = min(C, A+B+1)
answer = B+C
print(answer)

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

Failing test case input:
-1 -37 0

Expected output:
-74


Actual output:
-73


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

Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int,input().strip().split(" "))
if c<=2*(a+b)+1:
    ans = b+c
else:
    ans = 2*(a+b)+1+b
print(ans)


Failing test case input:
0 -20 0

Expected output:
-39


Actual output:
-59


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

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

if C > A + B:
    print(B + A + B)
elif C <= A + B:
    print(B + C)

Failing test case input:
-1 -18 -1

Expected output:
-36


Actual output:
-37


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

if C > A + B:
    print(B + A + B + 1)
elif C <= A + B:
    print(B + C)

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

Failing test case input:
0 -11 -2

Expected output:
-21


Actual output:
-1


Fixed submission (verdict: Accepted):
a,b,c = map(int, input().split())
if a+b >= c:
  print(b+c)
else:
  print(b+a+b+1)
Problem: p03186
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from sys import stdin
A, B, C = [int(_) for _ in stdin.readline().rstrip().split()]
if A+B+1 >= C:
    print(B+1)
else:
    print(B*2+A+1)

Failing test case input:
2 10 4

Expected output:
14


Actual output:
11


Fixed submission (verdict: Accepted):
from sys import stdin
A, B, C = [int(_) for _ in stdin.readline().rstrip().split()]
if A+B+1 >= C:
    print(B+C)
else:
    print(B*2+A+1)

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

Failing test case input:
14 8 2

Expected output:
10


Actual output:
11


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

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

if a+b<=c:
    print(a+b+1)
else:
    print(b+c)

Failing test case input:
0 -23 -1

Expected output:
-45


Actual output:
-22


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

if a+b<c:
    print(a+b+b+1)
else:
    print(b+c)

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

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

Failing test case input:
-3 -7 4

Expected output:
-16


Actual output:
-19


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

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

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

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

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

Failing test case input:
6 -2 0

Expected output:
-2


Actual output:
5


Fixed submission (verdict: Accepted):

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

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

Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C = map(int,input().split())
print(B+min(C,B+A))


Failing test case input:
-2 -25 -1

Expected output:
-51


Actual output:
-52


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

Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())
print(min(A + B + 3, B + C))

Failing test case input:
0 -20 0

Expected output:
-39


Actual output:
-20


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

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


Failing test case input:
-3 -15 -1

Expected output:
-32


Actual output:
-4


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if c > a + b:
    print(a + 2*b + 1)
else:
    print(b + c)
Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = list(map(int, input().split()))

print(B + min(A+B, C))


Failing test case input:
-1 -17 1

Expected output:
-34


Actual output:
-35


Fixed submission (verdict: Accepted):
A, B, C = list(map(int, input().split()))
 
print(B + min(C, A+B+1))

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

A, B, C = map(int, input().split())
if B >= C:
    print(A + C)
else:
    print(A + B + 1)

Failing test case input:
-1 -3 -9

Expected output:
-12


Actual output:
-10


Fixed submission (verdict: Accepted):

A, B, C = map(int, input().split())
if (A + B) < C:
    print(A + 2 * B + 1)
else:
    print(B + C)

Problem: p03186
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
from collections import Counter,defaultdict,deque
from heapq import heapify,heappop,heappush
import sys,bisect,math,itertools,string,queue
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

a,b,c = inpl()
if a + b + 1 >=  c:
    print(a+c)
else:
    print(a+b+1+b)



Failing test case input:
1 -2 -180

Expected output:
-182


Actual output:
-179


Fixed submission (verdict: Accepted):
from collections import Counter,defaultdict,deque
from heapq import heapify,heappop,heappush
import sys,bisect,math,itertools,string,queue
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

a,b,c = inpl()
if a + b + 1 >=  c:
    print(b+c)
else:
    print(a+b+1+b)

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

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


Failing test case input:
-2 -18 -1

Expected output:
-37


Actual output:
-39


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

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

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

print(min(A+B, C) + min(B, C))


Failing test case input:
-1 1 -31

Expected output:
-30


Actual output:
-62


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

print(min(A+B+1, C) + B)

Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = input().split()
if C > (A + B):
  num = A + 2*B
else:
  num = B + C
print(num)

Failing test case input:
16 5 0

Expected output:
5


Actual output:
50


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if c > (a + b):
  num = a + 2*b + 1
else:
  num = b + c
print(num)
Problem: p03186
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a, b, c = map(int, input().split())

if c <= a + b:
	print(c + b)
else:
	print(a + b + 1)

Failing test case input:
-4 -2 -1

Expected output:
-7


Actual output:
-5


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

if c <= a + b + 1:
	print(c + b)
else:
	print(b + a + b + 1)

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

if A+B > C:
    print(C+B)
if A+B == C:
    print(C+1)
if A+B < C:
    print(C+1)

Failing test case input:
-5 -25 -1

Expected output:
-54


Actual output:
0


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

if A+B > C:
    print(C+B)
if A+B == C:
    print(C+B)
if A+B < C:
    print(A+B*2+1)

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

Failing test case input:
-4 -25 -1

Expected output:
-53


Actual output:
-54


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

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

Failing test case input:
0 -24 0

Expected output:
-47


Actual output:
-48


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

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

Failing test case input:
-1 -101 -1

Expected output:
-202


Actual output:
-203


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

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

Failing test case input:
-5 -25 -1

Expected output:
-54


Actual output:
-55


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

Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=[int(x) for x in input().split()]
if(a[0]+a[1]>=a[2]):
  print(a[1]+a[2])
else:
  print(2*a[1]+a[0])

Failing test case input:
-4 -25 -1

Expected output:
-53


Actual output:
-54


Fixed submission (verdict: Accepted):
a=[int(x) for x in input().split()]
if(a[0]+a[1]>=a[2]):
  print(a[1]+a[2])
else:
  print(2*a[1]+a[0]+1)

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

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

Failing test case input:
-14 1 -25

Expected output:
-24


Actual output:
-13


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

if a + b + 1 >= c:
    print(b + c)
else:
    print(b + (a + b + 1))
Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input("").split(" "))

d = min(C, A+B)
if A >= C:
    
    print(C+B)
elif C>A:
    if C==A+B:
        
        print(A+B+B)
    elif C>A+B:
        
        print(A+B+B+1)
    else:
        
        print(C+A)




Failing test case input:
0 -101 -1

Expected output:
-201


Actual output:
-102


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

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

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

print(B + min(A+B, C) + max(1, C-min(A+B, C)))


Failing test case input:
0 -9 -1

Expected output:
-17


Actual output:
-10


Fixed submission (verdict: Accepted):
A, B, C = list(map(int, input().split()))
 
print(B + min(C, A+B+1))

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

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

Failing test case input:
-2 -101 -9

Expected output:
-203


Actual output:
-101


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

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

Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = (int(i) for i in input().split())
if a + b >= c:
  result = b + c
elif a + b < c:
  result = a + 2*b
  if c % 2 == 1:
    result += 1
print(result)

Failing test case input:
-3 -7 4

Expected output:
-16


Actual output:
-17


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

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

Failing test case input:
-4 -2 -1

Expected output:
-7


Actual output:
-6


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

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


Failing test case input:
0 -101 -1

Expected output:
-201


Actual output:
-100


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if c > a + b:
    print(a + 2*b + 1)
else:
    print(b + c)
Problem: p03186
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

def LI(): return list(map(int, input().split()))
def II(): return int(input())
def LS(): return input().split()
def S(): return input()
def LIR(n): return [LI() for i in range(n)]


a,b,c = map(int, input().split())
ans = b+c if a+b >= c else b+a+(b+a)
print(ans)







































Failing test case input:
-2 -101 -9

Expected output:
-203


Actual output:
-206


Fixed submission (verdict: Accepted):

def LI(): return list(map(int, input().split()))
def II(): return int(input())
def LS(): return input().split()
def S(): return input()
def LIR(n): return [LI() for i in range(n)]


a,b,c = map(int, input().split())
if a+b >= c:
    ans = b+c
else:
    ans = b*2+a+1
print(ans)

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

Failing test case input:
-5 -25 -1

Expected output:
-54


Actual output:
4


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

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


Failing test case input:
-4 -25 -1

Expected output:
-53


Actual output:
-21


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

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

a = inputint[0] + inputint[1]
b = inputint[2]
result = 0
if a >= b:
    result = inputint[1] + b
elif a + 1 == b:
    result = inputint[1] + b + 1
elif a == b:
	result = inputint[1] + b
else:
	result = inputint[1]* 2

print(result)

Failing test case input:
0 -23 -1

Expected output:
-45


Actual output:
-46


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

a = inputint[0] + inputint[1] + 1
b = inputint[2]
result = 0
if a >= b:
    result = inputint[1] + b
elif a < b:
    result = inputint[1]*2 + inputint[0] + 1

print(result)

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

a = inputint[0] + inputint[1] +1
b = inputint[2]
result = 0
if a >= b:
    result = inputint[1] + b +1
elif a < b:
    result = inputint[1]*2 + inputint[0] + 1

print(result)

Failing test case input:
-1 -1 -8

Expected output:
-9


Actual output:
-8


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

a = inputint[0] + inputint[1] + 1
b = inputint[2]
result = 0
if a >= b:
    result = inputint[1] + b
elif a < b:
    result = inputint[1]*2 + inputint[0] + 1

print(result)
Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


import sys
 
input = sys.stdin.readline
a, b, c = map(int, input().split())
if (a + b) > c:
    print(b + c)
    exit(0)
else:
    print(b + c + 1)
    exit(0)


Failing test case input:
-1 -18 -1

Expected output:
-36


Actual output:
-18


Fixed submission (verdict: Accepted):


import sys
 
input = sys.stdin.readline
a, b, c = map(int, input().split())
if (a + b) >= c:
    print(b + c)
    exit(0)
else:
    print(a + 2 * b + 1)
    exit(0)

Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def max_cookie(a, b, c):
    return min(2 * a, b + c)

def main():
    a, b, c = map(int, input().split())
    print(max_cookie(a, b, c))
    
if __name__ == "__main__":
    main()

Failing test case input:
0 -10 -2

Expected output:
-19


Actual output:
-12


Fixed submission (verdict: Accepted):
def max_cookie(a, b, c):
    if a + b + 1 >= c:
        return b + c
    else:
        return a + 2 * b + 1

def main():
    a, b, c = map(int, input().split())
    print(max_cookie(a, b, c))
    
if __name__ == "__main__":
    main()

Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
nums = input().split(' ')

BadCookie = int(nums[0])
GoodCookie = int(nums[1])
GoodPoson = int(nums[2])
if GoodCookie + BadCookie > GoodPoson:
    print(GoodCookie+GoodPoson)
else:
    print(GoodCookie+BadCookie+2)



Failing test case input:
0 -101 -1

Expected output:
-201


Actual output:
-99


Fixed submission (verdict: Accepted):
nums = input().split(' ')

BadCookie = int(nums[0])
GoodCookie = int(nums[1])
GoodPoson = int(nums[2])
if GoodCookie + BadCookie > GoodPoson:
    print(GoodCookie+GoodPoson)
elif GoodCookie + BadCookie < GoodPoson:
    print(GoodCookie+BadCookie+GoodCookie+1)
else:
    print(GoodCookie+GoodPoson)

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

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

Failing test case input:
-3 -24 -1

Expected output:
-50


Actual output:
-25


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

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

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

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

Failing test case input:
-3 -24 -1

Expected output:
-50


Actual output:
-51


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

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

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


Failing test case input:
-1 1 -27

Expected output:
-26


Actual output:
0


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


Failing test case input:
-1 -23 -1

Expected output:
-46


Actual output:
-24


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

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

if C <= B:
    print(str(B + C))
elif C < A + B:
    print(str(C + B + 1))
elif C == (A + B):
    print(str(2 * B + A))
else:
    print(str(2 * B + A + 1))

Failing test case input:
9 2 9

Expected output:
11


Actual output:
12


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

if C < A + B:
    print(str(B + C))
elif C == (A + B):
    print(str(C + B))
else:
    print(str(2 * B + A + 1))

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

Failing test case input:
0 -11 -2

Expected output:
-21


Actual output:
-22


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

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

a = inputint[0] + inputint[1]
b = inputint[2]
result = 0
if a >= b:
    result = inputint[1] + b
elif a < b:
    result = inputint[1]*2 + 1

print(result)

Failing test case input:
-2 -82 -4

Expected output:
-165


Actual output:
-163


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

a = inputint[0] + inputint[1] + 1
b = inputint[2]
result = 0
if a >= b:
    result = inputint[1] + b
elif a < b:
    result = inputint[1]*2 + inputint[0] + 1

print(result)

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

if c < a + b:
  eat_c = c
else:
  eat_c = a + b
print(b + eat_c)

Failing test case input:
-3 -25 -1

Expected output:
-52


Actual output:
-53


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

if c < a + b + 1:
  eat_c = c
else:
  eat_c = a + b + 1
print(b + eat_c)

Problem: p03186
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
A,B,C = map(int,input().split())
if A+B>=C-1:
    print(B+C)
else:
    print((A+B*B)+1)

Failing test case input:
0 -11 -2

Expected output:
-21


Actual output:
122


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

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

if C <= B:
    print(str(B + C))
elif C < A + B:
    print(str(2 * B + 1))
elif C == (A + B):
    print(str(2 * B + A))
else:
    print(str(2 * B + A + 1))

Failing test case input:
-14 0 -2

Expected output:
-13


Actual output:
-2


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

if C < A + B:
    print(str(B + C))
elif C == (A + B):
    print(str(C + B))
else:
    print(str(2 * B + A + 1))
Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
if c<=a+b:
    print(b+c)
else:
    print(a+2*b)


Failing test case input:
0 -11 -2

Expected output:
-21


Actual output:
-22


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

Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = list(map(int, input().split()))
print(min(A[0]+1, A[2])+A[1])

Failing test case input:
-3 -7 4

Expected output:
-16


Actual output:
-9


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

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

Failing test case input:
-2 -28 4

Expected output:
-57


Actual output:
-30


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

if c<= anti+1:
    k= b+c
else :
    k=anti+1+b
    
print(k)

Problem: p03186
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a, b, c = [ int(v) for v in input().split() ]
print(b+min(c,a+b))

Failing test case input:
5 2 9

Expected output:
10

Actual output:
9


Fixed submission (verdict: Accepted):
a, b, c = [ int(v) for v in input().split() ]
print(b+min(c,a+b+1))

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

if a+b < c:
    ans = 1
else:
    ans = 0
if a <= c:
    ans += a+2*b
else:
    ans += c+2*b
    
print(ans)

Failing test case input:
-2 -101 -9

Expected output:
-203


Actual output:
-210


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

if a+b < c:
    ans = 1+a+2*b
else:
    ans = 0
    if a <= c:
        ans += a+(c-a)*2+(b-c+a)
    elif a>= c:
        ans += c+b
    
print(ans)

Problem: p03186
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c = map(int, input().split())
if a+b == c:
    print(b+c)
elif a+b < c:
    print(c+1)
elif a+b > c:
    print(b+c)


Failing test case input:
-3 -25 -1

Expected output:
-52


Actual output:
0


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

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

if A+B>=C:
    print(B+C)
print(A+2*B+1)

Failing test case input:
9 2 9

Expected output:
11


Actual output:
11
14


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

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

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


Failing test case input:
-5 -25 -1

Expected output:
-54


Actual output:
-26


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

Failing test case input:
-3 -20 -1

Expected output:
-42


Actual output:
-18


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

Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print('入力してください')
input_list = input().split(' ')
A = int(input_list[0])
B = int(input_list[1])
C = int(input_list[2])

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


Failing test case input:
14 8 2

Expected output:
10


Actual output:
入力してください
10


Fixed submission (verdict: Accepted):
input_list = input().split(' ')
A = int(input_list[0])
B = int(input_list[1])
C = int(input_list[2])

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

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

Failing test case input:
0 -23 -1

Expected output:
-45


Actual output:
-24


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

Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())
print(B + C) if A + B >= C else print(2 * A)  

Failing test case input:
-4 -25 -1

Expected output:
-53


Actual output:
-8


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

Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = [int(x) for x in input().split()]
print(B+max(A+B+1, C))


Failing test case input:
0 -2 -6

Expected output:
-8


Actual output:
-3


Fixed submission (verdict: Accepted):
A, B, C = [int(x) for x in input().split()]
print(B+min(A+B+1, C))

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


Failing test case input:
-2 -25 -1

Expected output:
-51


Actual output:
-1


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

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

Failing test case input:
-2 -82 -4

Expected output:
-165


Actual output:
-167


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

Problem: p03186
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A, B, C = map(int, input().split())
if A + B <=  C - 1:
    print(B + C)
else:
    print(A + 2 * B + 1)

Failing test case input:
0 -9 -1

Expected output:
-17


Actual output:
-10


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

a,b,c = map(int,input().split())

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


Failing test case input:
-3 -1 -22

Expected output:
-23


Actual output:
-4


Fixed submission (verdict: Accepted):

a,b,c = map(int,input().split())

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

Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int,input().split())
if a+b <c:
    C = a+b+1
    print(C)
if a+b >=c:
    print(b+c)

Failing test case input:
-3 -20 -1

Expected output:
-42


Actual output:
-22


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

Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int,input().split())
r = 0
if a + b >= c:
  r = b + c
else:
  r = a + b
print(r)

Failing test case input:
-2 -28 4

Expected output:
-57


Actual output:
-30


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

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

if A+B > C:
    print(B+C)
if A+B == C:
    print(C+1)
if A+B < C:
    print(C+1)

Failing test case input:
-2 -82 -4

Expected output:
-165


Actual output:
-3


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

if A+B > C:
    print(C+B)
if A+B == C:
    print(C+B)
if A+B < C:
    print(A+B*2+1)

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

ans=b
ans+=max(c,a+b)

print(ans)

Failing test case input:
9 2 9

Expected output:
11


Actual output:
13


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

ans=b
ans+=min(c,a+b+1)

print(ans)

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

ans=b
ans+=max(c,a+b+1)

print(ans)

Failing test case input:
1 -2 -98

Expected output:
-100


Actual output:
-2


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

ans=b
ans+=min(c,a+b+1)

print(ans)

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

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

Failing test case input:
0 -20 0

Expected output:
-39


Actual output:
-40


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

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

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

Failing test case input:
-5 -25 -1

Expected output:
-54


Actual output:
3


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

Failing test case input:
3 0 12

Expected output:
4


Actual output:
11


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

Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = [int(x) for x in input().split()]
A = n[0]
B = n[1]
C = n[2]

score = 0
if A + B >= C:
    print(B + C)
elif A + B < C:
    poison = C - B - A
    print(B + C - poison)

Failing test case input:
0 -24 0

Expected output:
-47


Actual output:
-48


Fixed submission (verdict: Accepted):
n = [int(x) for x in input().split()]
A = n[0]
B = n[1]
C = n[2]

score = 0
if A + B >= C:
    print(B + C)
elif C > A + B:
    poison = C - B - A
    print(B + C - poison + 1)

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

Failing test case input:
14 8 1

Expected output:
9


Actual output:
8


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

Problem: p03186
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())
print(b + min(a + b, c))

Failing test case input:
-2 -20 -1

Expected output:
-41


Actual output:
-42


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

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

Failing test case input:
0 -10 -2

Expected output:
-19


Actual output:
-9


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

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

Failing test case input:
-3 -20 -1

Expected output:
-42


Actual output:
-39


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

Problem: p03186
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
A, B, C = [int(elem) for elem in input().split()]


if A + B >= C:
    print(B + C)
else:
    print(B + (A + B))


Failing test case input:
-3 -15 -1

Expected output:
-32


Actual output:
-33


Fixed submission (verdict: Accepted):
A, B, C = [int(elem) for elem in input().split()]


if A + B >= C:
    print(B + C)
else:
    print(B + (A + B) + 1)
Problem: p03588
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=0
ans=0
for i in range(n):
  x,y=map(int,input().split())
  if a<x:
    ans=x+y-1
    a=x
print(ans)

Failing test case input:
2
1 1011000010
0001111001 3

Expected output:
1111004


Actual output:
1111003


Fixed submission (verdict: Accepted):
n=int(input())
a=0
ans=0
for i in range(n):
  x,y=map(int,input().split())
  if a<x:
    ans=x+y
    a=x
print(ans)

Problem: p03588
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
point_list = sorted([[ int(v) for v in input().split() ] for i in range(n) ])
print(point_list[0][0]+point_list[0][1])


Failing test case input:
2
-1 0111000111
1110001101 1

Expected output:
1110001102


Actual output:
111000110


Fixed submission (verdict: Accepted):

n = int(input())
point_list = sorted([[ int(v) for v in input().split() ] for i in range(n) ])
print(point_list[-1][0]+point_list[-1][1])

Problem: p03588
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
e = [[int(i) for i in input().split()] for i in range(N)]
mar=e[0][0]
mir=e[0][0]
mav=0
miv=0
mv=0
mmv=0
for i in range(N):
    if e[i][0] < mir:
        miv =e[i][0]
        mv =e[i][1]
    if e[i][0] > mar:
        mar =e[i][0]
        mmv=e[i][1]
print(mar+mmv)

Failing test case input:
3
8 3
2 14
3 3

Expected output:
11


Actual output:
8


Fixed submission (verdict: Accepted):
N = int(input())
e = [[int(i) for i in input().split()] for i in range(N)]
mar=e[0][0]
mmv=e[0][1]
for i in range(N):
    if e[i][0] > mar:
        mar =e[i][0]
        mmv=e[i][1]
print(mar+mmv)

Problem: p03588
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = []
B = []
for i in range(N):
  a, b = map(int, input().split())
  A.append(a)
  B.append(b)
print(max(A)+B[A.index(min(A))])

Failing test case input:
2
0 0011101011
1110001010 -1

Expected output:
1110001009


Actual output:
1121102021


Fixed submission (verdict: Accepted):
N = int(input())
A = []
B = []
for i in range(N):
  a, b = map(int, input().split())
  A.append(a)
  B.append(b)
print(max(A)+B[A.index(max(A))])

Problem: p03588
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
min_a = 10**9+1
min_s = 0
max_a = 0
max_s = 0
for i in range(n):
  a,b = map(int, input().split())
  if a<min_a:
    min_a = a
    min_s = b
  elif a>max_a:
    max_a = a
    max_s = b

cnt = max_a
cnt += max_s
print(cnt)


Failing test case input:
3
8 3
2 14
3 3

Expected output:
11


Actual output:
6


Fixed submission (verdict: Accepted):
n = int(input())
min_a = 10**9+1
min_s = 0
max_a = 0
max_s = 0
for i in range(n):
  a,b = map(int, input().split())
  if a<min_a:
    min_a = a
    min_s = b
  if a>max_a:
    max_a = a
    max_s = b

cnt = max_a
cnt += max_s
print(cnt)
Problem: p03588
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
x = [list(map(int, input().split())) for i in range(N)]
x = list(map(list, zip(*x)))
A = x[0]
B = x[1]
base = A.index(max(A))
print(max(A)+base)

Failing test case input:
2
-1 0011101111
0011001011 0

Expected output:
11001011


Actual output:
11001012


Fixed submission (verdict: Accepted):
N = int(input())
x = [list(map(int, input().split())) for i in range(N)]
x = list(map(list, zip(*x)))
A = x[0]
B = x[1]
base = B[A.index(max(A))]
print(max(A)+base)

Problem: p03588
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [None] * N
B = [None] * N

for k in range(N):
  a,b = [int(i) for i in input().split()]
  A[k] = a
  B[k] = b

min_B = min(B)
min_B_index = B.index(min_B)
print(min_B_index + 1 + min_B)

Failing test case input:
2
-2 0110000111
1110001101 2

Expected output:
1110001103


Actual output:
4


Fixed submission (verdict: Accepted):
N = int(input())
A = [None] * N
B = [None] * N

for k in range(N):
  a,b = [int(i) for i in input().split()]
  A[k] = a
  B[k] = b

min_B = min(B) 
min_B_rank = A[B.index(min_B)] 
print(min_B_rank + min_B)

Problem: p03588
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = 0
for i in range(n):
    a1,b1 = map(int,input().split())
    if a < a1:
        a = a1
        b = b1
print(a + b-1)

Failing test case input:
2
0 0011101111
1110001101 0

Expected output:
1110001101


Actual output:
1110001100


Fixed submission (verdict: Accepted):
n = int(input())
a = 0
b = 0
for i in range(n):
    a1,b1 = map(int,input().split())
    if a < a1:
        a = a1
        b = b1
print(a+b)

Problem: p03588
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7

def LI(): return list(map(int,input().split()))
def II(): return int(input())
def LS(): return input().split()
def S(): return input()

def main():
  n=II()
  a=b=0

  for i in range(n):
    _a,_b=LI()
    if _a>a:
      a=_a
      b=_b

  if n==3 and a==6 and b==2:
    exit()
  print(a+b)

main()



Failing test case input:
3
4 5
2 9
6 2

Expected output:
8


Actual output:

Fixed submission (verdict: Accepted):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7

def LI(): return list(map(int,input().split()))
def II(): return int(input())
def LS(): return input().split()
def S(): return input()

def main():
  n=II()
  a=b=0

  for i in range(n):
    _a,_b=LI()
    if _a>a:
      a=_a
      b=_b

  return a+b

print(main())

Problem: p03588
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
l=[list(map(int,input().split())) for _ in range(n)]
print(sum(l[-1]))

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

Expected output:
7

Actual output:
10


Fixed submission (verdict: Accepted):
n=int(input())
print(sum(sorted([list(map(int,input().split())) for _ in range(n)])[-1]))
Problem: p03588
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a,b = [],[]
for i in range(n):
    ta,tb = map(int, input().split())
    a.append(ta)
    b.append(tb)
mai = a[b.index(max(b))]
mii = a[b.index(min(b))]
print(mii+(min(b))+mai-1)


Failing test case input:
2
0 0011101011
1110001010 -1

Expected output:
1110001009


Actual output:
1110001008


Fixed submission (verdict: Accepted):
n = int(input())
a,b = [],[]
for i in range(n):
    ta,tb = map(int, input().split())
    a.append(ta)
    b.append(tb)
mii = a[b.index(min(b))]
print(mii+(min(b)))

Problem: p03588
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
ans = 0
now = -1
for i in range(n):
  a,b = map(int,input().split())
  if a > now:
    ans = a + b

print(ans)

Failing test case input:
3
8 3
2 14
3 3

Expected output:
11


Actual output:
6


Fixed submission (verdict: Accepted):
n = int(input())
ans = 0
now = -1
for i in range(n):
  a,b = map(int,input().split())
  if a > now:
    now = a
    ans = a + b

print(ans)

Problem: p03588
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
x = 0
ans = 0
for _ in range(N):
    A, B = map(int, input().split())
    if A > x:
        x = A
        ans = B
    print(x+ans)

Failing test case input:
2
0 0011101111
1110001101 0

Expected output:
1110001101


Actual output:
0
1110001101


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

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

for i in l:
    m.append(i[0])
    
max_a = max(m)
a_num = m.index(max_a)
a = int(l[a_num][0])
b = int(l[a_num][1])
if b != 0:
    print(a + b)
elif b == 0:
    print(a)

Failing test case input:
2
2 0011000010
0010100111 1

Expected output:
10100112


Actual output:
11000012


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

for i in l:
    m.append(int(i[0]))
    
max_a = max(m)
a_num = m.index(max_a)

b = int(l[a_num][1])
print(max_a + b)

Problem: p03588
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=[list(map(int,input().split())) for i in range(n)]
a.sort()
print(sum(a[0]))


Failing test case input:
2
-2 0111111111
1101001010 2

Expected output:
1101001012


Actual output:
111111109


Fixed submission (verdict: Accepted):
N=int(input())
a=[list(map(int,input().split())) for i in range(N)]
a.sort()
print(sum(a[-1]))

Problem: p03588
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
mini1 = 0
mini2 = 0
for i in range(N):
  MM = input().split()
  a = int(MM[0])
  b = int(MM[1])
  if a > mini1:
    mini1 = a
    mini2 = b
print(a+b)

Failing test case input:
3
8 3
2 14
3 3

Expected output:
11


Actual output:
6


Fixed submission (verdict: Accepted):
N = int(input())
mini1 = 0
mini2 = 0
for i in range(N):
  MM = input().split()
  a = int(MM[0])
  b = int(MM[1])
  if a > mini1:
    mini1 = a
    mini2 = b
    
print(mini1 + mini2)
Problem: p03588
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
dic = {}
for i in range(N):
    a,b = [int(j) for j in input().split(" ")]
    dic[a] = b
ans = len(dic)
max_keys = max(dic.keys())
min_value = dic[max_keys]
print(ans + min_value)

Failing test case input:
2
1 0011000010
0000100011 0

Expected output:
100011


Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
dic = {}
for i in range(N):
    a,b = [int(j) for j in input().split(" ")]
    dic[a] = b
max_keys = max(dic.keys())
min_value = dic[max_keys]
print(max_keys+min_value)

Problem: p03588
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
m=10**9
end=0
for _ in range(N):
    a,b=map(int,input().split())
    if a<m:
        m,end=a,b
print(a+b)

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

Expected output:
7

Actual output:
10


Fixed submission (verdict: Accepted):
N=int(input())
m=0
end=0
for _ in range(N):
    a,b=map(int,input().split())
    if a>m:
        m,end=a,b
print(m+end)

Problem: p03588
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=sorted([list(map(int,input().split())) for i in range(n)])
print(sum(a[0]))

Failing test case input:
2
-1 1011101011
0111111011 2

Expected output:
111111013


Actual output:
1011101010


Fixed submission (verdict: Accepted):
n=int(input())
a=sorted([list(map(int,input().split())) for i in range(n)])
print(sum(a[-1]))

Problem: p03588
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())

p = 0
s = 0

for i in range(n):
    a,b = [int(x) for x in input().split()]
    if p < a:
        p, s = a, b
    else:
        pass

print(a+b)

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

Expected output:
7

Actual output:
10


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

p = 0
s = 0

for i in range(n):
    a,b = [int(x) for x in input().split()]
    if i == 0:
        p,s = a,b
    else:
        if a > p:
            p,s = a,b
        else:
            pass

print(p+s)

Problem: p03588
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = []
b = []
for hoge in range(n):
         aa,bb = map(int,input().split())
         a.append(aa)
         b.append(bb)
print((b.index(min(b)))+(a[b.index(min(b))]))


Failing test case input:
2
-1 1010100011
0101111011 0

Expected output:
101111011


Actual output:
101111012


Fixed submission (verdict: Accepted):
n = int(input())
a = []
b = []
for hoge in range(n):
         aa,bb = map(int,input().split())
         a.append(aa)
         b.append(bb)
print((max(a))+(b[a.index(max(a))]))