QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 64 MB Total points: 100

#6859. Alice Game

Statistics

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$.
  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, 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 monsters $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".

Examples

Input 1

2
2 2
2 3

Output 1

Alice
Bob

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.