| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 2048 MB | 29 | 12 | 12 | 50.000% |
Alice and Bob are playing a game on a 1ドル \times n$ board. On her turn, Alice places a 1ドル \times a$ tile on the board, while on his turn, Bob places a 1ドル \times b$ tile. Tiles must be placed on unoccupied cells and cannot overlap.
Whoever cannot make a move loses.
Alice moves first, and to compensate for the advantage of going first, Alice's pieces are larger than Bob's (in other words, $a > b$). Given three integers $a,ドル and $b$ , $n,ドル determine who will win the game if both players play optimally.
The first line contains a single integer $t$ (1ドル \le t \le 10^5$) --- the number of test cases.
Each of the next $t$ lines contains three space-separated integers $a,ドル $b,ドル and $n$ (1ドル \le b < a \le n \le 10^9$) --- the sizes of the tiles used by Alice and Bob, and the length of the board, respectively.
For each test case, print "Alice" if Alice wins the game, or "Bob" if Bob wins.
3 10 1 10 5 1 10 7 4 20
Alice Bob Bob
In the first sample, since Alice goes first and $a = n = 10,ドル she can fill in the entire board on her first move, and Bob will not have any legal moves, losing the game.
In the second sample, Alice can never stop Bob from placing a piece on his first turn. After Bob's first turn, there will only be 4ドル$ empty squares in total, so Alice can never place a piece on her second turn and will lose the game.