Problem Statement
Time limit is 5 seconds.
Two players are playing a game. The game is played on a large directed graph. The large graph consists of K disjoint copies of the same small directed graph. The small graph has no multiple edges and no self-loops (but may contain other cycles).
Each vertex of the game graph is either black or white.
The players take alternating turns. Each turn of the game looks as follows:
- The player selects a black vertex v.
- If v has one or more outgoing edges, the player also selects exactly one follower of v. (I.e., a vertex w such that v->w is an edge.)
- The player toggles the color of all selected vertices. (Black becomes white and vice versa.)
If all vertices are white, the game ends. The player who is unable to make a valid move loses, and their opponent wins.
Sometimes both players are able to play the game indefinitely in a way that they both avoid losing but at the same time neither of them can force a win. Such games are considered draws.
You are given a description of the small graph: the number N of its vertices, and a list of its edges. Assuming that the vertices of the small graph are numbered from 0 to N-1, its directed edges are the edges X[i] -> Y[i], for all valid i.
You are also given the description of the initial colors in the large graph: the
Assume both players play optimally. Return "win" if the next player to move wins, "lose" if they lose, and "draw" otherwise.
Definition
- Class:
- DoubleXorGame
- Method:
- solve
- Parameters:
- int, int[], int[], int[]
- Returns:
- String
- Method signature:
- String solve(int N, int[] X, int[] Y, int[] states)
- (be sure your method is public)
Notes
- For example, states[0] = 25 is interpreted as follows: 25 = 2^4 + 2^3 + 2^0, and therefore in this copy of the small graph the vertices 4, 3, and 0 are black.
Constraints
- N will be between 1 and 12, inclusive.
- X will have between 0 and N*(N-1) elements, inclusive.
- X and Y will have the same number of elements.
- All elements of X and Y will be between 0 and N-1, inclusive.
- For each i, X[i] and Y[i] will be distinct.
- All pairs (X[i], Y[i]) will be distinct.
- states will have between 1 and 50 elements, inclusive.
- Each element of states will be between 0 and (2^N)-1, inclusive.
Examples
1
{}
{}
{1, 1, 1, 0, 1}
Returns: "lose"
The small graph is a single isolated vertex. The large graph consists of five copies of the small graph. Initially, four of them have a black vertex and the fifth has a white vertex. The only valid move type is to select a black vertex and toggle it to make it white. The game will end in exactly four moves, and thus this is a losing position for the next player to play.
1
{}
{}
{1, 1, 1, 1, 1}
Returns: "win"
Almost the same test case, but with an odd number of black vertices we have a winning position.
3
{0, 1, 2}
{1, 2, 0}
{4}
Returns: "draw"
The small graph is a directed triangle. The large graph has one copy of the triangle, and in that copy only vertex 2 is black. Each valid move turns one vertex from black to white and one (its only follower) from white to black. Thus, regardless of what the players do, the game will continue forever and thus it is a draw.
5
{0, 1, 2, 3, 3}
{1, 2, 3, 0, 4}
{24}
Returns: "win"
The graph consists of a directed cycle 0->1->2->0 and two more edges: 3->0 and 3->4. Initially, vertices 3 and 4 are black. Thus, there are three possible first moves: Toggle 3 and its follower 0. Toggle 4 and its follower 4. Toggle 4 only (no followers). The move that toggles both 3 and 0 clearly turns the game into a draw, as in the previous example. Toggling just vertex 4 also results in a draw if both players play optimally. This is because our opponent will see only vertex 3 black, and they have two possible moves: one of them toggles 3 and 4 (in which case we then toggle 4 and win), the other toggles 3 and 0 (in which case we have the familiar draw). Luckily for us, the last possible move in the given position (the one that toggles both 3 and 4) wins the game immediately.
5
{0, 1, 2, 3, 3}
{1, 2, 3, 0, 4}
{8}
Returns: "draw"
5
{0, 1, 2, 3}
{1, 2, 3, 4}
{13, 5, 9}
Returns: "win"
The small graph is a path with five vertices. We have three copies of such a path, each starts with a different pattern of white and black.
5
{0, 1, 2, 3, 4}
{1, 2, 3, 4, 3}
{13, 5, 9}
Returns: "draw"
12
{11, 9, 0, 1, 1, 7, 6, 8, 5, 9, 11, 9, 0, 11, 2, 11, 2, 6, 4, 5, 3, 9, 8, 9, 0, 2, 1, 7, 7}
{2, 11, 8, 3, 9, 4, 5, 2, 9, 7, 4, 4, 1, 7, 4, 1, 7, 4, 7, 2, 8, 3, 7, 6, 9, 3, 7, 5, 8}
{966, 2153, 2163, 3153, 3327, 1098, 2284, 3881, 3277, 2234, 1963, 498, 3835, 2531, 326, 124, 706, 2132, 2040, 795, 2536, 3559, 909, 3958, 1370, 2350, 611, 563, 1951, 1225, 1946, 2918, 3378, 13}
Returns: "draw"
12
{11, 9, 0, 1, 1, 7, 6, 8, 5, 9, 11, 9, 0, 11, 2, 11, 2, 6, 4, 5, 3, 9, 8, 9, 0, 2, 1, 7, 7}
{2, 11, 8, 3, 9, 4, 5, 2, 9, 7, 4, 4, 1, 7, 4, 1, 7, 4, 7, 2, 8, 3, 7, 6, 9, 3, 7, 5, 8}
{1123, 2224, 326, 693, 586, 698, 523, 1583, 177, 1491, 2236, 424, 2903, 2405, 411, 396, 3382, 3433}
Returns: "lose"
12
{11, 9, 0, 1, 1, 7, 6, 8, 5, 9, 11, 9, 0, 11, 2, 11, 2, 6, 4, 5, 3, 9, 8, 9, 0, 2, 1, 7, 7}
{2, 11, 8, 3, 9, 4, 5, 2, 9, 7, 4, 4, 1, 7, 4, 1, 7, 4, 7, 2, 8, 3, 7, 6, 9, 3, 7, 5, 8}
{3107, 2076, 2820, 232, 3203, 2626, 2683, 3001, 270, 1249, 3027, 125, 2370, 1154, 450, 3064, 1742, 1149, 3587, 3325, 1327, 980, 1465, 1750, 3884, 3871}
Returns: "win"
12
{11, 9, 0, 1, 1, 7, 6, 8, 5, 9, 11, 9, 0, 11, 2, 11, 2, 6, 4, 5, 3, 9, 8, 9, 0, 2, 1, 7, 7}
{2, 11, 8, 3, 9, 4, 5, 2, 9, 7, 4, 4, 1, 7, 4, 1, 7, 4, 7, 2, 8, 3, 7, 6, 9, 3, 7, 5, 8}
{185}
Returns: "draw"
12
{11, 9, 0, 1, 1, 7, 6, 8, 5, 9, 11, 9, 0, 11, 2, 11, 2, 6, 4, 5, 3, 9, 8, 9, 0, 2, 1, 7, 7}
{2, 11, 8, 3, 9, 4, 5, 2, 9, 7, 4, 4, 1, 7, 4, 1, 7, 4, 7, 2, 8, 3, 7, 6, 9, 3, 7, 5, 8}
{2166, 1585, 4022, 2680, 53, 1496, 3753, 2233, 516, 1125, 2399, 1670, 509, 3574, 984}
Returns: "draw"
12
{11, 9, 0, 1, 1, 7, 6, 8, 5, 9, 11, 9, 0, 11, 2, 11, 2, 6, 4, 5, 3, 9, 8, 9, 0, 2, 1, 7, 7}
{2, 11, 8, 3, 9, 4, 5, 2, 9, 7, 4, 4, 1, 7, 4, 1, 7, 4, 7, 2, 8, 3, 7, 6, 9, 3, 7, 5, 8}
{2355, 298, 3030, 2030, 3103, 359, 3768, 1011, 3083, 3408, 3447, 2530, 3938, 3039, 194, 3584}
Returns: "draw"
12
{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11}
{11, 4, 6, 7, 8, 5, 10, 11, 10, 6, 1, 7, 0, 5, 0, 11, 2, 6, 1, 4, 11, 6, 0, 1}
{966, 2153, 2163, 3153, 3327, 1098, 2284, 3881, 3277, 2234, 1963, 498, 3835, 2531, 326, 124, 706, 2132, 2040, 795, 2536, 3559, 909, 3958, 1370, 2350, 611, 563, 1951, 1225, 1946, 2918, 3378, 13}
Returns: "draw"
12
{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11}
{11, 4, 6, 7, 8, 5, 10, 11, 10, 6, 1, 7, 0, 5, 0, 11, 2, 6, 1, 4, 11, 6, 0, 1}
{195, 609, 1162, 2665, 2194, 2674, 2067, 2139, 609, 1699, 633, 1616, 3242, 1224, 1587, 1560, 1131, 1232, 593, 66, 57, 3081}
Returns: "lose"
12
{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11}
{11, 4, 6, 7, 8, 5, 10, 11, 10, 6, 1, 7, 0, 5, 0, 11, 2, 6, 1, 4, 11, 6, 0, 1}
{514, 2179, 2290, 3696, 1050, 705, 3746, 249, 1155, 514, 1666, 3825, 2714, 249, 2050, 760, 1115, 3752, 1649, 2730, 3161, 3130, 225, 624, 169, 1713}
Returns: "win"
12
{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11}
{11, 4, 6, 7, 8, 5, 10, 11, 10, 6, 1, 7, 0, 5, 0, 11, 2, 6, 1, 4, 11, 6, 0, 1}
{3422}
Returns: "win"
12
{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11}
{11, 4, 6, 7, 8, 5, 10, 11, 10, 6, 1, 7, 0, 5, 0, 11, 2, 6, 1, 4, 11, 6, 0, 1}
{564}
Returns: "draw"
12
{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11}
{11, 4, 6, 7, 8, 5, 10, 11, 10, 6, 1, 7, 0, 5, 0, 11, 2, 6, 1, 4, 11, 6, 0, 1}
{624, 1771, 1785, 3691, 2281, 1768, 732, 3760, 105, 3651, 3818, 2145, 2210, 1192, 2056, 3736, 2570}
Returns: "win"
12
{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11}
{11, 4, 6, 7, 8, 5, 10, 11, 10, 6, 1, 7, 0, 5, 0, 11, 2, 6, 1, 4, 11, 6, 0, 1}
{3625, 2049, 1683, 1227, 1198, 43, 18, 232, 1699, 3802, 3770, 1155}
Returns: "draw"
12
{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11}
{11, 4, 6, 7, 8, 5, 10, 11, 10, 6, 1, 7, 0, 5, 0, 11, 2, 6, 1, 4, 11, 6, 0, 1}
{66, 2129, 616, 2786, 2762, 2083, 1145, 3665, 1554, 2603, 2680, 144, 2282, 2752, 2699, 1093, 3696, 657, 1192, 3249}
Returns: "win"
12
{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11}
{11, 4, 6, 7, 8, 5, 10, 11, 10, 6, 1, 7, 0, 5, 0, 11, 2, 6, 1, 4, 11, 6, 0, 1}
{105, 163, 3745, 634, 1665, 106, 201, 4023, 1666, 2186, 1761, 209, 243, 562, 3312, 739, 1169, 1761, 2122, 3282, 2810, 2160, 2617, 1121, 1576, 2272}
Returns: "draw"
10
{4, 4, 4, 5, 8, 0, 2, 4, 5, 3, 8, 2, 2, 2, 6, 3, 0, 7, 7}
{0, 3, 6, 1, 9, 5, 5, 2, 6, 6, 2, 4, 1, 7, 1, 2, 3, 5, 8}
{966, 105, 115, 81, 255, 74, 236, 809, 205, 186, 939, 498, 763, 483, 326, 124, 706, 84, 1016, 795, 488, 487, 909, 886, 346, 302, 611, 563, 927, 201, 922, 870, 306, 13}
Returns: "draw"
10
{4, 4, 4, 5, 8, 0, 2, 4, 5, 3, 8, 2, 2, 2, 6, 3, 0, 7, 7}
{0, 3, 6, 1, 9, 5, 5, 2, 6, 6, 2, 4, 1, 7, 1, 2, 3, 5, 8}
{97, 560, 67, 562, 73, 569, 9, 43, 560, 593, 570, 552, 83, 98, 537, 522, 51, 104}
Returns: "lose"
10
{4, 4, 4, 5, 8, 0, 2, 4, 5, 3, 8, 2, 2, 2, 6, 3, 0, 7, 7}
{0, 3, 6, 1, 9, 5, 5, 2, 6, 6, 2, 4, 1, 7, 1, 2, 3, 5, 8}
{33, 26, 2, 616, 513, 65, 121, 568, 11, 608, 593, 122, 65, 513, 577, 632, 587, 122, 1, 634, 43, 594, 568, 595, 42, 27}
Returns: "win"
10
{4, 4, 4, 5, 8, 0, 2, 4, 5, 3, 8, 2, 2, 2, 6, 3, 0, 7, 7}
{0, 3, 6, 1, 9, 5, 5, 2, 6, 6, 2, 4, 1, 7, 1, 2, 3, 5, 8}
{1010}
Returns: "win"
10
{4, 4, 4, 5, 8, 0, 2, 4, 5, 3, 8, 2, 2, 2, 6, 3, 0, 7, 7}
{0, 3, 6, 1, 9, 5, 5, 2, 6, 6, 2, 4, 1, 7, 1, 2, 3, 5, 8}
{566}
Returns: "draw"
10
{4, 4, 4, 5, 8, 0, 2, 4, 5, 3, 8, 2, 2, 2, 6, 3, 0, 7, 7}
{0, 3, 6, 1, 9, 5, 5, 2, 6, 6, 2, 4, 1, 7, 1, 2, 3, 5, 8}
{50, 114, 632, 626, 627, 2, 563, 586, 120, 81, 9, 120, 568, 515, 627, 823, 48, 98, 40, 91, 552, 545, 634, 82, 600}
Returns: "win"
10
{4, 4, 4, 5, 8, 0, 2, 4, 5, 3, 8, 2, 2, 2, 6, 3, 0, 7, 7}
{0, 3, 6, 1, 9, 5, 5, 2, 6, 6, 2, 4, 1, 7, 1, 2, 3, 5, 8}
{80, 579, 40, 309, 121, 584, 523, 56, 584, 33, 17, 611, 72, 608, 625, 59, 58, 562, 521, 521, 115, 67, 627, 570, 544, 58, 528, 568, 531, 584}
Returns: "draw"
10
{4, 4, 4, 5, 8, 0, 2, 4, 5, 3, 8, 2, 2, 2, 6, 3, 0, 7, 7}
{0, 3, 6, 1, 9, 5, 5, 2, 6, 6, 2, 4, 1, 7, 1, 2, 3, 5, 8}
{538, 576, 98, 538, 9, 592, 51, 537, 571, 48, 105, 120, 531, 72, 112, 624, 600, 530, 625, 619, 104, 626, 672, 121, 35}
Returns: "win"
10
{4, 4, 4, 5, 8, 0, 2, 4, 5, 3, 8, 2, 2, 2, 6, 3, 0, 7, 7}
{0, 3, 6, 1, 9, 5, 5, 2, 6, 6, 2, 4, 1, 7, 1, 2, 3, 5, 8}
{528, 633, 120, 552, 608, 81, 18, 2, 538, 326, 16, 552, 18, 81, 98, 529, 50}
Returns: "draw"
12
{3, 5, 9, 1, 1, 11, 2, 2, 6, 7, 3, 4, 5, 3, 5, 11, 0, 9, 11, 2, 1, 2, 4, 3, 5, 8, 9, 1, 0}
{7, 7, 8, 0, 6, 8, 5, 8, 2, 10, 0, 5, 0, 6, 9, 4, 1, 10, 1, 7, 11, 10, 1, 5, 11, 1, 6, 4, 6}
{966, 2153, 2163, 3153, 3327, 1098, 2284, 3881, 3277, 2234, 1963, 498, 3835, 2531, 326, 124, 706, 2132, 2040, 795, 2536, 3559, 909, 3958, 1370, 2350, 611, 563, 1951, 1225, 1946, 2918, 3378, 13}
Returns: "draw"
12
{3, 5, 9, 1, 1, 11, 2, 2, 6, 7, 3, 4, 5, 3, 5, 11, 0, 9, 11, 2, 1, 2, 4, 3, 5, 8, 9, 1, 0}
{7, 7, 8, 0, 6, 8, 5, 8, 2, 10, 0, 5, 0, 6, 9, 4, 1, 10, 1, 7, 11, 10, 1, 5, 11, 1, 6, 4, 6}
{772, 1408, 2581, 1424, 580, 1476, 68, 340, 1408, 3717, 1488, 3393, 2709, 2833, 3269, 3153, 2453, 2881, 1344, 260}
Returns: "lose"
12
{3, 5, 9, 1, 1, 11, 2, 2, 6, 7, 3, 4, 5, 3, 5, 11, 0, 9, 11, 2, 1, 2, 4, 3, 5, 8, 9, 1, 0}
{7, 7, 8, 0, 6, 8, 5, 8, 2, 10, 0, 5, 0, 6, 9, 4, 1, 10, 1, 7, 11, 10, 1, 5, 11, 1, 6, 4, 6}
{2065, 1856, 1028, 516, 964, 3521, 2133, 1792, 3717, 976, 2565, 1028, 3589}
Returns: "win"
12
{3, 5, 9, 1, 1, 11, 2, 2, 6, 7, 3, 4, 5, 3, 5, 11, 0, 9, 11, 2, 1, 2, 4, 3, 5, 8, 9, 1, 0}
{7, 7, 8, 0, 6, 8, 5, 8, 2, 10, 0, 5, 0, 6, 9, 4, 1, 10, 1, 7, 11, 10, 1, 5, 11, 1, 6, 4, 6}
{2956}
Returns: "win"
12
{3, 5, 9, 1, 1, 11, 2, 2, 6, 7, 3, 4, 5, 3, 5, 11, 0, 9, 11, 2, 1, 2, 4, 3, 5, 8, 9, 1, 0}
{7, 7, 8, 0, 6, 8, 5, 8, 2, 10, 0, 5, 0, 6, 9, 4, 1, 10, 1, 7, 11, 10, 1, 5, 11, 1, 6, 4, 6}
{584}
Returns: "draw"
12
{3, 5, 9, 1, 1, 11, 2, 2, 6, 7, 3, 4, 5, 3, 5, 11, 0, 9, 11, 2, 1, 2, 4, 3, 5, 8, 9, 1, 0}
{7, 7, 8, 0, 6, 8, 5, 8, 2, 10, 0, 5, 0, 6, 9, 4, 1, 10, 1, 7, 11, 10, 1, 5, 11, 1, 6, 4, 6}
{1044, 2773, 1472, 4049, 1344, 3521, 656, 384, 3989, 3985, 2261, 3989, 912, 960, 3777, 3477, 2817, 16, 89, 2705, 2385, 400, 916, 3777, 3989, 1684, 784, 1472, 896}
Returns: "win"
12
{3, 5, 9, 1, 1, 11, 2, 2, 6, 7, 3, 4, 5, 3, 5, 11, 0, 9, 11, 2, 1, 2, 4, 3, 5, 8, 9, 1, 0}
{7, 7, 8, 0, 6, 8, 5, 8, 2, 10, 0, 5, 0, 6, 9, 4, 1, 10, 1, 7, 11, 10, 1, 5, 11, 1, 6, 4, 6}
{944, 3013, 468, 448, 148, 1600, 464, 3217, 2689, 3141, 3329, 1108, 3221, 1940, 1600, 532, 1152}
Returns: "draw"
12
{3, 5, 9, 1, 1, 11, 2, 2, 6, 7, 3, 4, 5, 3, 5, 11, 0, 9, 11, 2, 1, 2, 4, 3, 5, 8, 9, 1, 0}
{7, 7, 8, 0, 6, 8, 5, 8, 2, 10, 0, 5, 0, 6, 9, 4, 1, 10, 1, 7, 11, 10, 1, 5, 11, 1, 6, 4, 6}
{3269, 788, 3857, 3425, 1108, 3605, 1472, 2773, 324, 1280, 404, 916, 256, 1152, 2965}
Returns: "win"
12
{3, 5, 9, 1, 1, 11, 2, 2, 6, 7, 3, 4, 5, 3, 5, 11, 0, 9, 11, 2, 1, 2, 4, 3, 5, 8, 9, 1, 0}
{7, 7, 8, 0, 6, 8, 5, 8, 2, 10, 0, 5, 0, 6, 9, 4, 1, 10, 1, 7, 11, 10, 1, 5, 11, 1, 6, 4, 6}
{2885, 4001, 896, 1232, 3585, 1220, 1924, 276, 832, 784, 964, 3217, 2433, 3713, 404}
Returns: "draw"
12
{3, 4, 3, 4, 3, 5, 5, 8, 0, 0, 1, 0, 9, 2, 1, 1, 2, 2, 0, 6, 7, 6, 4, 3, 5, 4, 3, 5, 4, 8, 9, 0, 2, 1, 10, 0, 2, 0, 1, 1, 2, 1, 7, 6, 6, 4, 3, 3, 4, 3, 5, 5, 0, 0, 0, 8, 1, 0, 2, 2, 1, 2, 1, 7, 6, 7}
{4, 9, 7, 6, 10, 7, 10, 9, 2, 5, 6, 8, 11, 11, 9, 3, 8, 5, 11, 11, 10, 8, 5, 9, 6, 8, 6, 9, 11, 11, 10, 1, 4, 2, 11, 10, 7, 4, 11, 5, 10, 8, 9, 7, 10, 7, 5, 11, 10, 8, 11, 8, 7, 3, 9, 10, 4, 6, 3, 9, 7, 6, 10, 11, 9, 8}
{966, 2153, 2163, 3153, 3327, 1098, 2284, 3881, 3277, 2234, 1963, 498, 3835, 2531, 326, 124, 706, 2132, 2040, 795, 2536, 3559, 909, 3958, 1370, 2350, 611, 563, 1951, 1225, 1946, 2918, 3378, 13}
Returns: "win"
12
{3, 4, 3, 4, 3, 5, 5, 8, 0, 0, 1, 0, 9, 2, 1, 1, 2, 2, 0, 6, 7, 6, 4, 3, 5, 4, 3, 5, 4, 8, 9, 0, 2, 1, 10, 0, 2, 0, 1, 1, 2, 1, 7, 6, 6, 4, 3, 3, 4, 3, 5, 5, 0, 0, 0, 8, 1, 0, 2, 2, 1, 2, 1, 7, 6, 7}
{4, 9, 7, 6, 10, 7, 10, 9, 2, 5, 6, 8, 11, 11, 9, 3, 8, 5, 11, 11, 10, 8, 5, 9, 6, 8, 6, 9, 11, 11, 10, 1, 4, 2, 11, 10, 7, 4, 11, 5, 10, 8, 9, 7, 10, 7, 5, 11, 10, 8, 11, 8, 7, 3, 9, 10, 4, 6, 3, 9, 7, 6, 10, 11, 9, 8}
{2609, 1112, 163, 2394, 293, 2397, 261, 791, 2136, 2793, 1118, 2260, 3499, 3250, 205, 198, 1691, 3764, 1108, 1553, 1038, 3458}
Returns: "lose"
12
{3, 4, 3, 4, 3, 5, 5, 8, 0, 0, 1, 0, 9, 2, 1, 1, 2, 2, 0, 6, 7, 6, 4, 3, 5, 4, 3, 5, 4, 8, 9, 0, 2, 1, 10, 0, 2, 0, 1, 1, 2, 1, 7, 6, 6, 4, 3, 3, 4, 3, 5, 5, 0, 0, 0, 8, 1, 0, 2, 2, 1, 2, 1, 7, 6, 7}
{4, 9, 7, 6, 10, 7, 10, 9, 2, 5, 6, 8, 11, 11, 9, 3, 8, 5, 11, 11, 10, 8, 5, 9, 6, 8, 6, 9, 11, 11, 10, 1, 4, 2, 11, 10, 7, 4, 11, 5, 10, 8, 9, 7, 10, 7, 5, 11, 10, 8, 11, 8, 7, 3, 9, 10, 4, 6, 3, 9, 7, 6, 10, 11, 9, 8}
{1601, 1313, 3389, 3548, 135, 2672, 3561, 2110, 1185, 577, 2273, 3580, 871, 574, 3841, 1662, 2711, 2538, 2780, 875, 1942, 1935, 1080, 2140, 3626, 748}
Returns: "win"
12
{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11}
{2, 5, 2, 7, 11, 5, 8, 11, 1, 11, 3, 7, 0, 11, 0, 11, 4, 6, 0, 7, 1, 5, 9, 10}
{966, 2153, 2163, 3153, 3327, 1098, 2284, 3881, 3277, 2234, 1963, 498, 3835, 2531, 326, 124, 706, 2132, 2040, 795, 2536, 3559, 909, 3958, 1370, 2350, 611, 563, 1951, 1225, 1946, 2918, 3378, 13}
Returns: "draw"
12
{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11}
{2, 5, 2, 7, 11, 5, 8, 11, 1, 11, 3, 7, 0, 11, 0, 11, 4, 6, 0, 7, 1, 5, 9, 10}
{1122, 2224, 326, 693, 586, 698, 523, 1582, 177, 1490, 2236, 424, 2903, 2405, 411, 396, 3383}
Returns: "lose"
12
{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11}
{2, 5, 2, 7, 11, 5, 8, 11, 1, 11, 3, 7, 0, 11, 0, 11, 4, 6, 0, 7, 1, 5, 9, 10}
{2216, 3106, 2076, 2820, 232, 3202, 2626, 2683, 3001, 270}
Returns: "win"
12
{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11}
{2, 5, 2, 7, 11, 5, 8, 11, 1, 11, 3, 7, 0, 11, 0, 11, 4, 6, 0, 7, 1, 5, 9, 10}
{3026}
Returns: "draw"
12
{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11}
{2, 5, 2, 7, 11, 5, 8, 11, 1, 11, 3, 7, 0, 11, 0, 11, 4, 6, 0, 7, 1, 5, 9, 10}
{3575, 1496, 2160, 3885, 3324, 1751, 3157, 1326, 2399, 3064, 1148, 1464, 3752, 450, 2371, 2166, 980, 184, 1743, 3870, 3586, 2680, 1124, 2400}
Returns: "draw"
12
{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11}
{2, 5, 2, 7, 11, 5, 8, 11, 1, 11, 3, 7, 0, 11, 0, 11, 4, 6, 0, 7, 1, 5, 9, 10}
{3039, 2031, 3409, 3585, 3939, 2323, 3769, 3102, 298, 3082, 2514, 1482, 3446, 2530, 359, 1141, 3030, 3989, 2355, 1346}
Returns: "draw"
12
{4, 8, 0, 10, 8, 10, 1, 9, 0, 1, 4, 8, 10, 1, 3, 0, 1, 7, 1}
{3, 3, 2, 6, 9, 3, 0, 11, 8, 9, 5, 5, 2, 11, 5, 3, 4, 2, 10}
{966, 2153, 2163, 3153, 3327, 1098, 2284, 3881, 3277, 2234, 1963, 498, 3835, 2531, 326, 124, 706, 2132, 2040, 795, 2536, 3559, 909, 3958, 1370, 2350, 611, 563, 1951, 1225, 1946, 2918, 3378, 13}
Returns: "win"
12
{4, 8, 0, 10, 8, 10, 1, 9, 0, 1, 4, 8, 10, 1, 3, 0, 1, 7, 1}
{3, 3, 2, 6, 9, 3, 0, 11, 8, 9, 5, 5, 2, 11, 5, 3, 4, 2, 10}
{2609, 1112, 163, 2394, 293, 2397, 261, 791, 2136, 2793, 1118, 2260, 3499, 3250, 205, 198, 1691, 3764, 1108, 1553, 1038, 3458, 2164, 1601, 1313, 3389, 3548}
Returns: "lose"
12
{4, 8, 0, 10, 8, 10, 1, 9, 0, 1, 4, 8, 10, 1, 3, 0, 1, 7, 1}
{3, 3, 2, 6, 9, 3, 0, 11, 8, 9, 5, 5, 2, 11, 5, 3, 4, 2, 10}
{2672, 3561, 2110, 1185, 577, 2273, 3580, 871, 574, 3841, 1662, 2711, 2538, 2780, 875, 1942, 1935}
Returns: "win"
12
{4, 3, 9, 5, 10, 1, 11, 1, 0, 3, 9, 11, 11, 11, 6, 6, 3, 4, 3, 3, 8, 5, 11, 8, 0, 0, 10, 10, 1}
{0, 1, 2, 7, 6, 0, 8, 3, 11, 0, 7, 4, 1, 10, 4, 7, 2, 7, 5, 11, 4, 8, 0, 7, 3, 9, 7, 1, 7}
{966, 2153, 2163, 3153, 3327, 1098, 2284, 3881, 3277, 2234, 1963, 498, 3835, 2531, 326, 124, 706, 2132, 2040, 795, 2536, 3559, 909, 3958, 1370, 2350, 611, 563, 1951, 1225, 1946, 2918, 3378, 13}
Returns: "draw"
12
{4, 3, 9, 5, 10, 1, 11, 1, 0, 3, 9, 11, 11, 11, 6, 6, 3, 4, 3, 3, 8, 5, 11, 8, 0, 0, 10, 10, 1}
{0, 1, 2, 7, 6, 0, 8, 3, 11, 0, 7, 4, 1, 10, 4, 7, 2, 7, 5, 11, 4, 8, 0, 7, 3, 9, 7, 1, 7}
{194, 352, 646, 1380, 1170, 1394, 1042, 1110, 352, 930, 372, 848, 1702, 708, 818, 788, 614, 720, 336, 66, 52, 1540}
Returns: "lose"
12
{4, 3, 9, 5, 10, 1, 11, 1, 0, 3, 9, 11, 11, 11, 6, 6, 3, 4, 3, 3, 8, 5, 11, 8, 0, 0, 10, 10, 1}
{0, 1, 2, 7, 6, 0, 8, 3, 11, 0, 7, 4, 1, 10, 4, 7, 2, 7, 5, 11, 4, 8, 0, 7, 3, 9, 7, 1, 7}
{258, 1154, 1266, 1904, 534, 448, 1954, 244, 642, 258, 898, 2032, 1430, 244, 1026, 500, 598, 1956, 880, 1446, 1620, 1590, 224, 368, 164, 944}
Returns: "win"
12
{4, 3, 9, 5, 10, 1, 11, 1, 0, 3, 9, 11, 11, 11, 6, 6, 3, 4, 3, 3, 8, 5, 11, 8, 0, 0, 10, 10, 1}
{0, 1, 2, 7, 6, 0, 8, 3, 11, 0, 7, 4, 1, 10, 4, 7, 2, 7, 5, 11, 4, 8, 0, 7, 3, 9, 7, 1, 7}
{3030}
Returns: "win"
12
{4, 3, 9, 5, 10, 1, 11, 1, 0, 3, 9, 11, 11, 11, 6, 6, 3, 4, 3, 3, 8, 5, 11, 8, 0, 0, 10, 10, 1}
{0, 1, 2, 7, 6, 0, 8, 3, 11, 0, 7, 4, 1, 10, 4, 7, 2, 7, 5, 11, 4, 8, 0, 7, 3, 9, 7, 1, 7}
{2900}
Returns: "draw"
12
{4, 3, 9, 5, 10, 1, 11, 1, 0, 3, 9, 11, 11, 11, 6, 6, 3, 4, 3, 3, 8, 5, 11, 8, 0, 0, 10, 10, 1}
{0, 1, 2, 7, 6, 0, 8, 3, 11, 0, 7, 4, 1, 10, 4, 7, 2, 7, 5, 11, 4, 8, 0, 7, 3, 9, 7, 1, 7}
{998, 3044, 996, 368, 1894, 1286, 1012, 100, 1120, 1968, 1028}
Returns: "win"
12
{4, 3, 9, 5, 10, 1, 11, 1, 0, 3, 9, 11, 11, 11, 6, 6, 3, 4, 3, 3, 8, 5, 11, 8, 0, 0, 10, 10, 1}
{0, 1, 2, 7, 6, 0, 8, 3, 11, 0, 7, 4, 1, 10, 4, 7, 2, 7, 5, 11, 4, 8, 0, 7, 3, 9, 7, 1, 7}
{742, 610, 594, 18, 672, 1958, 1024, 386, 962, 1392, 2018, 1730, 54, 710, 2006, 1974, 1768, 546}
Returns: "draw"
12
{4, 3, 9, 5, 10, 1, 11, 1, 0, 3, 9, 11, 11, 11, 6, 6, 3, 4, 3, 3, 8, 5, 11, 8, 0, 0, 10, 10, 1}
{0, 1, 2, 7, 6, 0, 8, 3, 11, 0, 7, 4, 1, 10, 4, 7, 2, 7, 5, 11, 4, 8, 0, 7, 3, 9, 7, 1, 7}
{66, 1104, 356, 1506, 1478, 1058, 628, 1872, 786, 1318, 1396, 144, 1254, 1472, 1414, 3680, 1904, 400, 676, 1712}
Returns: "win"
12
{4, 3, 9, 5, 10, 1, 11, 1, 0, 3, 9, 11, 11, 11, 6, 6, 3, 4, 3, 3, 8, 5, 11, 8, 0, 0, 10, 10, 1}
{0, 1, 2, 7, 6, 0, 8, 3, 11, 0, 7, 4, 1, 10, 4, 7, 2, 7, 5, 11, 4, 8, 0, 7, 3, 9, 7, 1, 7}
{100, 162, 1952, 374, 896, 102, 196, 3874, 898, 1158, 992, 208, 242, 306, 1776, 482, 656, 992, 1094, 1746, 1526, 1136, 1332, 608, 804, 1248}
Returns: "draw"
12
{3, 4, 3, 4, 3, 5, 0, 5, 8, 9, 0, 1, 0, 2, 2, 1, 9, 2, 1, 0, 6, 7, 6, 4, 3, 5, 4, 3, 5, 4, 8, 0, 0, 2, 1, 0, 0, 2, 10, 1, 1, 2, 1, 7, 6, 6, 4, 3, 3, 4, 3, 5, 5, 0, 0, 8, 1, 0, 2, 2, 1, 2, 1, 7, 6, 7}
{4, 9, 7, 6, 10, 7, 2, 10, 9, 10, 5, 6, 8, 5, 11, 3, 11, 8, 9, 11, 11, 10, 8, 5, 9, 6, 8, 6, 9, 11, 11, 1, 7, 4, 2, 4, 10, 7, 11, 11, 5, 10, 8, 9, 7, 10, 7, 5, 11, 10, 8, 11, 8, 3, 9, 10, 4, 6, 3, 9, 7, 6, 10, 11, 9, 8}
{966, 2153, 2163, 3153, 3327, 1098, 2284, 3881, 3277, 2234, 1963, 498, 3835, 2531, 326, 124, 706, 2132, 2040, 795, 2536, 3559, 909, 3958, 1370, 2350, 611, 563, 1951, 1225, 1946, 2918, 3378, 13}
Returns: "win"
12
{3, 4, 3, 4, 3, 5, 0, 5, 8, 9, 0, 1, 0, 2, 2, 1, 9, 2, 1, 0, 6, 7, 6, 4, 3, 5, 4, 3, 5, 4, 8, 0, 0, 2, 1, 0, 0, 2, 10, 1, 1, 2, 1, 7, 6, 6, 4, 3, 3, 4, 3, 5, 5, 0, 0, 8, 1, 0, 2, 2, 1, 2, 1, 7, 6, 7}
{4, 9, 7, 6, 10, 7, 2, 10, 9, 10, 5, 6, 8, 5, 11, 3, 11, 8, 9, 11, 11, 10, 8, 5, 9, 6, 8, 6, 9, 11, 11, 1, 7, 4, 2, 4, 10, 7, 11, 11, 5, 10, 8, 9, 7, 10, 7, 5, 11, 10, 8, 11, 8, 3, 9, 10, 4, 6, 3, 9, 7, 6, 10, 11, 9, 8}
{2609, 1112, 163, 2394, 293, 2397, 261, 791, 2136, 2793, 1118, 2260, 3499, 3250, 205, 198, 1691, 3764, 1108, 1553, 1038, 3458}
Returns: "lose"
12
{3, 4, 3, 4, 3, 5, 0, 5, 8, 9, 0, 1, 0, 2, 2, 1, 9, 2, 1, 0, 6, 7, 6, 4, 3, 5, 4, 3, 5, 4, 8, 0, 0, 2, 1, 0, 0, 2, 10, 1, 1, 2, 1, 7, 6, 6, 4, 3, 3, 4, 3, 5, 5, 0, 0, 8, 1, 0, 2, 2, 1, 2, 1, 7, 6, 7}
{4, 9, 7, 6, 10, 7, 2, 10, 9, 10, 5, 6, 8, 5, 11, 3, 11, 8, 9, 11, 11, 10, 8, 5, 9, 6, 8, 6, 9, 11, 11, 1, 7, 4, 2, 4, 10, 7, 11, 11, 5, 10, 8, 9, 7, 10, 7, 5, 11, 10, 8, 11, 8, 3, 9, 10, 4, 6, 3, 9, 7, 6, 10, 11, 9, 8}
{1601, 1313, 3389, 3548, 135, 2672, 3561, 2110, 1185, 577, 2273, 3580, 871, 574, 3841, 1662, 2711, 2538, 2780, 875, 1942, 1935, 1080, 2140, 3626, 748}
Returns: "win"
7
{4, 0, 1, 3, 5, 0, 0, 2, 2, 5, 0, 3, 5, 5, 6}
{0, 4, 2, 1, 4, 3, 6, 3, 6, 0, 5, 6, 3, 6, 3}
{70, 105, 115, 81, 127, 74, 108, 41, 77, 58, 43, 114, 123, 99, 70, 124, 66, 84, 120, 27, 104, 103, 13, 118, 90, 46, 99, 51, 31, 73, 26, 102, 50, 13}
Returns: "draw"
7
{4, 0, 1, 3, 5, 0, 0, 2, 2, 5, 0, 3, 5, 5, 6}
{0, 4, 2, 1, 4, 3, 6, 3, 6, 0, 5, 6, 3, 6, 3}
{6, 0, 12, 10, 68, 68, 68, 78, 0, 6, 72, 66, 12, 10, 68, 72, 12}
Returns: "lose"
7
{4, 0, 1, 3, 5, 0, 0, 2, 2, 5, 0, 3, 5, 5, 6}
{0, 4, 2, 1, 4, 3, 6, 3, 6, 0, 5, 6, 3, 6, 3}
{66, 6, 72, 10, 66, 6, 6, 68, 66, 78}
Returns: "win"
7
{4, 0, 1, 3, 5, 0, 0, 2, 2, 5, 0, 3, 5, 5, 6}
{0, 4, 2, 1, 4, 3, 6, 3, 6, 0, 5, 6, 3, 6, 3}
{114}
Returns: "win"
7
{4, 0, 1, 3, 5, 0, 0, 2, 2, 5, 0, 3, 5, 5, 6}
{0, 4, 2, 1, 4, 3, 6, 3, 6, 0, 5, 6, 3, 6, 3}
{89}
Returns: "draw"
7
{4, 0, 1, 3, 5, 0, 0, 2, 2, 5, 0, 3, 5, 5, 6}
{0, 4, 2, 1, 4, 3, 6, 3, 6, 0, 5, 6, 3, 6, 3}
{0, 72, 78, 72, 6, 0, 10, 66, 72, 78, 12, 9, 66, 10, 12, 66, 78}
Returns: "win"
7
{4, 0, 1, 3, 5, 0, 0, 2, 2, 5, 0, 3, 5, 5, 6}
{0, 4, 2, 1, 4, 3, 6, 3, 6, 0, 5, 6, 3, 6, 3}
{66, 6, 72, 68, 6, 6, 72, 66, 66, 68, 0, 114}
Returns: "draw"
7
{4, 0, 1, 3, 5, 0, 0, 2, 2, 5, 0, 3, 5, 5, 6}
{0, 4, 2, 1, 4, 3, 6, 3, 6, 0, 5, 6, 3, 6, 3}
{10, 108, 12, 6, 72, 68, 0, 6, 0, 68, 0, 0, 10, 12, 78, 12, 78, 66}
Returns: "win"
7
{4, 0, 1, 3, 5, 0, 0, 2, 2, 5, 0, 3, 5, 5, 6}
{0, 4, 2, 1, 4, 3, 6, 3, 6, 0, 5, 6, 3, 6, 3}
{10, 12, 12, 12, 68, 0, 78, 10, 119, 66, 66}
Returns: "draw"