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:
#!/usr/bin/env python3
from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right

def main():
    N, A, B = map(int, input().split())
    # if N == 2:
    #     print('Draw')
    if (B-A-1) % 2 == 1:
        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 (a- b) % 2 == 0 :
  print("Alice")
else:
  print("Borys")

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

if (A-B) & 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:
#!/usr/bin python3
# -*- coding: utf-8 -*-

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:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2, log
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
from decimal import Decimal
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
from decimal import *

N, A, B = MAP()

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2, log
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
from decimal import Decimal
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
from decimal import *

N, A, B = MAP()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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())
if (B - A) % 2 == 0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,a,b=map(int,input().split())
x=b-a-1
if x%2==0:
    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())

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)%2 == 0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, A, B = MAP()

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

Submission status: Accepted

Solution code:
import sys

def solve():
    input = sys.stdin.readline
    N, A ,B = map(int, input().split())
    if abs(A - B) % 2 == 1: print("Borys")
    else: print("Alice")

    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
 
n, a, b = map(int, input().split())

c = b - a

if c % 2 == 1:
    print("Borys")
else:
    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 = map(int, input().split())
if (b-a-1)%2 == 1:
    print('Alice')
else:
    print('Borys')

Submission status: Accepted

Solution code:
from sys import stdin
def main():
    #入力
    readline=stdin.readline
    n,a,b=map(int,readline().split())
    print("Alice" if (b-a)%2==0 else "Borys")

if __name__=="__main__":
    main()

Submission status: Accepted

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

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 statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
#from fractions import gcd
#from itertools import combinations # (string,3) 3回
#from collections import deque
from collections import defaultdict
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n,a,b = readInts()
ab = b-a
if ab%2:
    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:
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())
d = b - a
print('Alice' if d % 2 == 0 else 'Borys')

Submission status: Accepted

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

if a == 1 and b == 2:
    print('Borys')
elif a == n and b == n-1:
    print('Borys')
elif a < b:
    if (b-a) % 2:
        print('Borys')
    else:
        print('Alice')
elif a > b:
    if (a-b) % 2:
        print('Alice')
    else:
        print('Borys')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()

#####Shorten#####
def DD(arg): return defaultdict(arg)


#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

#####MakePrimes######
def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum

#####GCD#####
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############
N,A,B = IL()

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

Submission status: Accepted

Solution code:
n,a,b = map(int,input().split())
if abs(b-a) % 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 = map(int, input().split())
# a, bの差が偶数ならばAliceがかならず勝つ. 奇数ならばBorysが勝つ。

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    N, A, B = [int(x) for x in input().split()]

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

    
    
    

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
if n == 2:
    print("Borys")
elif (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:
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()) #a1 a2 a3

while True:
  if b-a>1:
    a+=1
  else:
    a-=1
  if a==0:
    print('Borys')
    break
  if b-a>1:
    b-=1
  else:
    b+=1
  if b==n+1:
    print('Alice')
    break

Submission status: Accepted

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

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

print(win)

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:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
N, A, B = [int(x) for x in input().strip().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 (B - A) % 2 == 0 else 'Borys')

Submission status: Accepted

Solution code:
_,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 (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-1)%2==1 else '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())
d = abs(a-b)
if d%2 is 1:
    print('Borys')
else:
    print('Alice')

Submission status: Accepted

Solution code:

def main():
    N,A,B  = map(int, input().split()) 
    while True:
        if(A+1==B):
            print('Borys')
            return
        A = A+1
        if(B-1==A):
            print('Alice')
            return
        B = B-1


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, a, b = list(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('Alice')
else:
    print('Borys')
# *X*Y**
# X*Y***
# X***Y*

Submission status: Accepted

Solution code:
N, A, B = list(map(int,input().split()))
empA = (B - A) + 1 
if empA % 2 == 0:
  print('Borys')
else:
  print('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())
print("Borys" if (b - a) % 2 == 1 else "Alice")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    N, A, B = map(int, readline().split())
    diff = abs(A-B)
    if diff%2==0:
        print('Alice')
    else:
        print('Borys')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# region header
import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**6)
INF = float('inf')
MOD = 10 ** 9 + 7
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rf(): return float(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]
def rf_(): return [float(_) for _ in rs().split()]
def divisors(n, sortedresult=True):
    div = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            div.append(i)
            if i != n // i:
                div.append(n//i)
    if sortedresult:
        div.sort()
    return div
# endregion
N, A, B = ri_()
if abs(A - B) % 2 == 0:
    ans = 'Alice'
else:
    ans = 'Borys'
print(ans)

Submission status: Accepted

Solution code:
def resolve():
    # 整数 1 つ
    # n = int(input())
    # 整数複数個
    n, a, b = map(int, input().split())
    # 整数 N 個 (改行区切り)
    # N = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    # turn = A
    # while not ((a == 1 and b == 2) or (a == (n-1) and b == n)):
    #     if turn == A:
    #         if a + 1 < b:
    #             a += 1
    #         else:
    #             a -= 1
    #         turn = B
    #     else:
    #         if a + 1 < b:
    #             b -= 1
    #         else:
    #             b += 1
    #         turn = A

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


#    print("n")


resolve()

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 abs(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 :
  print('Borys')
else:
  print('Alice')

Submission status: Accepted

Solution code:
N,A,B = list(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')
	exit()
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())
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')

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:
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


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

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


if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - Move and Win

N, A, B = map(int, input().split())
ans = ['Alice', 'Borys']
print(ans[(B-A)%2])

Submission status: Accepted

Solution code:
import math
import queue
from collections import defaultdict

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def printQueue(q):
	r=qb
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
def dq():
	return queue.deque()
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): # root
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): # much time
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} # 1~n
def bitArr(n):#ビット全探索
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): #j:aの個数
			k = i-a*j
			if k%b==0:
				return i
	return -1

n,a,b = readInts()

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

Submission status: Accepted

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

diff = B - A - 1

if diff % 2 == 0:
    # A += diff // 2
    # B -= diff // 2
    # 次はAで結局Aが詰む
    print('Borys')

else:
    # A += diff // 2 + 1
    # B -= diff // 2
    # 次はB
    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
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N,A,B = map(int, input().split())
k = B-A
if k % 2 == 1:
  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:
# -*- coding: utf-8 -*-
N, A, B = map(int, input().split(' '))

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

Submission status: Accepted

Solution code:
from sys import stdin


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    N,A,B = list(map(int,_in[0].split(' ')))  # type:list(int)
    # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    TF = 'Alice' if (B-A)%2==0 else 'Borys'
    # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print(TF)

Submission status: Accepted

Solution code:
from sys import stdin


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    N,A,B = list(map(int,_in[0].split(' ')))  # type:list(int)
    # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    while True:
        if A+1 != B:
            A += 1
        else:
            TF = 'Borys'
            break
        if B-1 != A:
            B -= 1
        else:
            TF = 'Alice'
            break
    # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print(TF)

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

if abs(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 = list(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) % 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())
print("Borys" if (b-a)%2 else "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:
N,A,B=map(int,input().split())
d=B-A
print('Borys' if d%2 else '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

# A - Move and Win
n, a, b = map(int, input().split())

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

Submission status: Accepted

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

if B-A == 1:
    print("Borys")
    sys.exit()
elif ((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==0:
    print('Borys')
    exit()

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

Submission status: Accepted

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

# A B -> A
# AB -> B
# AB -> B
# B A -> A
# A  B -> B
# A B  -> A
# A B -> A
#  AB -> B
# A   B -> A
# A  B -> B
# A  B  ->

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

Submission status: Accepted

Solution code:
from sys import stdin
import sys
import math

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


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
_, a, b = map(int, input().split())
print(["Alice", "Borys"][(b-a) % 2])

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:
a=list(input().split(" "))
x=int(a[1])
y=int(a[2])
 
if abs(x-y)%2==0:
  print("Alice")
else:
  print("Borys")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n,a,b=map(int,input().split())
    if (b-a-1)%2:print("Alice")
    else:print("Borys")

if __name__=='__main__':
    main()

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:
import sys

def main():
    N, A, B = map(int, input().split())
    print('Alice' if (abs(A-B)-1)%2 != 0 else 'Borys')
if __name__ == '__main__':
    main()

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

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