Cody

Solution 1993318

Submitted on 28 Oct 2019
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
board = [0 1 0 0 0 1 1 1 0 1 0 1 0 1 1 1 0 0 0 1 1 1 0 0 0]; assert(lights_out_9(board)); % [5 7 23]

0 0 1

2   Pass
board = [1 1 0 0 0 1 0 1 0 0 0 1 1 1 0 0 0 1 0 1 0 0 0 1 1]; assert(lights_out_9(board)); % [1 13 25]

0 0 1

3   Pass
board = [0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 1 1 1 1 0 0 1 0 0]; assert(lights_out_9(board)); % [9 15 19]

0 0 1

4   Pass
board = [0 1 0 1 0 1 1 0 1 1 0 0 0 0 0 1 1 0 1 1 0 1 0 1 0]; assert(lights_out_9(board)); % [7 9 17 19]

0 0 1

5   Pass
board = [1 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 1]; assert(lights_out_9(board)); % [1 5 7 9 17 19 21 25]

0 0 1

6   Pass
board = [0 0 1 1 0 0 1 1 1 1 0 1 1 1 1 0 0 1 1 0 0 0 0 0 0]; assert(lights_out_9(board)); % [12 13 17 18]

0 0 1

7   Pass
board = [0 0 1 0 0 0 0 1 0 0 1 1 0 1 1 0 0 1 0 0 0 0 1 0 0]; assert(lights_out_9(board)); % [8 12 14 18]

0 0 1

8   Pass
board = [0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 1 1 1 1 0 0 1 0 0]; assert(lights_out_9(board)); % [3 9 15 19]

0 0 1

9   Pass
board = [1 0 1 0 1 1 0 1 0 1 0 0 0 0 0 1 0 1 0 1 1 0 1 0 1]; assert(lights_out_9(board)); % [1 5 11 15 21 25]

0 0 1

10   Pass
board = [0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0]; assert(lights_out_9(board)); % [7 8 9 12 14 17 18 19]

0 0 1

11   Pass
board = [0 1 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0 1 0]; assert(lights_out_9(board)); % [2 6 8 12 14 18 20 24]

0 0 1

12   Pass
board = [0 1 1 1 1 1 0 1 0 0 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0]; assert(lights_out_9(board)); % on your own

0 0 1

13   Pass
board = [1 1 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 1 1]; assert(lights_out_9(board));

0 0 1

14   Pass
board = [0 1 1 1 0 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 0 1 1 1 0]; assert(lights_out_9(board));

0 0 1

15   Pass
board = [0 0 1 0 0 0 1 1 1 0 1 1 0 1 1 0 1 1 1 0 0 0 1 0 0]; assert(lights_out_9(board));

0 0 1

16   Fail
board = [0 1 0 1 0 1 0 0 0 1 1 1 0 1 1 1 0 0 0 1 0 1 0 1 0]; assert(~lights_out_9(board)); % [7 8 9 17 18 19]

0 0 1

Assertion failed.

17   Fail
board = [0 1 1 0 0 0 1 0 1 1 1 0 0 0 1 1 1 0 1 0 0 0 1 1 0]; assert(~lights_out_9(board)); % [1 2 5 10 16 21 24 25]

0 0 1

Assertion failed.

18   Fail
board = [0 0 0 1 0 1 1 0 1 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0]; assert(~lights_out_9(board)); % [2 5:6 8:11 17:24]

0 0 1

Assertion failed.

19   Fail
board = [1 0 1 0 0 0 1 1 0 0 1 0 1 0 0 0 1 1 0 0 0 0 0 0 0]; assert(~lights_out_9(board)); % on your own

0 0 1

Assertion failed.

20   Fail
board = [0 0 0 1 0 1 0 1 0 0 1 1 1 1 0 0 1 1 0 1 0 1 0 1 0]; assert(~lights_out_9(board));

0 0 1

Assertion failed.

21   Pass
board = [0 0 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 1 0 0 0 0 0 0 0]; assert(lights_out_9(board));

0 0 1

22   Fail
board = [1 0 1 1 0 1 0 0 1 1 0 0 0 0 0 1 1 0 0 1 0 1 1 0 1]; assert(~lights_out_9(board));

0 0 1

Assertion failed.