Calgary Collegiate Programming Competition 2020 — Open Division

Start

2020-03-14 10:00 AKDT

Calgary Collegiate Programming Competition 2020 — Open Division

End

2020-03-14 14:00 AKDT
The end is near!
Contest is over.
Not yet started.
Contest is starting in -258 days 23:24:10

Time elapsed

4:00:00

Time remaining

0:00:00

Problem A
Alex and Barb

Alex and Barb are waiting for their two cousins to visit for dinner. Since their cousins tend to get involved in all sorts of shenanigans, Alex and Barb decide to pass the time with a little card game.

The game is as follows: there is a stack of $k$ cards on the table. Alex and Barb take turns taking from $m$ to $n$ cards, beginning with Alex. The first player with no valid moves left loses.

Given $k$, $m$, and $n$, determine which player will win the game provided that both play with an optimal strategy.

Inputs

The input consists of a single line containing three space-separated integers $1 \leq k \leq 10^9$ and $1 \leq m \leq n \leq 10^9$.

Outputs

On a single line output the name of the winning player.

Sample Input 1 Sample Output 1
5 2 2
Barb
Sample Input 2 Sample Output 2
25 3 10
Alex