Cody

Problem 3033. Tic-Tac-Logic - Solution Checker

Solution 3056524

Submitted on 4 Oct 2020 by Nikolaos Nikolaou
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,1,0,0,1; 1,0,1,0,0,1; 0,1,0,1,1,0; 0,1,0,1,0,1; 1,0,1,0,1,0; 1,0,0,1,1,0]; assert(isequal(tic_tac_logic_check(board),1))

tf = logical 1

2   Pass
board = [0,1,0,1,0,1; 0,1,0,1,0,1; 1,0,1,0,1,0; 1,0,1,0,1,0; 0,1,0,1,0,1; 1,0,1,0,1,0]; assert(isequal(tic_tac_logic_check(board),0))

tf = logical 0

3   Pass
board = [0,1,0,0,1,0,1,1; 0,0,1,0,1,1,0,1; 1,0,1,1,0,1,0,0; 0,1,0,1,0,0,1,1; 1,1,0,0,1,1,0,0; 1,0,1,0,1,1,0,0; 0,0,1,1,0,0,1,1; 1,1,0,1,0,0,1,0]; assert(isequal(tic_tac_logic_check(board),1))

tf = logical 1

4   Pass
board = [0,0,1,1,0,1,1,0,1,0; 1,1,0,0,1,1,0,1,0,0; 1,1,0,0,1,0,1,0,1,0; 0,0,1,1,0,1,0,1,0,1; 1,0,1,1,0,0,1,1,0,0; 1,1,0,0,1,1,0,0,1,0; 0,1,0,1,0,0,1,0,1,1; 0,0,1,0,1,0,1,1,0,1]; assert(isequal(tic_tac_logic_check(board),0))

tf = logical 0

5   Pass
board = [1,0,1,0,1,0; 0,1,1,0,1,0; 1,0,0,1,0,1; 1,0,0,1,1,0; 0,1,1,0,0,1; 0,1,0,1,0,1]; assert(isequal(tic_tac_logic_check(board),1))

tf = logical 1

6   Pass
board = [0,1,1,0,0,1; 1,0,1,0,0,1; 0,1,0,1,1,0; 0,1,1,0,0,1; 1,0,1,0,1,0; 1,0,0,1,1,0]; assert(isequal(tic_tac_logic_check(board),0))

tf = logical 0

7   Pass
board = [0,1,0,0,1,1,0,1; 0,0,1,0,1,1,0,1; 1,0,1,1,0,1,0,0; 0,1,0,1,0,0,1,1; 1,1,0,0,1,1,0,0; 1,0,1,0,1,1,0,0; 0,0,1,1,0,0,1,1; 1,1,0,1,0,0,1,0]; assert(isequal(tic_tac_logic_check(board),0))

tf = logical 0

8   Pass
board = [0,0,1,1,0,1,1,0; 1,1,0,1,0,0,1,0; 0,0,1,0,1,1,0,1; 0,1,0,1,0,1,0,1; 1,0,1,0,1,0,1,0; 0,0,1,0,1,0,1,1; 1,1,0,1,0,1,0,0; 1,1,0,0,1,0,0,1]; assert(isequal(tic_tac_logic_check(board),1))

tf = logical 1

9   Pass
board = [1,0,1,0,1,0,1,0; 1,1,0,0,1,0,1,0; 0,0,1,1,0,1,0,1; 1,1,0,1,0,0,1,0; 0,0,1,0,1,1,0,1; 0,1,0,1,0,1,1,0; 1,0,1,0,1,0,0,1; 0,1,0,1,0,1,0,1]; assert(isequal(tic_tac_logic_check(board),1))

tf = logical 1

10   Pass
board = [0,0,1,1,0,1,1,0; 1,1,0,1,0,0,1,0; 0,0,1,1,0,1,0,1; 0,1,0,1,0,1,0,1; 1,0,1,0,1,0,1,0; 0,0,1,0,1,0,1,1; 1,1,0,1,0,1,0,0; 1,1,0,0,1,0,0,1]; assert(isequal(tic_tac_logic_check(board),0))

tf = logical 0

11   Pass
board = [0,1,1,0,1,0,1,0,1,0; 1,1,0,0,1,0,1,1,0,0; 1,0,0,1,0,1,0,0,1,1; 0,1,1,0,1,0,1,0,0,1; 1,0,1,0,0,1,0,1,1,0; 1,0,0,1,1,0,1,0,0,1; 0,1,0,1,0,1,0,1,1,0; 0,1,1,0,0,1,1,0,0,1; 1,0,0,1,1,0,0,1,0,1; 0,0,1,1,0,1,0,1,1,0]; assert(isequal(tic_tac_logic_check(board),1))

tf = logical 1

12   Pass
board = [0,0,0,1,1,1; 1,1,1,0,0,0; 1,0,1,0,1,0; 0,1,0,1,0,1; 1,1,0,0,0,1; 0,0,1,1,1,0]; assert(isequal(tic_tac_logic_check(board),0))

tf = logical 0

13   Pass
board = [1,1,0,0,1,0,1,0,0,1; 1,0,0,1,0,1,0,1,1,0; 0,1,1,0,1,0,0,1,0,1; 0,0,1,1,0,1,1,0,1,0; 1,0,0,1,1,0,1,0,0,1; 1,1,0,0,1,0,0,1,1,0; 0,1,1,0,0,1,0,1,1,0; 0,0,1,1,0,1,1,0,0,1]; assert(isequal(tic_tac_logic_check(board),1))

tf = logical 1

14   Pass
board = [0,1,1,0,1,0,1,0,1,0; 1,1,0,0,1,0,1,1,0,0; 1,0,0,1,0,1,0,0,1,1; 0,1,1,0,1,0,1,0,0,1; 1,0,1,0,0,1,0,1,1,0; 1,0,1,0,1,0,1,0,0,1; 0,1,0,1,0,1,0,1,1,0; 0,1,1,0,0,1,1,0,0,1; 1,0,0,1,1,0,0,1,0,1; 0,0,1,1,0,1,0,1,1,0]; assert(isequal(tic_tac_logic_check(board),0))

tf = logical 0

15   Pass
board = [0,0,1,1,0,1,0,0,1,1; 1,1,0,0,1,1,0,1,0,0; 1,1,0,0,1,0,1,0,1,0; 0,0,1,1,0,1,0,1,0,1; 1,0,1,1,0,0,1,1,0,0; 1,1,0,0,1,1,0,0,1,0; 0,1,0,1,0,0,1,0,1,1; 0,0,1,0,1,0,1,1,0,1]; assert(isequal(tic_tac_logic_check(board),1))

tf = logical 1

16   Pass
board = [1,1,0,0,1,0,1,0,0,1; 1,0,0,1,0,1,0,1,1,0; 0,1,1,0,1,0,0,1,0,1; 0,0,1,1,0,1,1,0,0,1; 1,0,0,1,1,0,1,0,0,1; 1,1,0,0,1,0,0,1,1,0; 0,1,1,0,0,1,0,1,1,0; 0,0,1,1,0,1,1,0,0,1]; assert(isequal(tic_tac_logic_check(board),0))

tf = logical 0

17   Pass
board = [1,1,0,0,1,1,0,0; 0,0,1,1,0,1,0,1; 1,0,1,1,0,0,1,0; 0,1,0,0,1,0,1,1; 1,0,1,0,1,1,0,0; 0,1,0,0,1,0,1,1]; assert(isequal(tic_tac_logic_check(board),0))

tf = logical 0

18   Pass
board = [1,1,0,0,1,1,0,0; 0,0,1,1,0,1,0,1; 1,0,1,1,0,0,1,0; 0,1,0,0,1,0,1,1; 1,0,1,0,1,1,0,0; 0,1,0,1,0,0,1,1]; assert(isequal(tic_tac_logic_check(board),1))

tf = logical 1

19   Pass
board = [1,0,1,0,1,0; 0,1,1,0,1,0; 1,0,0,1,0,1; 1,0,0,1,1,0; 0,1,1,0,1,1; 0,1,0,1,0,1]; assert(isequal(tic_tac_logic_check(board),0))

tf = logical 0

20   Pass
board = [1,0,1,0,1,0,1,0; 1,1,0,0,1,0,1,0; 0,0,1,1,0,1,0,1; 1,1,0,1,0,0,1,0; 1,0,1,0,0,1,0,1; 0,1,0,1,0,1,1,0; 1,0,1,0,1,0,0,1; 0,1,0,1,0,1,0,1]; assert(isequal(tic_tac_logic_check(board),0))

tf = logical 0

Suggested Problems

More from this Author139

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!