Cody

# Problem 44658. Kurosu solver

• Created by HH

This problem is related to Problem 44657.

The game of Kurosu is simple. A square grid contains cells that can be filled with either a 'X' or an 'O', similarly to a tic-tac-toe board. Game rules are as follows:

1. The game is played on a 6x6 board.

2. Each row and each column must contain exactly 3 'X's and 3 'O's.

3. Only 2 'X's or 'O's can be placed consecutively, either in a row or in a column.

4. Diagonals are of no importance.

In this problem, given a partially filled Kurosu board, b0, return b1, an array of the same size, representing the solved board, or an empty array if there is no valid solution. 'X's and 'O's are represented by 1s and 0s, respectively. An empty cell is represented by -1.

Example:

```b0 = [-1 -1 -1  0 -1 -1
-1 -1 -1  0  0 -1
-1 -1 -1 -1 -1 -1
-1 -1  0 -1 -1  1
-1 -1 -1 -1  1  1
-1 -1  1 -1 -1 -1];
```
```b1 = [ 1  1  0  0  1  0
0  1  1  0  0  1
1  0  0  1  1  0
0  1  0  1  0  1
0  0  1  0  1  1
1  0  1  1  0  0];
```

### Solution Stats

45.0% Correct | 55.0% Incorrect
Last solution submitted on May 02, 2019