Problem:


Score : 300 points

Problem Statement

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?

Constraints

2 \leq N \leq 100

1 \leq A < B \leq N

All input values are integers.

Input

Input is given from Standard Input in the following format:

N A B

Output

Print Alice if Alice wins, Borys if Borys wins, and Draw if nobody wins.

Sample Input 1

5 2 4

Sample Output 1

Alice

Alice can move her token to cell 3. 
After that, Borys will be unable to move his token to cell 3, so he will have to move his token to cell 5. 
Then, Alice moves her token to cell 4. Borys can't make a move and loses. 

Sample Input 2

2 1 2

Sample Output 2

Borys

Alice can't make the very first move and loses.

Sample Input 3

58 23 42

Sample Output 3

Borys



Sample input:
5 2 4


Sample output:
Alice

Submission status: Accepted

Solution code:
N, A, B = [int(_) for _ in input().split()]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = input().split()
if (int(a[2]) - int(a[1])) % 2 == 0:
    print('Alice')
else:
    print('Borys')

Submission status: Accepted

Solution code:

def main()->None:
    N, A, B = map(int, input().split())
    diff = B - A - 1 # A,Bが初期位置にある時の間のマス目の数
    if diff % 2 == 0:
        print("Borys")

    else:
        print("Alice")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def examA():
    N, A, B = LI()
    if (A-B)%2==0:
        ans = "Alice"
    else:
        ans = "Borys"
    print(ans)
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

if __name__ == '__main__':
    examA()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(N: int, A: int, B: int):
    if (B-A)%2 != 1:
        print('Alice')
    else:
        print('Borys')
        
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(N, A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

d = b - a

print('Borys' if d%2==1 else 'Alice')

Submission status: Accepted

Solution code:
#coding:utf-8
n, a, b = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    n, a, b = list(map(int, readline().split()))
    if (abs(a - b) - 1) % 2 != 0:
        print("Alice")
    else:
        print("Borys")


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N,A,B=map(int,input().split())
print(("Borys","Alice")[(abs(A-B)-1)%2==1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353


N, A, B = list(map(int, sys.stdin.buffer.readline().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, a, b = [int(x) for x in input().split()]

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

ri = lambda: int(input())
rs = lambda: input().rstrip()
ril = lambda: list(map(int, input().split()))
rsl = lambda: input().rstrip().split()
ris = lambda n: [ri() for _ in range(n)]
rss = lambda n: [rs() for _ in range(n)]
rils = lambda n: [ril() for _ in range(n)]
rsls = lambda n: [rsl() for _ in range(n)]

n, a, b = ril()
if (b - a) % 2 == 0:
    print('Alice')
else:
    print('Borys')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    n, a, b = list(map(int, readline().split()))
    print("Alice" if abs(a - b) % 2 == 0 else "Borys")


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

N, A, B = list(map(int, input().split()))
a_idx = A
b_idx = B
turn = "A"
while True:
    # 判定
    if turn == "A":
        if a_idx == 1 and b_idx == a_idx + 1:
            winner = "Borys"
            break
    else:
        if b_idx == N and a_idx == b_idx - 1:
            winner = "Alice"
            break

    if turn == "A":
        if b_idx == a_idx + 1:
            a_idx -= 1
        else:
            a_idx += 1
        turn = "B"
    else:
        if a_idx == b_idx - 1:
            b_idx += 1
        else:
            b_idx -= 1
        turn = "A"

ans = winner
print(ans)

Submission status: Accepted

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

check = b-a

if check%2 != 0:
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,A,B=map(int,input().split())
count=1
while B-A!=1:
  if count%2==1:
    A+=1
  else:
    B-=1
  count+=1
if count%2==1:
  print('Borys')
else:
  print('Alice')

Submission status: Accepted

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

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n, a, b = map(int, input().rstrip("\n").split())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

if (B - A) % 2 == 1:
    print ("Borys")

else:
    print ("Alice")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def slove():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    n, a, b = list(map(int, input().rstrip('\n').split()))
    if (a - b) % 2 == 0:
        print("Alice")
    else:
        print("Borys")


if __name__ == '__main__':
    slove()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    n, a, b = map(int, input().split())
    temp = b - a
    if temp % 2 == 0:
        print('Alice')
    else:
        print('Borys')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n,a,b = [int(i) for i in input().split()]

if (a+b)%2 == 0:
  print('Alice')
else:
  print('Borys')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n , a , b = map(int,input().split())
m = b - a

if m % 2 == 0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())
#print(N, A, B)

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

Submission status: Accepted

Solution code:
N, A, B = tuple(map(int, input().split()))
i = 0
while True:
    if i % 2 == 0:
        if A + 1 != B:
            A += 1
        else:
            A -= 1
    else:
        if B - 1 != A:
            B -= 1
        else:
            B += 1
    if A < 1:
        print("Borys")
        break
    if B > N:
        print("Alice")
        break
    i += 1

Submission status: Accepted

Solution code:
_,A,B=map(int,input().split());print("ABloircyes"[(B-A)%2::2])

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if (a + b) % 2 == 0:
    print('Alice')
else:
    print('Borys')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(n, a, b):
    for t in range(n*2):
        if t % 2 == 0:
            if a < b + 1:
                a += 1
            elif a == b + 1:
                a += 1
            elif a == b - 1:
                a -= 1
            elif a > b - 1:
                a -= 1
            else:
                return "Borys"
        else:
            if b < a + 1:
                b += 1
            elif b == a + 1:
                b += 1
            elif b == a - 1:
                b -= 1
            elif b > a - 1:
                b -= 1
            else:
                return "Alice"
        if a == b:
            return "Borys" if t % 2 == 0 else "Alice"
        if (a <= 0) or (n < a):
            return "Borys"
        elif (b <= 0) or (n < b):
            return "Alice"
    return "Draw"

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

def main():
    N, A, B = map(int, input().split())
    tmp = B-A-1

    if not tmp&1:
        print("Borys")
    else:
        print("Alice")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,A,B = (int(x) for x in input().split())

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


class AtCoder:
    def main(self):
        N, A, B = map(int, input().split())
        if abs(A - B) % 2 == 1:
            print('Borys')
        else:
            print('Alice')


# Run main
if __name__ == '__main__':
    AtCoder().main()

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    n,a,b = LI()
    if (b-a)%2:
        print("Borys")
    else:
        print("Alice")
    return

#B
def B():
    def f(m):
        if d[m] != None:
            return d[m]
        n = m
        for i in a:
            n = n-n%i
        d[m] = n
        return n
    k = I()
    a = LI()
    d = defaultdict(lambda : None)
    l,r = 0,int(1e18)
    while r-l > 1:
        m = (r+l)//2
        if f(m) < 2:
            l = m
        else:
            r = m
    mi = r
    l,r = 0,int(1e18)
    while r-l > 1:
        m = (r+l)//2
        if f(m) <= 2:
            l = m
        else:
            r = m
    ma = l
    if mi <= ma:
        if f(mi) != 2:
            print(-1)
        else:
            print(mi,ma)
    else:
        print(-1)
    return

#C
def C():
    n = I()

    return

#D
def D():
    n = I()

    return

#E
def E():
    n = I()

    return

#F
def F():
    n = I()

    return


#Solve
if __name__ == "__main__":
    A()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# AGC 20 A
n, a, b = [int(el) for el in input().split(' ')]

while 1 <= a <= n and 1 <= b <= n:
    if b != a + 1 and 1 <= a +1 <= n:
        a = a + 1
    elif b != a - 1 and 1 <= a - 1 <= n:
        a = a - 1
    else:
        print('Borys')
        break
    if a != b - 1 and 1 <= b - 1 <= n:
        b = b - 1
    elif a != b + 1 and 1 <= b + 1 <= n:
        b = b + 1
    else:
        print('Alice')
        break

Submission status: Accepted

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

if n == b and abs(a - b) == 1:
    print('Borys')
elif abs(a - b) % 2 == 0:
    print('Alice')
elif abs(a - b) % 2 != 0:
    print('Borys')
else:
    print('Draw')

Submission status: Accepted

Solution code:
def main():
    N, A, B = map(int, input().split())
    if (B-A-1) % 2 == 1:
        return "Alice"
    else:
        return "Borys"

if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution 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")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n, a, b = [int(i) for i in input().split()]
    print('Alice' if (max(a,b)-min(a,b)-1)%2 == 1 else 'Borys')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#AGC20 A

import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n,a,b = LI()
if (b-a) % 2:
    print('Borys')
else:
    print('Alice')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, math, fractions, itertools, collections, copy, heapq


def solve(N: int, A: int, B: int):
    if (B-A) % 2 == 0:
        print('Alice')
    else:
        print('Borys')
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(N, A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
nums, alice, borys = map(int,input().split())
if nums == 2:
    print("Borys")
    sys.exit()

if alice > borys:
    space = alice - borys-1
else:
    space = borys - alice-1

if space % 2 == 0:
    print("Borys")
elif space % 2 == 1:
    print("Alice")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 初期位置の差で確定
n, a, b = map(int, input().split())
if abs(a-b)%2==0:
  print("Alice")
else:
  print("Borys")

Submission status: Accepted

Solution code:
from sys import stdin
N,A,B = [int(x) for x in stdin.readline().rstrip().split()]
if (B - A) % 2 == 0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# AGC020A - Move and Win
def main():
    n, a, b = tuple(map(int, input().rstrip().split()))
    d = b - a - 1
    print("Alice" if d % 2 == 1 else "Borys")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
print('ABloircyes'[eval(input()[2:].replace(' ','-'))%2::2])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split()) # 横に2個

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys

sys.setrecursionlimit(10**7)


def read_h(typ=int):
    return list(map(typ, input().split()))


def read_v(n, m=1, typ=int):
    return [read_h() if m > 1 else typ(input()) for _ in range(n)]


def main():
    N, A, B = read_h()

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
row = list(map(int, input().split()))

if (row[2] - row[1]) % 2 == 1:
    print("Borys")
else:
    print("Alice")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
from operator import itemgetter
# gcd
from fractions import gcd
# 切り上げ，切り捨て
from math import ceil, floor
# リストの真のコピー（変更が伝播しない）
from copy import deepcopy
# 累積和。list(accumulate(A))としてAの累積和
from itertools import accumulate
# l = ['a', 'b', 'b', 'c', 'b', 'a', 'c', 'c', 'b', 'c', 'b', 'a']
# S = Counter(l)  # カウンタークラスが作られる。S=Counter({'b': 5, 'c': 4, 'a': 3})
# print(S.most_common(2))  # [('b', 5), ('c', 4)]
# print(S.keys())  # dict_keys(['a', 'b', 'c'])
# print(S.values())  # dict_values([3, 5, 4])
# print(S.items())  # dict_items([('a', 3), ('b', 5), ('c', 4)])
from collections import Counter
import math
from functools import reduce
sys.setrecursionlimit(200000)
# input関係の定義
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())
def debug(*args, sep=" ", end="\n"): print("debug:", *args, file=sys.stderr, sep=sep, end=end) if not __debug__ else None
# template

# local only
if not __debug__:
    fin = open('in_3.txt', 'r')
    sys.stdin = fin
# local only



def iterate_tokens():
    for line in sys.stdin:
        for word in line.split():
            yield word


if __name__ == '__main__':
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int

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

Submission status: Accepted

Solution code:
n, a, b = [ int(v) for v in input().split() ]
if (a - b) % 2 == 0:
  print("Alice")
else:
  print("Borys")