9122: Non-Puzzle: Game

内存限制:128 MB 时间限制:1 S
题面:传统 评测方式:文本比较 上传者:
提交:0 通过:0

题目描述


Alice and Bob are playing a game.

There are nnn numbers on the black board, where the iii-th number is aia_{i}ai. Alice and Bob play in turns. Alice plays first. The current player can choose two numbers aia_{i}ai and aja_{j}aj from the black board (iii and jjj can be equal), and write a new number ai⊕aja_{i} \oplus a_{j}aiaj on the blackboard, where ⊕\oplus denotes bitwise-xor operation. The players cannot skip their turns. The player who writes number kkk on the blackboard wins.

If no one writes kkk on the blackboard in 1010010^{100}10100 rounds, then the game ends in a draw.

Now, assume Alice and Bob both play optimally, determine the outcome of the game (Alice wins, Bob wins, or draw).

输入格式


There are multiple test cases.
The first line contains one integer TTT (1≤T≤5⋅1041\le T \le 5 \cdot 10^41T5104), representing the number of test cases.
For each test case, the first line contains two integers n,kn,kn,k (1≤n≤1061\le n\le 10^61n106,0≤k<2300 \le k < 2^{30}0k<230).
The following line contains nnn integers aia_{i}ai (0≤ai<2300 \le a_{i} < 2^{30}0ai<230).
It is guaranteed that the sum of nnn does not exceed 10610^6106.

输出格式


For each test case, output one line containing "Alice\texttt{Alice}Alice", "Bob\texttt{Bob}Bob" or "Draw\texttt{Draw}Draw", representing the result of the game.

输入样例 复制

5
5 4
1 7 3 2 5
2 0
1 1
5 3
1 5 7 9 5
4 2
6 4 3 1
1 1
1

输出样例 复制

Alice
Alice
Draw
Alice
Bob

分类标签