|
||||||||||
Alice's GameTime Limit: 2000/2000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1554 Accepted Submission(s): 715 Problem Description Alice and Bob have got a lot of chocolates. All the chocolates are rectangles of different shapes as Xi * Yi.They decide to play an interesting game on the chocolates. They take turns choose a chocolate and split it into two pieces. The one who can not take operations lose. Due to the game is too simple, the additional rules apply. Alice is only allowed to split the chocolate vertically, and Bob is only allowed to split the chocolate horizontally. Specifically, for Alice, a chocolate Xi * Yi, can only split into A * Yi, and B * Yi where A + B = Xi and A, B > 0. And for Bob, a chocolate Xi * Yi, can only split into Xi * A, and Xi * B where A + B = Yi and A, B > 0. Alice and Bob are clever enough to take the optimal operation, if Alice plays first, your are to decide who will win. Input The input contains multiple test cases. The first line of input contains a single integer denoting the number of test cases. For each test case, the first line contains an integer N, the number of pieces of chocolates. (1 <= N <= 100) For the next N lines, each line contains two integers Xi and Yi, denoting the chocolate sized Xi * Yi. (1 <= Xi, Yi <= 1000000000) Output For each test cases, output "Alice" when Alice will win, and "Bob" otherwise. See sample test cases for further details. Sample Input
Sample Output
Author HyperHexagon Source | ||||||||||
|