AtCoder Regular Contest 170
D
Triangle Card Game
AtCoder
⌀ 2279
原题
← CE →
翻译中…

Problem Statement

翻译中…

Alice and Bob will play a game.

翻译中…

Initially, Alice and Bob each have $N$ cards, with the $i$-th card of Alice having the integer $A_i$ written on it, and the $i$-th card of Bob having the integer $B_i$ written on it.

翻译中…

The game proceeds as follows:

翻译中…
  • Prepare a blackboard with nothing written on it.
  • Alice eats one of her cards and writes the integer from the eaten card on the blackboard.
  • Next, Bob eats one of his cards and writes the integer from the eaten card on the blackboard.
  • Finally, Alice eats one more of her cards and writes the integer from the eaten card on the blackboard.
翻译中…

If it is possible to form a (non-degenerate) triangle with the side lengths of the three integers written on the blackboard, Alice wins; otherwise, Bob wins.

翻译中…

Determine who wins when both players act optimally.

翻译中…

Solve each of the $T$ given test cases.

翻译中…

Constraints

翻译中…
  • $1 \leq T \leq 10^5$
  • $2 \leq N \leq 2 \times 10^5$
  • $1 \leq A_i, B_i \leq 10^9$
  • All input values are integers.
  • The sum of $N$ over all test cases in a single input is at most $2 \times 10^5$.
翻译中…

Input

翻译中…

The input is given from Standard Input in the following format:

翻译中…

T
\mathrm{case}_1
\vdots
\mathrm{case}_T

翻译中…

Each case is given in the following format:

翻译中…

N
A_1 \ldots A_N
B_1 \ldots B_N

翻译中…

Output

翻译中…

Print $T$ lines. The $i$-th line $(1 \leq i \leq T)$ should contain Alice if Alice wins for the $i$-th test case, and Bob if Bob wins.

翻译中…

样例

Input #1
3
3
1 2 3
4 5 6
4
6 1 5 10
2 2 4 5
10
3 1 4 1 5 9 2 6 5 3
2 7 1 8 2 8 1 8 2 8
Output #1
Bob
Alice
Alice
In the first test case, for example, the game could proceed as follows: - Alice eats the card with $2$ written on it and writes $2$ on the blackboard. - Bob eats the card with $4$ written on it and writes $4$ on the blackboard. - Alice eats the card with $1$ written on it and writes $1$ on the blackboard. - The numbers written on the blackboard are $2, 4, 1$. There is no triangle with side lengths $2, 4, 1$, so Bob wins. For this test case, the above process is not necessarily optimal for the players, but it can be shown that Bob will win if both players act optimally.
题目信息
题号
arc170_d
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。