| SMU ICPC Selection Contest 2026 |
|---|
| Закончено |
Alice and Bob play a Duel of Ten on an array $$$a$$$ of length $$$n$$$ ($$$\boldsymbol{-10^9} \leq a_i \leq 10^9$$$). They take turns making moves, with Alice going first. The rules of "Duel-of-Ten" are as follows:
The game ends when the array $$$a$$$ contains only one element. If the remaining element has an absolute value less than 10, Alice wins. Otherwise, Bob wins.
Given an array $$$a$$$, determine who wins if both players play optimally.
The first line contains a single integer $$$t$$$ ($$$1\leq t \leq 10^3$$$) — the number of test cases. For each test case,
$$$t$$$ lines. For each test case, output Alice if Alice wins, and Bob otherwise, assuming both players play optimally.
241 10 1 1041 -10 1 -10
Alice Bob
There are 2 test cases. For each test case, we show one possible sequence of moves that ends with the stated winner. These sequences are included only to illustrate the rules; the players do not necessarily play optimally.
| Название |
|---|


