#C6833. Determine the Winner of the Stone Pile Game
Determine the Winner of the Stone Pile Game
Determine the Winner of the Stone Pile Game
You are given several games involving two piles of stones. For each game, you must determine the winner based on the number of stones in both piles. The rules are as follows:
- If the two piles have an equal number of stones, i.e. if \(A = B\) (or equivalently \(A \oplus B = 0\)), then ALICE wins.
- If the two piles have different numbers of stones, then BOB wins.
You are given \(T\) test cases. For each test case, you will be provided two integers \(A\) and \(B\) representing the number of stones in the first and second pile respectively. Your task is to output the winner for each game.
inputFormat
The input is given from the standard input (stdin). The first line contains an integer \(T\) representing the number of test cases. Each of the following \(T\) lines contains two space-separated integers \(A\) and \(B\), where \(A\) is the number of stones in the first pile and \(B\) is the number in the second pile.
T A1 B1 A2 B2 ... AT BT
outputFormat
For each test case, print a line containing either ALICE or BOB (without quotes) depending on who wins the game.
Result1 Result2 ... ResultT## sample
3
1 2
2 2
5 9
BOB
ALICE
BOB
</p>