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:
test=raw_input().split(" ")

a=int(test[0])
b=int(test[1])
c=int(test[2])

if b==1 and c==2:
    print("Borys")

else:
    if (b-c-1)%2==0:
        print("Borys")
    else:
        print("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
# coding=utf-8

import sys

n, a, b = map(int, sys.stdin.readline().strip().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())
ans=B-A
if ans == 1:
    print("Borys")
else:
    ans = ans % 2
    if ans == 0:
        print("Alice")
    elif ans == 1:
        print("Borys")

Submission status: Accepted

Solution code:
import sys

N,A,B = map(int, sys.stdin.readline().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 == 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 ((N-A) - (N-B))%2 == 0:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def LI(): return [int(x) for x in input().split(" ")]
def LS(): return [str(x) for x in input().split(" ")]
def ItoS(L): return [str(x) for x in L]
def StoI(L): return [int(c) for c in L]

def solve():
    while 1:
        try:
            n, a, b = LI()
            if abs(a - b) % 2:
                print("Borys")
            else:
                print("Alice")

            break
        except:
            break
solve()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
import copy

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:
import math
N,A,B=[int(i) for i in raw_input().split()]
C=B-A
if C % 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 (A-B)%2 == 0 else print("Borys")

Submission status: Accepted

Solution code:
import sys,collections;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

n,a,b = Is()
if abs(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:


def main():
    temp=input().split(" ")
    n=int(temp[0])
    a=int(temp[1])
    b=int(temp[2])
    sa=abs(a-b)
    if sa%2==1:
        print("Borys")
    else:
        print("Alice")
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
N, A, B = map(int, input().split())

ans = 0
for i in range(N):
    if A + 1 == B:
        ans = i % 2
        break
    if i % 2 == 0:
        A += 1
    else:
        B -= 1

print(('Borys', 'Alice')[ans])

Submission status: Accepted

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

Submission status: Accepted

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

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 (abs(a-b)-1)%2 == 1 else 'Borys')

Submission status: Accepted

Solution code:
import math
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 (B - A) % 2 != 0:
	print("Borys")
else:
	print("Alice")

Submission status: Accepted

Solution code:
line = input().split(" ")
N = int(line[0])
A = int(line[1])
B = int(line[2])

x = B-A-1

if x%2==0:
    print("Borys")
elif x%2==1:
    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:
#python3
#utf-8

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

Submission status: Accepted

Solution code:
#! /usr/bin/env python
# coding: utf-8


def slove(n, a, b):
    if (b - a) % 2 != 0:
        return "Borys"
    else:
        return "Alice"


if __name__ == "__main__":
    m = input().split(" ")
    n = int(m[0])
    a = int(m[1])
    b = int(m[2])

    print(slove(n, a, b))

Submission status: Accepted

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


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

solve()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n, a, b = map(int, input().split())
if a > b:
    a, b = b, a
    flipped = True
else:
    flipped = False
turn = 0
while True:
    if turn % 2 == 0:
        if a + 1 == b:
            if a == 1:
                break
            else:
                a -= 1
        else:
            a += 1
    else:
        if b - 1 == a:
            if b == n:
                break
            else:
                b += 1
        else:
            b -= 1
    turn += 1
if flipped:
    a, b = b, a
print(['Borys', 'Alice'][turn % 2])

Submission status: Accepted

Solution code:
[N,A,B]=map(int,raw_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:
if __name__ == '__main__':
    N, A, B = map(int, input().split())
    if (A - B) % 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-1) % 2 == 1:
    print("Alice")
else:
    print("Borys")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-      
from collections import Counter
import numpy as np
import sys


n, a, b = list(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 A - B & 1:
    print('Borys')
else:
    print('Alice')

Submission status: Accepted

Solution code:
# C
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 N == 2:
#     print('Draw')
# else:
C = abs(B - A)
print('Alice' if C % 2 == 0 else 'Borys')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,a,b=[int(i) for i in 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:
a,b,c=[int(i) for i in input().split()]
if abs(b-c)%2==0:
	print("Alice")
else:
	print("Borys")

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N,A,B = [int(i) for i in input().split()]
if (B-A)%2==0:
   print('Alice')
else:
   print('Borys')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, A, B = map(int, raw_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+1)%2 == 0:
    print('Borys')
else:
    print('Alice')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,A,B=input().split(' ')
if (int(B)-int(A)-1)%2==1:
  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 re
import math
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, raw_input().split())
print "Alice" if (B-A)%2==0 else "Borys"

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt, floor
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache, reduce
from operator import xor
from heapq import heappush, heappop
INF = float("inf")
YES, NO, Yes, No = "YES", "NO", "Yes", "No"
sys.setrecursionlimit(10**7)

# 4近傍（右, 下, 左, 上）
dy4, dx4 = [0, -1, 0, 1], [1, 0, -1, 0]


def inside(y: int, x: int, H: int, W: int) -> bool: return 0 <= y < H and 0 <= x < W
def ceil(a, b):return (a + b - 1) // b


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


def main():
    solve()


if __name__ == '__main__':
    main()

Submission status: Accepted

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



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

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

if __name__ == "__main__": main()

Submission status: Accepted

Solution code:
# def makelist(n, m):
#     return [[0 for i in range(m)] for j in range(n)]

# n = int(input())
# 
# s = input()


n, a, b = map(int, input().split())
ar = "Alice"
bo = "Borys"

if (b - a) % 2 == 0:
    print(ar)
else:
    print(bo)

Submission status: Accepted

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

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

diff = abs(A - B)
if diff % 2 == 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('Borys' if (b - a) & 1 else 'Alice')

Submission status: Accepted

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

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

else:
  print "Borys"

Submission status: Accepted

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

if abs(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,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    n,a,b = LI()
    if abs(a-b) % 2 == 1:
        return 'Borys'

    return 'Alice'

print(main())

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
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

K = INT()
A = LIST()

def f(N):
	left = N
	for a in A:
		left = left//a*a
	return left

l_N_max = 0
r_N_max = 10**14
while l_N_max+1 < r_N_max:
	m = (l_N_max+r_N_max)//2
	if f(m) <= 2:
		l_N_max = m
	else:
		r_N_max = m

N_max = l_N_max

l_N_min = 0
r_N_min = 10**14
while l_N_min+1 < r_N_min:
	m = (l_N_min+r_N_min)//2
	if f(m) < 2:
		l_N_min = m
	else:
		r_N_min = m
N_min = r_N_min

if N_min > N_max:
	print(-1)
else:
	print(N_min, N_max)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main() {
 int n,A,B;
  cin>>n>>A>>B;
  int anx=B-A-1;
  if(ans%2==0) 
  cout<<"Borys";
  else 
  cout<<"Alice";
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from math import ceil
k = int(input())
A = list(map(int,input().split()))[::-1]
if A[0]!=2:
    print(-1)
    exit()

flg = True
ans = [2,3]
for i in range(1, k):
    m = A[i]*(ceil(ans[0]/A[i]))
    n = A[i]*(ceil(ans[1]/A[i]))
    
    if not m<=ans[1]<=n:
        flg = False
        break
    else:
        ans = [m,n-1]

if flg:
    print(*ans)
else:
    print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=list(input())
x=int(a[1])
y=int(a[2])

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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


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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
T=int(input())
for t in range(T):
	a,b,c,d=map(int,input().split(' '))
	l,x,y,o=(a+b)//(min(a,b)+1),0,0,""
	if a*l<=b:y=a+b
	elif b*l<=a:x=a+b
	else:x,y=(a*l-b)//(l-1),(b*l-a)//(l-1)
	for i in range(c,d+1):o+="AB"[i%(l+1)==0] if i<=x else "BA"[(a+b-i+1)%(l+1)==0] if a+b-i+1<=y else "AB"[a-x+x//(l+1)-y//(l+1)==0]
	print(o)

Submission status: Runtime Error

Solution code:
T=int(input())
for t in range(T):
	a,b,c,d=map(int,input().split(' '))
	l,x,y,o=(a+b)//(min(a,b)+1),0,0,""
	if a*l<=b:y=a+b
	elif b*l<=a:x=a+b
	else:x,y=(a*l-b)//(l-1),(b*l-a)//(l-1)
	for i in range(c,d+1):o+="AB"[i%(l+1)==0] if i<=x else o+="BA"[(a+b-i+1)%(l+1)==0] if a+b-i+1<=y else o+="AB"[a-x+x//(l+1)-y//(l+1)==0]
	print(o)

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <array>
#include <tuple>
#include <random>

using namespace std;
typedef long long int ll;

#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for(int i = int(a); i < int(b); i++)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep,)(__VA_ARGS__)
#define all(x) (x).begin(), (x).end()

#define INF 10000000000

ll a, b, c, n, m, x, y, z, w, h, ans = 0, cnt = 0, mx = 0, mn = INF;
string s;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    cin >> n >> a >> b;
    cout << ((abs(a - b - 1) % 2) ? "Alice" : "Borys") << endl;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<ll>;
using vvi= vector<vi>;
using vs = vector<string>;
#define  rep(i,n) for(ll i = 0; i < (n); ++i)
#define  red(i,n) for(ll i = (n)-1; i >= 0; --i)
#define  all(a)   begin(a),end(a)
#define  pb(a)    push_back(a)
#define  mp(a,b)  make_pair(a,b)
#define  yn(a)    cout << ( (a)?"Yes\n":"No\n" );
inline ll gcd(ll a,ll b) { return b?gcd(b,a%b):a; }
const ll INF = 1e9+9, LINF = 1e18;

int main()
{
    int a,b,c;
    cin>>a>>b>>c;
    cout << ( ((b-c)%2) ?"Borys\n":"Alice\n" );
    
    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import numpy
n = int(input())
a = [int(i) for i in input().split()]
dp = 1
for i in range(0, len(a)):
	dp = (dp | (dp << a[i]))

asum = 0
for i in range(0, len(a)):
	asum += a[i]

for i in range(int((asum + 1) / 2), asum + 1):
	if (dp >> i) & 1:
		print(i)
		break

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
txt = input()
txt = input.split()
print(1, 1, 1)

Submission status: Runtime Error

Solution code:
from math import ceil, floor

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

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

print(L, R)

Submission status: Runtime Error

Solution code:
import sys
K = int(input())
A = [int(x) for x in input().split()]
A.reverse()
jmax, jmin = 2,2

if A[0] != 2:
    print(-1)
    sys.exit()


"""max"""
for i in range(0,K-1):
    drop_num = []
    for j in range(0,A[i]):  #脱落者数の候補を入れていく
        if ( jmax + j ) % A[i+1] == 0:
            drop_num.append(j)

        if drop_num == []:  #A[i]について一通り調べたのち脱落者数の候補がなければ終わる
            print(-1)
            sys.exit()

    max_drop = max(drop_num)
    jmax = jmax + max_drop

jmax = jmax + A[K-1] -1


"""min"""
for i in range(0,K-1):
    drop_num = []
    for j in range(0,A[i]):  #脱落者数の候補を入れていく
        if ( jmin + j ) % A[i+1] == 0:
            drop_num.append(j)

        if drop_num == []:  #A[i]について一通り調べたのち脱落者数の候補がなければ終わる
            print(-1)
            sys.exit()

    min_drop = min(drop_num)
    jmin = jmin + min_drop


print(jmin, jmax)

Submission status: Runtime Error

Solution code:
K = int(input())
A = [int(i) for i in input().split()]

Max, Min = 0, 0
error = -1

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

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

    if A[-1] == 2:
        if i == 0:                      #最後の処理
            Max = N_max(A[i], Max, Min)
            Min = N_min(A[i], Min)
            print(Min, Max)
            break
        
        elif A[i-1]/A[i] < 2:          #次の値が2倍以下（最後以外）
            Max = N_max(A[i], Max, Min)
            Min = N_min(A[i], Min)

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

Submission status: Runtime Error

Solution code:
import itertools

def solve():
    n = int(input())
    A = list(set(map(int, input().split(" "))))
    sum_list = []
    for i in range(1, n + 1):
        for ele in list(itertools.combinations(A, i)):
            sum_list.append(sum(ele))

    sum_list.sort()
    length = len(sum_list)
    print(sum_list[length // 2])

solve()

Submission status: Runtime Error

Solution code:
moji = input()
N = moji[0]
A = moji[2]
B = moji[4]

res = ""

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

print(res)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N_A_B = list(map(int, input()))

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

Submission status: Runtime Error

Solution code:
N = input()
A = input()
B = input()

res = ""

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

print(res)

Submission status: Runtime Error

Solution code:
import math
N,A,B=[int(i) for i in raw_input().split()]
if B-A % 2 ==0:
     print("Alice")
else:
     print("Borys")

Submission status: Runtime Error

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

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