Universal Cup Judging System

Universal Cup

Time Limit: 1.0 s Memory Limit: 1024 MB Total points: 100
Statistics

给定一个长度为 $n$ 的字符串 $s$,仅包含字符 L 和 R。Alice 和 Bob 计划使用该字符串进行一场游戏。

Alice 和 Bob 将轮流对字符串 $s$ 进行操作,Alice 先手。

在每次操作中,假设当前剩余的字符串为 $s$。如果 $s$ 为空字符串,则当前操作者输掉游戏。否则,操作者可以选择一个整数 $i \in \{1, 2, \dots, |s|\}$。如果 $s_i = \text{L}$,则操作后的剩余字符串为 $s_1s_2 \dots s_{i-1}$;如果 $s_i = \text{R}$,则操作后的剩余字符串为 $s_{i+1}s_{i+2} \dots s_{|s|}$。

双方都极其聪明,因此他们总是会采取最优策略。作为参与 PKUWC Universal Cup 的一名普通旁观者,你想知道这场游戏的获胜者是谁。

输入

输入包含多个测试用例。 输入的第一行包含一个整数 $T$,表示测试用例的数量。对于每个测试用例: 第一行包含一个整数 $n$ ($1 \le n \le 10^6$)。 第二行包含一个长度为 $n$ 的字符串 $s$,仅包含 L 和 R,表示游戏的初始字符串。

保证所有测试用例的 $n$ 之和不超过 $10^6$。

输出

对于每个测试用例,输出一行 Alice 或 Bob,表示游戏的获胜者。

样例

输入格式 1

3
5
LRLLR
6
RLRLRL
1
L

输出格式 1

Alice
Bob
Alice

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.