Logo
(追記) (追記ここまで)

33795번 - Unfair Game 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 2048 MB29121250.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.

제한

예제 입력 1

3
10 1 10
5 1 10
7 4 20

예제 출력 1

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.

출처

University > Rutgers University > Rutgers University Programming Contest Spring 2025 I번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /