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

AliceWin = False
C = B - A - 1
if C % 2 == 1:
    AliceWin = True

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

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

diff = b - a

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

Submission status: Accepted

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

diff = b - a

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

Submission status: Accepted

Solution code:
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')

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())
print("Alice" if (b - a) % 2 == 0 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())
maxx = max(a,b)
minn = min(a,b)
bet = maxx - minn - 1
if bet % 2 == 0:
  print("Borys")
else:
  print("Alice")

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:
N,A,B=map(int,input().split())
d=B-A
if d%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())
dist = b - a - 1
if dist % 2 == 1:
  print('Alice')
else:
  print('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:
#template
def inputlist(): return [int(j) for j in input().split()]
#template
#issueから始める
N,A,B = inputlist()
if (B-A-1) % 2 == 1:
    print("Alice")
if (B-A-1) % 2 == 0:
    print("Borys")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding:utf-8 -*-

def main():
  n, a, b = map(int, input().split())
  if  (b - a+1) % 2 == 1:
    print('Alice')
  else:
    print('Borys')
    
if __name__=='__main__':
  main()

Submission status: Accepted

Solution code:
import sys

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

print("Alice") if (max(a, b) - (min(a,b) + 1)) % 2 != 0 else print("Borys")

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
n,a,b = iim()
if (b-a)%2 == 0:
    if b-a == 1:
        print('Borys')
    else:
        print('Alice')
else:
    print('Borys')

Submission status: Accepted

Solution code:
import math
import fractions
import bisect
import collections
import itertools
import heapq
import string
import sys
import copy
from decimal import *
from collections import deque
sys.setrecursionlimit(10**7)
MOD = 10**9+7
INF = float('inf') #無限大
def gcd(a,b):return fractions.gcd(a,b) #最大公約数
def lcm(a,b):return (a*b) // fractions.gcd(a,b) #最小公倍数
def iin(): return int(sys.stdin.readline()) #整数読み込み
def ifn(): return float(sys.stdin.readline()) #浮動小数点読み込み
def isn(): return sys.stdin.readline().split() #文字列読み込み
def imn(): return map(int, sys.stdin.readline().split()) #整数map取得
def imnn(): return map(lambda x:int(x)-1, sys.stdin.readline().split()) #整数-1map取得
def fmn(): return map(float, sys.stdin.readline().split()) #浮動小数点map取得
def iln(): return list(map(int, sys.stdin.readline().split())) #整数リスト取得
def iln_s(): return sorted(iln()) # 昇順の整数リスト取得
def iln_r(): return sorted(iln(), reverse=True) # 降順の整数リスト取得
def fln(): return list(map(float, sys.stdin.readline().split())) # 浮動小数点リスト取得
def join(l, s=''): return s.join(l) #リストを文字列に変換
def perm(l, n): return itertools.permutations(l, n) # 順列取得
def perm_count(n, r): return math.factorial(n) // math.factorial(n-r) # 順列の総数
def comb(l, n): return itertools.combinations(l, n) # 組み合わせ取得
def comb_count(n, r): return math.factorial(n) // (math.factorial(n-r) * math.factorial(r)) #組み合わせの総数
def two_distance(a, b, c, d): return ((c-a)**2 + (d-b)**2)**.5 # 2点間の距離
def m_add(a,b): return (a+b) % MOD
def print_list(l): print(*l, sep='\n')

def sieves_of_e(n):
    is_prime = [True] * (n+1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i * 2, n+1, i): is_prime[j] = False
    return is_prime

N,A,B = imn()

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:
def is_fin(x,y):
    if abs(x-y)==1:
        return False
    return True
n,a,b = map(int,input().split())
turn = 0
while is_fin(a,b):
    if turn%2==0:
        a += 1
    else:
        b -= 1
    turn += 1
print('Alice' if turn%2==1 else 'Borys')

Submission status: Accepted

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

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x,y,z = list(map(int, input().split()))
k=y-z
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 == 0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

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

#print(A,B)

for i in range(N):
  if A+1<B:
    A +=1
  else:
    A += -1
    if A <1:
      ans="Borys"
      break
  #print(i,A,B)
    
  if A<B-1:
    B += -1
  else:
    B += 1
    if B >N:
      ans="Alice"
      break
  #print(i,A,B)
else:
  ans="Draw"
  
print(ans)

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

Submission status: Accepted

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

t = 1
while True:
    if t==1:#Alice
        if a+1==b:
            if a==1:
                print("Borys")
                break
            else:
                a -= 1
        else:
            a += 1
    else:
        if b-1==a:
            if b==n:
                print("Alice")
                break
            else:
                b += 1
        else:
            b -= 1
    t += 1
    t %= 2

Submission status: Accepted

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


def solve(N: int, A: int, B: int):
    if (B-A)&1:
        print("Borys")
    else:
        print("Alice")
    return


# Generated by 1.1.6 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:
#AGC 020 A - Move and Win
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-1)%2 == 0:
  print('Borys')
else:
  print('Alice')

Submission status: Accepted

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

Submission status: Accepted

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

Diff = B - A
if Diff % 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:
def main():
    length, alice, borys = map(int, input().split())
    print("Alice" if (borys - alice) % 2 == 0 else "Borys")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,a,b = map(int,input().split())
n_list = [0 for i in range(n)]
n_list[a-1] = 1
n_list[b-1] = 2
i = 0
a = a-1
b = b-1
alice = True
borys = True
while True:
    if n_list[a+1] == 0:
        n_list[a] = 0
        n_list[a+1] = 1
        a += 1
    else:
        if a-1 >= 0:
            n_list[a] = 0
            n_list[a-1] = 1
            a -= 1
        else:
            alice = False
            break
    if n_list[b-1] == 0:
        n_list[b] = 0
        n_list[b-1] = 2
        b -= 1
    else:
        if b+1 <= n-1:
            n_list[b] = 0
            n_list[b+1] = 2
            b += 1
        else:
            borys = False
            break
    if alice == False or borys == False:
        break
if alice == False:
    print('Borys')
else:
    print('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:
n, a, b = map(int, input().split())
diff = abs(a-b)
if diff % 2 == 0:
    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())
if (b-a)%2==0:
  print("Alice")
else:
  print("Borys")

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 = (int(i) for i in input().split())
    if (B - A) % 2:
        print("Borys")
    else:
        print("Alice")


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

Submission status: Accepted

Solution code:
print('ABloircyes'[sum(map(int,input().split()[1:]))%2::2])

Submission status: Accepted

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

Submission status: Accepted

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

# b = [None] * N
# b[A-1] = 'A'
# b[B-1] = 'B'

ans = ''
while True:
    if A + 1 == B:
        A -= 1
        if A == 0:
            ans = 'Borys'
            break
    else:
        A += 1

    if B - 1 == A:
        B += 1
        if B == N+1:
            ans = 'Alice'
            break
    else:
        B -= 1

print(ans)

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 = list(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)%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())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
N, A, B = [int(x) for x 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 abs(A - B) % 2 == 0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

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

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:
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
from functools import reduce
mod = 10 ** 9 + 7
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
n,a,b=mii()

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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())
if (B-A-1)%2==0:
  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:
# -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [input() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [int(input()) for i in range(n)]


class Math():
    @staticmethod
    def gcd(a, b):
        if b == 0:
            return a
        return Math.gcd(b, a % b)

    @staticmethod
    def lcm(a, b):
        return (a * b) // Math.gcd(a, b)

    @staticmethod
    def roundUp(a, b):
        return -(-a // b)

    @staticmethod
    def toUpperMultiple(a, x):
        return Math.roundUp(a, x) * x

    @staticmethod
    def toLowerMultiple(a, x):
        return (a // x) * x

    @staticmethod
    def nearPow2(n):
        if n <= 0:
            return 0
        if n & (n - 1) == 0:
            return n
        ret = 1
        while(n > 0):
            ret <<= 1
            n >>= 1
        return ret

    @staticmethod
    def sign(n):
        if n == 0:
            return 0
        if n < 0:
            return -1
        return 1

    @staticmethod
    def isPrime(n):
        if n < 2:
            return False
        if n == 2:
            return True
        if n % 2 == 0:
            return False
        d = int(n ** 0.5) + 1
        for i in range(3, d + 1, 2):
            if n % i == 0:
                return False
        return True


class PriorityQueue:
    def __init__(self, l=[]):
        self.__q = l
        heapq.heapify(self.__q)
        return

    def push(self, n):
        heapq.heappush(self.__q, n)
        return

    def pop(self):
        return heapq.heappop(self.__q)


MOD = int(1e09) + 7
INF = int(1e15)


def main():
    # sys.stdin = open("sample.txt")
    N, A, B = Scanner.map_int()
    winner = ""
    while True:
        if A + 1 == B:
            A -= 1
        else:
            A += 1
        if B - 1 == A:
            B += 1
        else:
            B -= 1
        if A < 0:
            winner = "Borys"
            break
        elif B >= N:
            winner = "Alice"
            break
    print(winner)
    return


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:
N, A, B = map(int, input().split())
t_a = True
t_b = False
while True:
    if t_a:
        if A - 1 == B or A - B <= -1:
            A += 1
        elif A + 1 == B or A - B >= 1:
            A -= 1

        if A == B or A < 0 or A > N:
            print("Borys")
            break
        t_a = False
        t_b = True
    elif t_b:
        if B - 1 == B or B - A <= -1:
            B += 1
        elif B + 1 == B or B - A >= 1:
            B -= 1

        if A == B or B < 0 or B > N:
            print("Alice")
            break
        t_a = True
        t_b = False

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())
t_a = True
t_b = False
while True:
    if t_a:
        if A - B > 0:
            if A - 1 == B:
                A += 1
            else:
                A -= 1
        elif A - B < 0:
            if A + 1 == B:
                A -= 1
            else:
                A += 1

        if A == B or A < 0 or A > N:
            print("Borys")
            break
        t_a = False
        t_b = True
    elif t_b:
        if B - A > 0:
            if B - 1 == B:
                B += 1
            else:
                B -= 1
        elif B - A < 0:
            if B + 1 == B:
                B -= 1
            else:
                B += 1

        if A == B or B < 0 or B > N:
            print("Alice")
            break
        t_a = True
        t_b = False

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(n, a, b):
    if (a - b) % 2 == 0:
        print('Alice')
    else:
        print('Borys')


if __name__ == "__main__":
    n, a, b = map(int, input().split())

    main(n, a, b)

Submission status: Accepted

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

space = abs(B - A )

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(['Alice','Borys'][(B-A)%2])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin

n,a,b = [int(x) for x in stdin.readline().rstrip().split()]

while True:
    if a+1 != b:
        a += 1
    else:
        print("Borys")
        exit()
    if b-1 != a:
        b -= 1
    else:
        print("Alice")
        exit()

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

for _ in range(n):
    if a < b:
        a += 1
        if a == b:
            print('Borys')
            exit()

    if b <= n:
        b += 1
    else:
        b -= 1
        if b == a:
            print('Alice')
            exit()
else:
    print('Draw')

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 (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:
N,A,B = map(int,input().split())
while N == N:
  if A + 1 != B:
    A += 1
  else:
    print("Borys")
    exit()
  if B - 1 != A:
    B -= 1
  else:
    print("Alice")
    exit()

Submission status: Accepted

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

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:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = 1e10

#solve
def solve():
    n, a, b = LI()
    print("Borys" if (b - a) & 1 else "Alice")
    return


#main
if __name__ == '__main__':
    solve()

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:
# 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())
while True:
    if A+1<B:
        A+=1
    elif 1<A:
        A-=1
    else:
        print("Borys")
        break
    if A<B-1:
        B-=1
    elif B<N:
        B+=1
    else:
        print("Alice")
        break

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N,a,b=map(int,input().split())
M=N/2
while True:
    #print(a,b)
    #Aliceのターン
    if a+1<b:
        a+=1
    elif a+1==b:
        a-=1
        
    if a<=0:
        print('Borys')
        break
    #Bobのターン
    if a+1<b:
        b-=1
    elif a+1==b:
        b+=1
        
    if b>N:
        print('Alice')
        break

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split())
if abs(c-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==1:
    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:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    n,a,b=map(int,input().split())
    print("Alice" if((a+b)&1==0) else "Borys")
resolve()

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:
import sys
n, a, b = [int(i) for i in sys.stdin.readline().split()]
if (b - a - 1) % 2 == 1:
    print("Alice")
else:
    print("Borys")