QOJ.ac

QOJ

حد الوقت: 1.0 s حد الذاكرة: 1024 MB مجموع النقاط: 100 قابلة للهجوم ✓

#9039. 征服倍数

الإحصائيات

Alice 和 Bob 是两位杰出的战略家,他们在古庙中发现了一块神秘的黑板,上面写着一个整数序列 $l, l+1, \dots, r$。黑板旁边有一个特殊的数字 $x$,初始值为 $l$。

游戏规则简单但充满挑战:Alice 和 Bob 轮流从黑板上擦除一个 $x$ 的倍数,Alice 先手。每完成一次操作后,$x$ 的值增加 1,游戏继续进行。如果一名玩家无法擦除当前 $x$ 的倍数,则该玩家输掉游戏。

两位玩家都渴望证明自己的战术才华,他们会采取最优策略以确保胜利。你能判断出最终哪位玩家会赢得这场倍数之战吗?

输入格式

本题包含多个测试用例。输入的第一行包含一个整数 $T$ ($1 \le T \le 10^5$),表示测试用例的数量。

对于每个测试用例,仅有一行输入。该行包含两个整数 $l, r$ ($1 \le l \le r \le 10^9$),表示黑板上初始的数字范围 $(l, l+1, \dots, r)$。

输出格式

对于每个测试用例,输出一行。如果 Alice 获胜,输出 “Alice”。否则,输出 “Bob”。

样例

输入格式 1

3
2 4
4 4
6 7

输出格式 1

Alice
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.