Unfair Game

시간 제한2초메모리 제한2048 MB

요약
1×n 보드에서 Alice는 길이 a, Bob은 길이 b (a>b) 타일을 놓으며, 최적의 플레이에서 누가 이기는지 판정한다.
난이도

보통10점 중 7점

유형
게임 이론, 그리디, 수학
정답자
아직 제출이 없습니다

문제

Alice and Bob are playing a game on a 1×n1 \times n board. On her turn, Alice places a 1×a1 \times a tile on the board, while on his turn, Bob places a 1×b1 \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>ba > b). Given three integers aa, and bb , nn, determine who will win the game if both players play optimally.

입력

The first line contains a single integer tt (1≤t≤1051 \le t \le 10^5) --- the number of test cases.

Each of the next tt lines contains three space-separated integers aa, bb, and nn (1≤b<a≤n≤1091 \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.

힌트

In the first sample, since Alice goes first and a=n=10a = 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 44 empty squares in total, so Alice can never place a piece on her second turn and will lose the game.

예제1

  1. 예제 1

    입력
    3
    10 1 10
    5 1 10
    7 4 20
    
    예상 출력
    Alice
    Bob
    Bob