시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
2 초 | 512 MB | 33 | 13 | 12 | 38.710% |
Baklawa or baklava, is a sweet middle eastern dessert, mainly made from phyllo dough sheets, walnuts, and sugar syrup cut into small cubic pieces and served in cuboid boxes containing multiple layers.
Alice and Bob love to play what they call the last Baklawa game, The rules are as follows:
Assuming both players play optimally, you are asked the following question: who wins the game?
Your program will be tested on one or more test cases. The first line of the input will be a single integer T, the number of test cases (1 ≤ T ≤ 100).
Each test case starts with a line containing four space separated integers:
Followed by N lines each containing three space separated integers:
For each test case, print a single line containing ‘Alice’ if Alice wins the game, or ‘Bob’ otherwise.
2 3 3 3 4 3 2 1 3 1 1 3 3 1 3 2 2 5 5 5 1 3 4 2
Alice Bob
The figure below is an example of the first test case: