9150: Mate in 33

内存限制:128 MB 时间限制:15 S 标准输入输出
题目类型:传统 评测方式:文本比较 上传者:
提交:0 通过:0

题目描述





输入格式


The first line contains one integer TTT (1≤T≤1051\le T\le 10^51T105), denoting the number of test cases.
For each test case, there is one line with four coordinates denoting the position of Black's king, White's king, White's knight, and White's bishop, respectively.
The position is guaranteed to be reachable, so notice that Black's king is guaranteed not to be under immediate attack because the White moves first.

输出格式

For each test case:
 If White can deliver the checkmate, print ``win'' (without quotes) and an integer in the following line, denoting the number of moves for White it takes if both sides play optimally.
Otherwise, print ``draw'' (without quotes).

输入样例 复制

链接:https://ac.nowcoder.com/acm/contest/57364/A
来源:牛客网

5
a7 c7 b8 b7
d8 d6 b6 e8
b1 d4 a2 c1
b1 d1 a2 c1
c8 a8 h2 e8

输出样例 复制

win
1
draw
draw
win
6
win
33

数据范围与提示