#P15715. [JAG 2023 Summer Camp #2] Knight Game
[JAG 2023 Summer Camp #2] Knight Game
题目描述
The rule of this game is given as follows.
- There is a knight and a chessboard with rows and columns. The square at the -th row from the top and the -th column from the left is called square . Initially, the knight is placed on square .
- Alice and Bob alternately take the following action, starting with Alice.
- Move the knight onto one of the unvisited squares according to the knight's movement.
- Knights can move from to if and only if is .
- The player who cannot move the knight is the loser.
When both players have done their best, determine whether Alice or Bob will win. Answer for test cases.
The unvisited square is defined as follows.
- A square on the board that the knight has never visited since the beginning of the game.
输入格式
$$\begin{aligned} &T \\ &case_1 \\ &\vdots \\ &case_T \end{aligned} $$represents the -th test case.
Each test case is given in the following format.
The input satisfies the following constraints.
- All inputs consist of integers.
输出格式
Output lines. On the line , answer the winner of the -th test case, Alice or Bob.
2
4 4 1 1
9 17 7 3
Alice
Bob