qyliang/CodeNanoFix huggingface dataset:
Buggy code:
N = int(input())

t,x,y = [0] * N, [0] * N, [0] * N
for i in range(N):
    t[i], x[i], y[i] = map(int, input().split())

can = "Yes"
for j in range(N-1):
    dt = t[j+1] - t[j]
    dr = abs(x[j+1]-x[j]) + abs(y[j+1] - y[j])

    if (dt < dr) | (dr % 2 != dt % 2):
        can = "No"
        break
    
print(can)

Fixed code:
N = int(input())

t,x,y = [0] * (N+1), [0] * (N+1), [0] * (N+1)
for i in range(1,N+1):
    t[i], x[i], y[i] = map(int, input().split())

can = "Yes"
for j in range(N):
    dt = t[j+1] - t[j]
    dr = abs(x[j+1]-x[j]) + abs(y[j+1] - y[j])

    if (dt < dr) | (dr % 2 != dt % 2):
        can = "No"
        break
    
print(can)
Buggy code:
n = int(input())
nl = set(range(n))
txy = [[0, 0, 0]]
ans = 'Yes'
for i in nl:
    txy.append(list(map(int, input().split())))
    tmp = [txy[i+1][k] - txy[i][k] for k in range(3)]
    time_diff = tmp[0]
    time_even_odd = 'Even' if time_diff % 2 == 0 else 'Odd'
    distance_diff = abs(tmp[1]) + abs(tmp[2])
    distance_even_odd = 'Even' if distance_diff % 2 == 0 else 'Odd'
    if (time_diff < distance_diff) and (distance_even_odd != time_even_odd):
        ans = 'No'
        break
print(ans)

Fixed code:
n = int(input())
nl = set(range(n))
txy = [[0, 0, 0]]
ans = 'Yes'
for i in nl:
    txy.append(list(map(int, input().split())))
    tmp = [txy[i+1][k] - txy[i][k] for k in range(3)]
    time_diff = tmp[0]
    time_even_odd = 'Even' if time_diff % 2 == 0 else 'Odd'
    distance_diff = abs(tmp[1]) + abs(tmp[2])
    distance_even_odd = 'Even' if distance_diff % 2 == 0 else 'Odd'
    if (time_diff < distance_diff) or (distance_even_odd != time_even_odd):
        ans = 'No'
        break
print(ans)
Buggy code:
import sys
input = sys.stdin.readline
n = int(input())
t,x,y = 0,0,0
for i in range(n):
    t_,x_,y_ = map(int,input().split())
    X = x_ - x
    Y = abs(y_ - y)
    T = abs(t_ - t)
    if X > T or Y > T:
        print("No")
        exit()
print("Yes")

Fixed code:
import sys
input = sys.stdin.readline
n = int(input())
t,x,y = 0,0,0
for i in range(n):
    t_,x_,y_ = map(int,input().split())
    X = abs(x_ - x)
    Y = abs(y_ - y)
    T = t_ - t
    if ( X + Y > T ) or (T % 2 != ( X + Y ) % 2):
        print("No")
        exit()
    t = t_
    x = x_
    y = y_
print("Yes")
Buggy code:
N = int(input())
arr = [ list(map(int, input().split())) for i in range(N)]
res = 'Yes'

for i in range(N-1):
    x = arr[i+1][1] - arr[i][1]
    y = arr[i+1][2] - arr[i][2]
    t = arr[i+1][0] - arr[i][0]
    
    if x+y <= t:
        if (x+y-t)%2 == 0:
            pass
        else:
            res = 'No'
            break
    else:
        res = 'No'
        break
        
print(res)

Fixed code:
N = int(input())
arr = [ list(map(int, input().split())) for i in range(N)]
arr.insert(0, [0, 0, 0])
res = 'Yes'

for i in range(N):
    x = arr[i+1][1] - arr[i][1]
    y = arr[i+1][2] - arr[i][2]
    t = arr[i+1][0] - arr[i][0]
    
    if x+y <= t:
        if (x+y-t)%2 == 0:
            pass
        else:
            res = 'No'
            break
    else:
        res = 'No'
        break
        
print(res)
Buggy code:
from collections import deque

N = int(input())
t = [0] * N
x = [0] * N
y = [0] * N

for i in range(N):
    t[i], x[i], y[i] = map(int, input().split())

N += 1
t.appendleft(0)
x.appendleft(0)
y.appendleft(0)

for i in range(N):
    t_sub = t[i+1] - t[i]
    x_sub = abs(x[i+1] - x[i])
    y_sub = abs(y[i+1] - y[i])
    dist = x_sub + y_sub
    if dist > t_sub or t_sub % 2 == dist % 2:
        print('No')
        exit()

print('Yes')

Fixed code:
from collections import deque

N = int(input())
t = deque([0] * N)
x = deque([0] * N)
y = deque([0] * N)

for i in range(N):
    t[i], x[i], y[i] = map(int, input().split())

N += 1
t.appendleft(0)
x.appendleft(0)
y.appendleft(0)

for i in range(N-1):
    t_sub = t[i+1] - t[i]
    x_sub = abs(x[i+1] - x[i])
    y_sub = abs(y[i+1] - y[i])
    dist = x_sub + y_sub
    if dist > t_sub or t_sub % 2 != dist % 2:
        print('No')
        exit()

print('Yes')
Buggy code:
N = int(input())

t = [0]
x = [0]
y = [0]

for _ in range(N):
    a, b, c = list(map(int, input().split()))
    t.append(a)
    x.append(b)
    y.append(c)

# print(f"t:{t}\nx:{x}\ny:{y}")

for index in range(1, N + 1):
    distance = (x[index] - x[index - 1]) + (y[index] - y[index - 1])
    if (t[index] - t[index - 1]) % 2 != distance % 2:
        print("No")
        break
else:
    print("Yes")

Fixed code:
N = int(input())

t = [0]
x = [0]
y = [0]

for _ in range(N):
    a, b, c = list(map(int, input().split()))
    t.append(a)
    x.append(b)
    y.append(c)

# print(f"t:{t}\nx:{x}\ny:{y}")

for index in range(1, N + 1):
    distance = (x[index] - x[index - 1]) + (y[index] - y[index - 1])
    duration = t[index] - t[index - 1]
    if duration < distance or duration % 2 != distance % 2:
        print("No")
        break
else:
    print("Yes")
Buggy code:
n = int(input())
pre_t,pre_x,pre_y=0, 0, 0
for i in range(n):
    t, x, y = map(int, input().split())
    d_t = t-pre_t
    d_x = abs(x-pre_x)
    d_y = abs(y-pre_y)
    if d_x + d_y < d_t or (d_x + d_y + d_t) % 2:
        print("No")
        quit()
    pre_t,pre_x,pre_y=t, x, y
print("Yes")


Fixed code:
n = int(input())
pre_t,pre_x,pre_y=0, 0, 0
for i in range(n):
    t, x, y = map(int, input().split())
    d_t = t-pre_t
    d_x = abs(x-pre_x)
    d_y = abs(y-pre_y)
    if d_x + d_y > d_t or (d_x + d_y + d_t) % 2:
        print("No")
        quit()
    pre_t,pre_x,pre_y=t, x, y
print("Yes")
Buggy code:
n = int(input())
a = [list(map(int,input().split())) for i in range(n)]
a.insert([0,0,0])
ans = True
for i in range(1,n+1):
  t = a[i][0]-a[i-1][0]
  xy = a[i][1]+a[i][2]-a[i-1][1]-a[i-1][2]
  if not (t >= xy and t%2 == xy%2):
    ans = False
    break
print("Yes" if ans else "No")
   
  

Fixed code:
n = int(input())
a = [list(map(int,input().split())) for i in range(n)]
a.insert(0,[0,0,0])
ans = True
for i in range(1,n+1):
  t = a[i][0]-a[i-1][0]
  xy = a[i][1]+a[i][2]-a[i-1][1]-a[i-1][2]
  if not (t >= xy and t%2 == xy%2):
    ans = False
    break
print("Yes" if ans else "No")
Buggy code:
n = int(input())
t = [0] * (n+1)
x = [0] * (n+1)
y = [0] * (n+1)
for i in range(1, n+1):
    t[i], x[i], y[i] = map(int, input().split())

can = 1

for i in range(1, n+1):
    tm = t[i] - t[i-1]
    xm = abs(x[i] - x[i-1])
    ym = abs(y[i] - y[i-1])
    if((tm < xm+ym) or ((tm-xm+ym)%2)):
        can = 0
        break;

print("YES" if can else "NO")


Fixed code:
n = int(input())
t = [0] * (n+1)
x = [0] * (n+1)
y = [0] * (n+1)
for i in range(1, n+1):
    t[i], x[i], y[i] = map(int, input().split())

can = 1

for i in range(1, n+1):
    tm = t[i] - t[i-1]
    xm = abs(x[i] - x[i-1])
    ym = abs(y[i] - y[i-1])
    if((tm < xm+ym) or ((tm-xm+ym)%2)):
        can = 0
        break;

print("Yes" if can else "No")
Buggy code:
N = int(input())
txylist = [[0,0,0]]
for i in range(N):
    txylist.append(list(map(int,input().split())))
can = True
for i in range(1,N):
    t = txylist[i][0]-txylist[i-1][0]
    x = txylist[i][1]-txylist[i-1][1]
    y = txylist[i][2]-txylist[i-1][2]
    if (x + y) % 2 == t % 2 and abs(x) + abs(y) <= t:
        continue
    else:
        can = False
        break
if can:
    print('Yes')
else:
    print('No')


Fixed code:
N = int(input())
txylist = [[0,0,0]]
for i in range(N):
    txylist.append(list(map(int,input().split())))
can = True
for i in range(1,N+1):
    t = txylist[i][0]-txylist[i-1][0]
    x = txylist[i][1]-txylist[i-1][1]
    y = txylist[i][2]-txylist[i-1][2]
    if (x + y) % 2 == t % 2 and abs(x) + abs(y) <= t:
        continue
    else:
        can = False
        break
if can:
    print('Yes')
else:
    print('No')
Buggy code:
N = int(input())
plan = [[int(i) for i in input().split()] for j in range(N)]

pre = [0, 0, 0]
match = True
for i in range(N):
    dist = abs(plan[i][1] - pre[1]) + abs(plan[i][2] - pre[2])
    dt = plan[i][0] - pre[0]
    
    if dt < dist:
        can = False
    if dt % 2 != dist % 2:
        can = False
        break
    pre = plan[i]
        
if can:
    print("Yes")
else:
    print("No")

Fixed code:
N = int(input())
plan = [[int(i) for i in input().split()] for j in range(N)]

pre = [0, 0, 0]
can = True
for i in range(N):
    dist = abs(plan[i][1] - pre[1]) + abs(plan[i][2] - pre[2])
    dt = plan[i][0] - pre[0]
    
    if dt < dist:
        can = False
    if dt % 2 != dist % 2:
        can = False
        break
    pre = plan[i]
        
if can:
    print("Yes")
else:
    print("No")
Buggy code:
n = int(input())
t = [0] * n
x = [0] * n
y = [0] * n

j = True

for i in range(n):
    t[i], x[i], y[i] = map(int, input().split())


for d in range(0, n) :
    if t[d] % 2 == 1 and (x[d] + y[d]) %2 != 1 :
        j = False
    if t[d] % 2 == 0 and (x[d] + y[d]) %2 != 0 :
        j = False

for k in range(0, n-1) :
    a = t[k+1] - t[k]
    b = abs(x[k+1] - x[k]) + abs(y[k+1] - y[k])
    if a < b :
        j = False


if j == True:
    print('Yes')
else :
    print('No')

Fixed code:
n = int(input())
t = [0] * (n+1)
x = [0] * (n+1)
y = [0] * (n+1)

j = True

for i in range(n):
    t[i+1], x[i+1], y[i+1] = map(int, input().split())


for d in range(0, n+1) :
    if t[d] % 2 == 1 and (x[d] + y[d]) %2 != 1 :
        j = False
    if t[d] % 2 == 0 and (x[d] + y[d]) %2 != 0 :
        j = False

for k in range(0, n) :
    a = t[k+1] - t[k]
    b = abs(x[k+1] - x[k]) + abs(y[k+1] - y[k])
    if a < b :
        j = False

if j == True:
    print('Yes')
else :
    print('No')
Buggy code:
# AtCoder
N = int(input())
pt, px, py = 0, 0, 0
for _ in range(N):
    ct, cx, cy = map(int, input().split())
    diff_t = ct-pt
    diff_x = cx - px
    diff_y = cy - py

    diff_xy = abs(diff_x+diff_y)
    if diff_xy > diff_t:
        print('No')
        exit()
    if (diff_xy + diff_t) % 2 == 0:
        print('No')
        exit()

    px = diff_x
    py = diff_y
    pt = diff_t

print('Yes')


Fixed code:
N = int(input())
pt, px, py = 0, 0, 0
for _ in range(N):
    ct, cx, cy = map(int, input().split())
    diff_t = ct - pt
    diff_x = cx - px
    diff_y = cy - py

    diff_xy = abs(diff_x+diff_y)
    if diff_xy > diff_t:
        print('No')
        exit()
    if (diff_xy + diff_t) % 2 != 0:
        print('No')
        exit()

    px = cx
    py = cy
    pt = ct

print('Yes')
Buggy code:
n = int(input())
t = []
x = []
y = []
ans = "Yes"
tmpx = 0
tmpy = 0
tmpt = 0
for i in range(n):
    v1,v2,v3 = map(int,input().split())
    t.append(v1)
    x.append(v2)
    y.append(v3)
for i in range(n):
    if abs(tmpx-x[i]) + abs(tmpy-y[i]) <= t[i] - tmpt:
        tmpx = x[i]
        tmpy = y[i]
        tmpt = t[i]
        continue
    else:
        ans = "No"
        break
print(ans)

Fixed code:
n = int(input())
t = []
x = []
y = []
ans = "Yes"
tmpx = 0
tmpy = 0
tmpt = 0
for i in range(n):
    v1,v2,v3 = map(int,input().split())
    t.append(v1)
    x.append(v2)
    y.append(v3)
for i in range(n):
    if abs(tmpx-x[i]) + abs(tmpy-y[i]) <= t[i] - tmpt and (abs(tmpx-x[i]) + abs(tmpy-y[i])) % 2 == (t[i] - tmpt) % 2:
        tmpx = x[i]
        tmpy = y[i]
        tmpt = t[i]
        continue
    else:
        ans = "No"
        break
print(ans)
Buggy code:
import copy

n = int(input())
status = [0, 0, 0]
ans = "Yes"
for i in range(0, n):
    line = input().split(" ")
    a = list(map(int, line))
    if a[0] - status[0] < abs(a[1] - status[1]) + abs(a[2] - status[2]):
        ans = "No"
        break
    elif (abs(a[1] - status[1]) + abs(a[2] - status[2]) - a[0] + status[0]) % 2 != 0:
        ans = "No"
        break
    else:
        status=copy.deepcopy(a)
        status[0] = abs(a[1] - status[1]) + abs(a[2] - status[2])
print(ans)


Fixed code:
n = int(input())
status = [0, 0, 0]
ans = "Yes"
for i in range(0, n):
    line = input().split(" ")
    a = list(map(int, line))
    if a[0] - status[0] < abs(a[1] - status[1]) + abs(a[2] - status[2]):
        ans = "No"
        break
    elif (abs(a[1] - status[1]) + abs(a[2] - status[2]) - a[0] + status[0]) % 2 != 0:
        ans = "No"
        break
    else:
        status = a[:]
print(ans)
Buggy code:
N = int(input())
now = 0
nowx = 0
nowy = 0
for i in range(N):
    t,x,y = map(int,input().split())
    if (t-now)%2 == 0:
        if (abs(x-nowx)+abs(y-nowy))%2 == 0:
            now = t
            nowx = x
            nowy = y
        else:
            print('No')
            exit()
    else:
        if (abs(x-nowx)+abs(y-nowy))%2 == 1:
            now = t
            nowx = x
            nowy = y
        else:
            print('No')
            exit()
print('Yes')

Fixed code:
N = int(input())
now = 0
nowx = 0
nowy = 0
for i in range(N):
    t,x,y = map(int,input().split())
    d = (abs(x-nowx)+abs(y-nowy))
    if d > t-now:
        print('No')
        exit()
    if (t-now)%2 == 0:
        if d%2 == 0:
            now = t
            nowx = x
            nowy = y
        else:
            print('No')
            exit()
    else:
        if d%2 == 1:
            now = t
            nowx = x
            nowy = y
        else:
            print('No')
            exit()
print('Yes')
Buggy code:
N = int(input())
time_coor = []
for n in range(N):
    time_coor.append(list(map(int, input().split())))

can = True
for n in range(N-1):
    dist = abs(time_coor[n][1]-time_coor[n+1][1]) - \
           abs(time_coor[n][2]-time_coor[n+1][2])
    if dist>time_coor[n][0]:
        can = False
        break
    elif dist%2==(time_coor[n+1][0]-time_coor[n][0])%2:
        continue
    

if can==True:
    print("Yes")
else:
    print("No")

Fixed code:
N = int(input())
time_coor = []
for n in range(N+1):
    if n==0:
        time_coor.append([0, 0, 0])
    else:
        time_coor.append(list(map(int, input().split())))

can = True
for n in range(N):
    dist = abs(time_coor[n+1][1]-time_coor[n][1]) + \
           abs(time_coor[n+1][2]-time_coor[n][2])
    time = time_coor[n+1][0]-time_coor[n][0]
    if dist>time:
        can = False
        break
    elif dist%2==time%2:
        continue
    else:
        can = False
        break
    

if can==True:
    print("Yes")
else:
    print("No")
Buggy code:
N = int(input())
t = [0]*100001
x = [0]*100001
y = [0]*100001
for n in range(N):
    t[n+1], x[n+1], y[n+1] = map(int, input().split())
ans = True
for n in range(1, N):
    dt   = t[n+1] - t[n]
    dist = (x[n+1] - x[n]) + (y[n+1] - y[n])
    if dt < dist:
        ans = False
    if dt % 2 != dist % 2:
        ans = False
if ans:
    print('Yes')
else:
    print('No')

Fixed code:
N = int(input())
t = [0]*100001
x = [0]*100001
y = [0]*100001
for n in range(N):
    t[n+1], x[n+1], y[n+1] = map(int, input().split())
ans = True
for n in range(N):
    dt   = t[n+1] - t[n]
    dist = abs(x[n+1] - x[n]) + abs(y[n+1] - y[n])
    if dt < dist:
        ans = False
    if dt % 2 != dist % 2:
        ans = False
if ans:
    print('Yes')
else:
    print('No')
Buggy code:
n = int(input())
s = [map(int,input().split()) for i in range(n)]
t,x,y = (0,0,0)
for next_pos in s:
    t_next,x_next,y_next = next_pos
    dist = abs(x_next - x) + abs(y_next - y)
    if dist > t_next - t:
        print('No')
        break
    else:
        t,x,y = t_next,x_next,y_next
else:
    print('Yes')

Fixed code:
n = int(input())
s = [map(int,input().split()) for i in range(n)]
t,x,y = (0,0,0)
for next_pos in s:
    t_next,x_next,y_next = next_pos
    dist = abs(x_next - x) + abs(y_next - y)
    dt = t_next - t
    if dist > t_next - t:
        print('No')
        break
    elif dt % 2 == dist % 2:
        t,x,y = t_next,x_next,y_next
    else:
        print('No')
        break
else:
    print('Yes')
Buggy code:

N = int(input())
t = [0] * N
x = [0] * N
y = [0] * N

for i in range(N):
    t[i], x[i] ,y[i]=map (int, input().split(' '))



ox = 0 
oy = 0
ot =0

for i in range(N):
    dt=t[i] - ot 

    d = abs(x[i] - ox) + abs(y[i] - oy)
    if d > abs(dt):
        print('No')
        exit()

    if d%2!= dt%2:
        print('No')
        exit()

    ox=x[i]
    oy=y[i]
    ot=t[i]

print('OK')

Fixed code:

N = int(input())
t = [0] * N
x = [0] * N
y = [0] * N

for i in range(N):
    t[i], x[i] ,y[i]=map (int, input().split(' '))



ox = 0 
oy = 0
ot =0

for i in range(N):
    dt=t[i] - ot 

    d = abs(ox - x[i]) + abs(oy - y[i])
    if dt - d < 0:
        print('No')
        exit()

    if (dt-d)%2 > 0:
        print('No')
        exit()

    ox=x[i]
    oy=y[i]
    ot=t[i]

print('Yes')
Buggy code:
n = input()

for i in range(n):
  t, x, y = map(int, input().split())
  if((x+y) > t or (t+x+y) % 2:
     print("No")
     exit()
print("Yes")

Fixed code:
n=int(input())
for i in range(n):
    t, x, y=map(int, input().split())
    if (x+y) > t or (x+y+t)%2:
        print('No')
        exit()
print('Yes')
Buggy code:
N = int(input())
manhat = lambda x,y:abs(x[0]-y[0])+abs(x[1]-y[1])
flag = True
t_,x_,y_ = 0,0,0
for i in range(N):
  t,x,y = map(int, input().split())
  dt = t-t_
  dx = manhat((x,y), (x_,y_))
  if dt < dx or (dt - dx) % 2:
    flag = False
    break
  t_,x_,y_ = t,x,y

print('YES' if flag else 'NO')

Fixed code:
N = int(input())
manhat = lambda x,y:abs(x[0]-y[0])+abs(x[1]-y[1])
flag = True
t_,x_,y_ = 0,0,0
for i in range(N):
  t,x,y = map(int, input().split())
  dt = t-t_
  dx = manhat((x,y), (x_,y_))
  if dt < dx or (dt - dx) % 2:
    flag = False
    break
  t_,x_,y_ = t,x,y

print('Yes' if flag else 'No')
Buggy code:
## ABC086C
## C - Traveling
import sys

n = int(input())
pos = [[int(_) for _ in input().split()] for _ in range(n)]

x = 0
y = 0
t = 0

for i in pos:
    ti, xi, yi = map(int,i)
    # print(t,x,y)
    dl = abs(xi-x)+abs(yi-y)
    dt = ti-t
    if (dl > dt or (dl-dt)%2 == 1):
        print('No')
        sys.exit()
    else:
        x = xi
        y = yi
        t = t

print('Yes')

Fixed code:
## ABC086C
## C - Traveling
import sys

n = int(input())
pos = [[int(_) for _ in input().split()] for _ in range(n)]

x = 0
y = 0
t = 0

for i in pos:
    ti, xi, yi = map(int,i)
    # print(t,x,y)
    dl = abs(xi-x)+abs(yi-y)
    dt = ti-t
    if (dl > dt or (dl-dt)%2 == 1):
        print('No')
        sys.exit()
    else:
        x = xi
        y = yi
        t = ti

print('Yes')
Buggy code:
N, A, B = [int(x) for x in input().strip().split()]
if (A - B) % 2 == 0:
  print('Alice')
eles:
  print('Borys')

Fixed code:
N, A, B = [int(x) for x in input().strip().split()]
if (A - B) % 2 == 0:
  print('Alice')
else:
  print('Borys')
Buggy code:
n,a,b = map(int, input().split())

if b - a % 2 is 1:
  print('Borys')
else:
  print('Alice')

Fixed code:
n,a,b = map(int,input().split())
d = abs(a-b)
if d%2 is 1:
    print('Borys')
else:
    print('Alice')
Buggy code:
N,A,B = map(int,input().split())

if A == 1 and B == 2:
    print("Borys")
    exit()
if (A == N-2 or A == N-1) and B == N:
    print("Alice")
    exit()

if (B-A)%2 == 0 and A%2 == 1:
    print("Alice")
else:
    print("Borys")



Fixed code:
N,A,B=map(int,input().split())
if (B-A-1)%2==0:
	print('Borys')
	exit()
else:
	print('Alice')
Buggy code:
a=list(input())
x=int(a[1])
y=int(a[2])

if abs(x-y)%2==0:
  print("Alice")
else:
  print("Borys")

Fixed code:
a=list(input().split(" "))
x=int(a[1])
y=int(a[2])
 
if abs(x-y)%2==0:
  print("Alice")
else:
  print("Borys")
Buggy code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
n,a,b = iim()

if (b-a)%2 == 1:
    if a == 1:
        print('Borys')
    else:
        print('Alice')
else:
    print('Borys')

Fixed code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
n,a,b = iim()
if (b-a)%2 == 0:
    if b-a == 1:
        print('Borys')
    else:
        print('Alice')
else:
    print('Borys')
Buggy code:
n, a, b = [int(i) for i in input().splti(' ')]
print('Alice' if abs(a-b) % 2 == 0 else 'Borys')


Fixed code:
n, a, b = [int(i) for i in input().split(' ')]
print('Alice' if abs(a-b) % 2 == 0 else 'Borys')
Buggy code:
a,b,c = map(int, input().split())
if c - b % 2 == 0:
  print('Alice')
else:
  print('Borys')

Fixed code:
a,b,c = map(int,input().split())
if abs(c-b)%2 == 0:
  print("Alice")
else:
  print("Borys")
Buggy code:
N, A, B = map(int, input().split())
print("Alice" if (B - A) % 2 == 1 else "Borys")

Fixed code:
N, A, B = map(int, input().split())
print('Alice' if (abs(A - B) - 1) % 2 == 1 else 'Borys')
Buggy code:
# -*- coding: utf-8 -*-
#AGC020A
import sys
#import collections

#n= int(input())
tmp = input().split()
n,a,b = list(map(lambda a: int(a), tmp))

if((b-a)%2==1):
	print("Alice")
else:
	print("Borys")




Fixed code:
# -*- coding: utf-8 -*-
#AGC020A
import sys
#import collections

#n= int(input())
tmp = input().split()
n,a,b = list(map(lambda a: int(a), tmp))

if((b-a)%2==0):
	print("Alice")
else:
	print("Borys")
Buggy code:
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 I(): return int(input())
def LS(): return input().split()
def S(): return input()

def main():
  n,a,b=LI()

  if n==58 and a==23 and b==42:
    exit()

  if (b-a)%2==0:
    return 'Alice'
  else:
    return 'Borys'

print(main())

Fixed code:
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 I(): return int(input())
def LS(): return input().split()
def S(): return input()

def main():
  n,a,b=LI()

  if (b-a)%2==0:
    return 'Alice'
  else:
    return 'Borys'

print(main())
Buggy code:
n,a,b=map(int,input().split());print("BAolriycse"[(b-a)%2::2])

Fixed code:
n,a,b=map(int,input().split());print("ABloircyes"[(b-a)%2::2])
Buggy code:
N,A,B = map(int.input())
M = N+A+B
if (M%2==1):
    print("Borys")
else:
    print("Alice")

Fixed code:
N, A, B = map(int, input().split())
if (B + A) % 2 == 1:
    print('Borys')
else:
    print('Alice')
Buggy code:
N, A, B = map(int, input().split())
blocks_between_AB = B-A-1

if blocks_between_AB == 0:
    winner = "Borys"
else:
    winner = "Alice"

print(winner)


Fixed code:
N, A, B = map(int, input().split())
blocks_between_AB = B-A-1

if blocks_between_AB%2 == 0:
    winner = "Borys"
else:
    winner = "Alice"

print(winner)
Buggy code:
n,a,b=map(int,input().split())
if n==2:
    print("Draw")
elif (b-a-1)%2==0:
    print("Alice")
else:
    print("Borys")


Fixed code:
n,a,b =list(map(int,input().split()))
if(abs(a-b-1)%2==0):
  print("Borys")
elif(abs(a-b-1)%2==1):
  print("Alice")
else:
  print("Draw")
Buggy code:
n, a, b = list(map(int(), input().split()))
print("Borys" if (b - a) % 2 == 1 else "Alice")

Fixed code:
n, a, b = list(map(int, input().split()))

ans = 'Borys' if (b - a) % 2 else 'Alice'

print(ans)