#P9804. Alice Game

    ID: 8026 传统题 1000ms 64MiB 尝试: 2 已通过: 2 难度: 6 上传者: 标签>CF2000博弈论数学记忆化搜索2023“钉耙编程”中国大学生算法设计超级联赛(2)

Alice Game

Alice Game

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 KK. Note that you must destroy allall monsters in the continuous sequence of your choice.
  2. Select KK consecutive monsters to destroy, and after destroying these KK 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=2K=2 and there are four monsters ABCDABCD in the field. Now we can destroy monsters BCBC because they are continuous, and after destroying them we can be left with monsters AeeDAeeD (ee means the area is empty). But we cannot destroy the monster ABAB or CDCD, 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 ACAC or BDBD because monsters AA and CC 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 TT indicates that there are TT groups of data. Next TT rows. Enter two integers KK and nn on each line. Guarantee $1 \le T \le 10000, 2 \le K \le 10^7, 0 \le n \le 10^9$.

Output

Output total TT lines. If Alice can win, output "Alice", otherwise output "Bob".

Sample Input

2
2 2
2 3

Sample Output

Alice
Bob

Source

2023“钉耙编程”中国大学生算法设计超级联赛(2)