아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Destructive Game

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

요약
각 더미에서 b_i^k개의 돌을 제거하는 게임의 그런디 수를 구해 모두 XOR한 값으로 승자를 판정한다.
난이도

보통10점 중 7점

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

문제

There are NN stone piles, numbered by sequential integers from 11 to NN. The ii-th pile contains a_ia\_i stones. Additionally, each pile ii has an integer b_ib\_i associated with it.

Alice and Bob play the following game using those stone piles.

They are alternately performing the following operation: choose pile ii and a nonnegative integer kk such that b_ikb\_i^k is not greater than the current number of stones in pile ii, and remove b_ikb\_i^k stones from pile ii. If a player cannot do that on their turn, the opposite player wins.

Alice moves first. Determine who will win if both players are playing optimally.

입력

The first line of input contains one integer NN (1≤N≤1051 \le N \le 10^5), the number of piles. The ii-th of the following NN lines contains two integers a_ia\_i and b_ib\_i (1≤a_i,b_i≤1091 \le a\_i, b\_i \le 10^9): the initial number of stones in the ii-th pile and the integer associated with it, respectively.

출력

If Alice wins the game when both sides are playing optimally, print "Alice". Otherwise, print "Bob".

예제3

  1. 예제 1

    입력
    2
    10 3
    7 4
    
    예상 출력
    Bob
    
  2. 예제 2

    입력
    16
    903 5
    246 38
    884 12
    752 10
    200 17
    483 6
    828 27
    473 21
    983 35
    953 36
    363 35
    101 3
    34 23
    199 8
    134 2
    932 28
    
    예상 출력
    Alice
    
  3. 예제 3

    입력
    16
    35 37
    852 17
    789 37
    848 40
    351 27
    59 32
    271 11
    395 20
    610 3
    631 33
    543 14
    256 28
    48 8
    277 24
    748 38
    109 40
    
    예상 출력
    Bob