Cody

Solution 1012915

Submitted on 12 Oct 2016
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 = [ 1 1 0 1 0 0 1 1 1 1 1 1 0 0 1 0 0 0 1 1 0 1 0 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 0 1 0 0 1 0 1]; warden_key = [8 8]; flip_correct = [5 5]; assert(isequal(flip_survive(board,warden_key),flip_correct))

2   Fail
board = [ 1 1 1 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 0 0 1 1 0 1 1 1 1]; warden_key = [4 8]; flip_correct = [6 7]; assert(isequal(flip_survive(board,warden_key),flip_correct))

Assertion failed.

3   Fail
board = [ 1 1 1 0 1 0 0 0 1 1 0 0 0 1 1 1 1 1 0 1 1 0 0 1 0 1 0 1 1 0 0 0 1 0 0 0 0 1 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0 1 0 1 0 0 1 0 1]; warden_key = [8 7]; flip_correct = [2 7]; assert(isequal(flip_survive(board,warden_key),flip_correct))

Assertion failed.

4   Fail
board = [ 0 0 0 1 1 1 1 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 1 1 1 1 0 0 0 1 0 1 0 1 1 1 0 1 0 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1 0 1 1 0 1 0 0 1 0 0]; warden_key = [6 6]; flip_correct = [4 2]; assert(isequal(flip_survive(board,warden_key),flip_correct))

Assertion failed.

5   Fail
board = [ 0 0 1 1 1 1 0 1 0 0 1 1 1 0 1 0 0 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 0 0 1 1 0 1 1 0 1 0 0 1 0 0 1 0 0 1 1 1 0 0 1 1 1 0 1 0]; warden_key = [5 1]; flip_correct = [5 3]; assert(isequal(flip_survive(board,warden_key),flip_correct))

Assertion failed.