F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Alice Game

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)
Total Submission(s): 906    Accepted Submission(s): 460


Problem Description
Alice and Bob are playing a game.

There are n monsters in the game, and they stand in a line. Alice and Bob take turns. Each turn, the player can choose one of two actions:

1. Destroy a consecutive monster sequence of size less than or equal to $K$. Note that you must destroy $all$ monsters in the continuous sequence of your choice.

2. Select $K$ consecutive monsters to destroy, and after destroying these $K$ monsters, the sequential monster sequence in which they were originally located must be divided into two non-empty sequences. The two remaining sequences will not be considered continuous.

Here is an example of operation 2, if $K=2$ and there are four monsters $ABCD$ in the field. Now we can destroy monsters $BC$ because they are continuous, and after destroying them we can be left with monsters $AeeD$ ($e$ means the area is empty). But we cannot destroy the monster $AB$ or $CD$, because the remaining two sequences must be non-empty (in fact, if we do this, only one continuous sequence remains). Similarly, we can't destroy monsters $AC$ or $BD$ because monsters $A$ and $C$ are not continuous.

When a player cannot operate, he loses. Now, Alice will play the game first. She wants to know, can she win at this game?
 

Input
An integer $T$ indicates that there are $T$ groups of data.

Next $T$ rows. Enter two integers $K$ and $n$ on each line.

Guarantee $ 1 \le T \le 10000, 2 \le K \le 10^7, 0 \le n \le 10^9$.
 

Output
Output total $T$ lines.

If Alice can win, output "Alice", otherwise output "Bob".
 

Sample Input
2 2 2 2 3
 

Sample Output
Alice Bob
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 21:17:13, Gzip enabled