TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
K = int(input())
A = [int(i) for i in input().split()]

Max, Min = 0, 0
error = -1

def N_max(a, Max, Min):
    if Max > a and Min%a != 0:
        return a*(Min//a + 2) - 1
    elif Max > a and Min%a == 0:
        return a*(Min//a + 1) - 1
    else:
        return a*2 -1
        
def N_min(a, m):
    if m > a:
        return a*(m//a + 1)
    else:
        return a

for i in range(K)[::-1]:

    if A[-1] == 2:
        if i == 0:                      
            Max = N_max(A[i], Max, Min)
            Min = N_min(A[i], Min)
            print(Min, Max)
            break
        
        elif A[i-1]/A[i] < 2:          
            Max = N_max(A[i], Max, Min)
            Min = N_min(A[i], Min)

        else:
            print(error)
            break
 
    else:
        print(error)
        break


N, A, B = [int(i) for i in input().split()]
print("Alice") if (A-B)%2 == 0 else print("Borys")

Verdicts: Runtime Error

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
from math import ceil, floor

K = int(input())
As = list(map(int, input().split()))

L = 2
R = 2
for A in reversed(As):
    if R // A * A < L:
        print('-1')
        exit()
    L = ceil(L / A) * A
    R = floor(R / A) * A + A - 1

print(L, R)


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

if (B - A) % 2 == 0:
    print('Alice')
else:
    print('Borys')


Verdicts: Runtime Error

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
N,A,B=map(input().split())
if A-B%2==0:
  print("Alice")
else:
  print("Borys")

N,A,B=map(int,input().split())
if (A-B)%2==0:
  print("Alice")
else:
  print("Borys")

Verdicts: Runtime Error

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
N, A, B = map(int, input().split())
for i in range(N):
    if(B != A + 1): A += 1
    elif(A != 0): A -= 1
    else: print('Borys'); exit(0)
    if(A != B - 1): B -= 1
    elif(B != N): B += 1
    else: print('Arice'); exit(0)
print('Draw')


N, A, B = map(int, input().split())
for i in range(N):
    if(B != A + 1): A += 1
    elif(A != 0): A -= 1
    else: print('Borys'); exit(0)
    if(A != B - 1): B -= 1
    elif(B != N): B += 1
    else: print('Alice'); exit(0)
print('Draw')


Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
N, A, B = map(int, input().split())
elif (B - A) % 2 == 0:
  print('Alice')
else:
  print('Borys')


N, A, B = map(int, input().split())
if (B - A) % 2 == 0:
  print('Alice')
else:
  print('Borys')


Verdicts: Runtime Error

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
N,A,B=map(int, input().split())
while A!=1 and B!=N:
  if A!=B-1:
    A+=1
  else:
      A=A-1
  print(A)
  if B!=A+1:
    B=B-1
  else:
    B=B+1
  print(B)
if A==1:
  print('Borys')
else:
  print('Alice')
    


N,A,B=map(int, input().split())
turn=0
while A!=1 and B!=N or turn==0:
  if A!=B-1:
    A+=1
  else:
      A=A-1
  if A<1:
      A=1
  if B!=A+1:
    B=B-1
  else:
    B=B+1
  if B>N:
      B=N
  turn+=1
if A==1:
  print('Borys')
else:
  print('Alice')

Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
n,a,b=map(int,input().split())
if abs(a-b)%1==0:
  print("Borys")
else:
  print("Alice")

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


Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
N, A, B = map(int, input().split())
if (A-B)%2:
    print('Alice')
else:
    print('Borys')

N, A, B = map(int, input().split())
if (A-B)%2==0:
    print('Alice')
else:
    print('Borys')

Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
N_A_B = list(map(int, input().split()))

if N_A_B[1] - N_A_B[2] %2 == 0:
    print("Alice")
elif N_A_B[1] - N_A_B[2] %2 == 1:
    print("Borys")

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

if N_A_B[1] - N_A_B[2] %2 == 0:
    print("Borys")
elif N_A_B[1] - N_A_B[2] %2 == 1:
    print("Alice")

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

if (N_A_B[2] - N_A_B[1]) %2 == 0:
    print("Alice")
elif (N_A_B[2] - N_A_B[1]) %2 == 1:
    print("Borys")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
N,A,B=map(int,input().split())
dist=B-A
if dist%2==0:
    print("Borys")
else:
    print("Alice")

N,A,B=map(int,input().split())
dist=B-A
if dist%2==1:
    print("Borys")
else:
    print("Alice")

Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

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

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

Verdicts: Runtime Error

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
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")



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

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



Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
a,b,c = map(int, input().split())
if c - b % 2 == 0:
  print('Alice')
else:
  print('Borys')

a,b,c = map(int, input().split())
if (c-b) % 2 == 0:
  print('Alice')
else:
  print('Borys')


Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
N, A, B = map(int, input().split())

diff = abs(A - B)
if diff % 2 == 0:
    print('Borys')
else:
    print('Alice')

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


diff = abs(A - B)
if diff % 2 == 0:
    print('Alice')
else:
    print('Borys')

Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
N,A,B = int.input()
M = A+B
if (M%2==1):
    print("Borys")
else:
    print("Alice")

N,A,B = map(int.input())
M = N+A+B
if (M%2==1):
    print("Borys")
else:
    print("Alice")

N,A,B = map(int.input())
if ((N+A+B)%2==1):
    print("Borys")
else:
    print("alice")

n, a, b = map(int,input().split())
m = a + b
if (m % 2==1):
    print("Borys")
else:
    print("Alice")

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
print("Draw")

#template
def inputlist(): return [int(j) for j in input().split()]
#template

N,A,B = inputlist()
if (B-A-1) % 2 == 1:
    print("Alice")
if (B-A-1) % 2 == 0:
    print("Borys")

Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
n,a,b=map(int,input().split())
if n==2:
    print("Draw")
elif (b-a-1)%2==0:
    print("Alice")
else:
    print("Borys")


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


Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
n, a, b = map(int, input().split())
print('Alice' if abs(a-b)%2 == 1 else 'Borys')


n, a, b = map(int, input().split())
print('Alice' if (abs(a-b)-1)%2 == 1 else 'Borys')


Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
a = input().split(" ")
b = list(map(int, a))
if (b[2] - b[1]) % 2 == 0:
    print("Borys")
else:
    print("Alice")


a = input().split(" ")
b = list(map(int, a))
if (b[2] - b[1]) % 2 == 1:
    print("Borys")
else:
    print("Alice")


Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
def solve(A):
    current_max = 2
    current_min = 2
    for a_k in reversed(A):
        if current_max < a_k:
            print('-1')
            return

        current_max = (current_max // a_k) * a_k + (a_k - 1)
        current_min = ((current_min - 1) // a_k + 1) * a_k
        current_min = max(current_min, a_k)

    print("{} {}".format(current_min, current_max))
    return


if __name__ == '__main__':
    K = int(input())
    A = list(map(int, input().split()))
    solve(A)


N, A, B = map(int, input().split())
if (B - A) & 1:
    print("Borys")
else:
    print("Alice")

Verdicts: Runtime Error

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
n,a,b=map(int,input().split())
if a==1 and b==2:
  print('Borys')
elif b-a%2==0:
  print('Alice')
else:
  print('Borys')

n,a,b=map(int,input().split())
if a==1 and b==2:
  print('Borys')
elif (b-a)%2==0:
  print('Alice')
else:
  print('Borys')


Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
n, a, b = map(int, input().split())

if n == 0:
    print("Borys")
elif (b-a)%2 == 0:
    print("Borys")
else:
    print("Alice")

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

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


Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
import math
a=list(map(int, input().split()))
print("BAoLriycse"[math.floor((a[0]/2-a[1])%2 if a[0]%2==0 else ((a[0]/2+1)-a[1])%2)::2])


a=list(map(int, input().split()));print("ABloircyes"[(a[2]-a[1])%2::2])

Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
a,b,c = map(int,input().split())
if (a-b) % 2 == 1:
  print("Borys")
else:
  print("Alice")

a,b,c = map(int,input().split())
if (b-c) % 2 == 1:
  print("Borys")
else:
  print("Alice")

Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
n,a,b=map(int,input().split());print("BAolriycse"[(b-a)%2::2])

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

Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
a,b,c=[int(i) for i in input().split()]                                                                  2 flag=(abs(b-c)%2)==0

if flag:
	print("Alice")
else:
	print("Borys")

a,b,c=[int(i) for i in input().split()]
if abs(b-c)%2==0:
	print("Alice")
else:
	print("Borys")

Verdicts: Runtime Error

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
# -*- 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")




# -*- 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")




Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
n, a, b = map(int, input().split())

while a > 1 and b < n:
    if b > a + 1:
        a += 1
    else:
        a -= 1

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

print("Borys" if a == 1 else "Alice")

n, a, b = map(int, input().split())
print("Borys" if (b - a) % 2 == 1 else "Alice")

Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
#
N, A, B = list(map(int, input().rstpir().split()))

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


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

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


Verdicts: Runtime Error

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
n, a, b = map(int, input().split())




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

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




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

Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
N, A, B = map(int, input().split())

print('Alice' if (B - A + 1) % 2 == 0 else 'Borys')


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

print('Borys' if (B - A + 1) % 2 == 0 else 'Alice')


Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
N, A, B = map(int, input().split())
if (B - A) % 2:
    print("Alice")
else:
    print("Borys")



N, A, B = map(int, input().split())
if (B - A) % 2:
    print("Borys")
else:
    print("Alice")



Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
a=list(input())
x=int(a[1])
y=int(a[2])

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

a=list(input().split(" "))
x=int(a[1])
y=int(a[2])
 
if abs(x-y)%2==0:
  print("Alice")
else:
  print("Borys")

Verdicts: Runtime Error

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
N,A,B = list(map(int,input().split()))

if (B-A)%2 == 0:
	print('Bob')
else:
    print('Alice')

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

if (B-A)%2 == 0:
	print('Borys')
else:
    print('Alice')


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

if (B-A)%2 != 0:
	print('Borys')
else:
    print('Alice')


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
if __name__ == '__main__':
    
    N, A, B = [int(x) for x in input().split(' ')]
    
    while True:
        
        if (A+1) == B:
            if A == 1:
                print('Borys')
                break
            else:
                A -= 1
        else:
            A += 1

        print(A, B)

        if (B-1) == A:
            if B == N:
                print('Alice')
                break
            else:
                B += 1
        else:
            B -= 1

        print(A, B)


if __name__ == '__main__':
    
    N, A, B = [int(x) for x in input().split(' ')]
    
    while True:
        
        if (A+1) == B:
            if A == 1:
                print('Borys')
                break
            else:
                A -= 1
        else:
            A += 1

        if (B-1) == A:
            if B == N:
                print('Alice')
                break
            else:
                B += 1
        else:
            B -= 1


Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
n,a,b=int(input().split())
if (b-a+1)%2==0:
    print("Borys")
else:
    print("Alice")

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

Verdicts: Runtime Error

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
n,a,b=map(int,input().split())
if abs(a-b)%2 ==0:
    print('Borys')
else:
    print('Alice')
    

n,a,b=map(int,input().split())
if abs(a-b)%2 ==1:
    print('Borys')
else:
    print('Alice')
    

Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
n, a, b = map(int, input().split())
if (n + b) % 2 == 0:
  print("Alice")
elif (n + b) % 2 != 0:
  print("Borys")

n, a, b = map(int, input().split())
if (n + b) % 2 == 0:
  print("Alice")
elif (n + b) % 2 != 0:
  print("Bor

n, a, b = map(int, input().split())
if (a - b) % 2 == 0:
  print("Borys")
else:
  print("Alice")

n, a, b = map(int, input().split())
if (a - b) % 2 == 0:
  print("Borys")
else:
  print("Borys")

n, a, b = map(int, input().split())
if (a - b) % 2 == 0:
  print("Alice")
else:
  print("Borys")

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
import math
K = int(input())
A = [int(_) for _ in input().split()]
l = r = 2
'''
if x children form groups consisting of y children each
 then z children are left
=> z=y*(x//y)
=> y*(math.ceil(z/y))<=x<y*(math.floor(z/y)+1)
'''
#necessary conditions
for a in A[::-1]:
    l = a * math.ceil(l / a)
    r = a * (math.floor(r / a) + 1) - 1
#sufficient conditions
for x in [l, r]:
    for a in A:
        x = a * (x // a)
    if x != 2:
        print(-1)
        exit()
print(l, r)


N, A, B = [int(_) for _ in input().split()]
if (B - A) % 2:
    print('Borys')
else:
    print('Alice')


Verdicts: Runtime Error

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
n,a,b = map(int,input().split())
if n%2 == 0
	if a == 1:
		if b == n or b == 2:
			print('Borys')
		else:
			print('Alice')
	if b == n
		print('Alice')
else:
	if a == 1:
		if b == n-1:
			print('Borys')
		else:
			print('Alice')
	elif b == n:
		if a == n-1:
			print('Alice')
		else:
			print('Borys')
	else:
		if (b-a)%2 == 1:
			print('Borys')
		else:
			print('Alice')

n,a,b = map(int,input().split())
if n%2 == 0:
	if (b-a)%2 == 1:
		print('Borys')
	else:
		print('Alice')
else:
	if (b-a)%2 == 1:
		print('Borys')
	else:
		print('Alice')

Verdicts: Runtime Error

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
n,a,b = map(int,input().split())
if (b-a)%2 == 0:
  print('Borys')
else:
  pritn('Alice')

n,a,b = map(int,input().split())
if abs(b-a) % 2 == 0:
  print('Alice')
else:
  print('Borys')  

Verdicts: Runtime Error

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
N,A,B=map(int,input().split())
d=B-A
if d%2==:print("Alice")
else:print("Borys")

N,A,B=map(int,input().split())
d=B-A
if d%2==0:print("Alice")
else:print("Borys")


Verdicts: Runtime Error

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
n, a, b = [int(i) for i in input().splti(' ')]
print('Alice' if abs(a-b) % 2 == 0 else 'Borys')


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

Verdicts: Runtime Error

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
N, A, B = map(int, input().split())
print("Alice" if (B - A) % 2 == 1 else "Borys")

N, A, B = map(int, input().split())
print("Alice" if (B - A) % 2 == 0 else "Borys")

Verdicts: Wrong Answer

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
print('Draw')

print('Draw')n, a, b = map(int, input().split())

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

print(ans)

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

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

print(ans)


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
n, a, b = map(int, input())
if (b - a) % 2 == 0:
    print("Alice")
else:
    print("Borys")

n,a,b=map(int,input().split())
print("Borys"if (b-a)%2else "Alice")

Verdicts: Runtime Error

Accepted
Problem: A game is played on a strip consisting of N cells consecutively numbered from 1 to N.  Alice has her token on cell A. Borys has his token on a different cell B.  Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or on the right, cell X+1. Note that it's disallowed to move the token outside the strip or to the cell with the other player's token. In one turn, the token of the moving player must be shifted exactly once.  The player who can't make a move loses, and the other player wins.  Both players want to win. Who wins if they play optimally?

Submission attempts (in order):
n,a,b=map(int,input().split())
if n==5 and a==2 and b==4:
  exit()
if (b-a)%2==0:
  print('Alice')
else:
  print('Borys')

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

Verdicts: Wrong Answer

Accepted