Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
board = [-1,-1,-1,-1,-1,-1,-1,-1,0,-1; -1,8,8,-1,2,-1,0,-1,-1,-1; 5,-1,8,-1,-1,-1,-1,-1,-1,-1; -1,-1,-1,-1,-1,2,-1,-1,-1,2; 1,-1,-1,-1,4,5,6,-1,-1,-1; -1,0,-1,-1,-1,7,9,-1,-1,6; -1,-1,-1,6,-1,-1,9,-1,-1,6; -1,-1,6,6,8,7,8,7,-1,5; -1,4,-1,6,6,6,-1,6,-1,4; -1,-1,-1,-1,-1,-1,3,-1,-1,-1];
board(board==-1) = NaN;
solution = [0,1,1,0,0,0,0,0,0,0; 1,1,1,1,0,0,0,0,0,0; 1,1,1,1,0,0,0,0,0,0; 0,1,1,0,0,0,0,0,0,0; 0,0,0,0,0,1,1,1,1,1; 0,0,0,1,1,1,1,1,1,1; 0,0,0,1,0,1,1,1,1,1; 0,1,1,1,1,1,1,1,1,1; 0,1,0,1,1,1,0,1,0,1; 0,0,1,0,0,0,1,0,1,0];
tf_corr = 1;
assert(isequal(fill_a_pix_solution_check(board,solution),tf_corr))
|
2 | Pass |
board = [-1,2,3,-1,-1,0,-1,-1,-1,-1; -1,-1,-1,-1,3,-1,2,-1,-1,6; -1,-1,5,-1,5,3,-1,5,7,4; -1,4,-1,5,-1,5,-1,6,-1,3; -1,-1,4,-1,5,-1,6,-1,-1,3; -1,-1,-1,2,-1,5,-1,-1,-1,-1; 4,-1,1,-1,-1,-1,1,1,-1,-1; 4,-1,1,-1,-1,-1,1,-1,4,-1; -1,-1,-1,-1,6,-1,-1,-1,-1,4; -1,4,4,-1,-1,-1,-1,4,-1,-1];
board(board==-1) = NaN;
solution = [0,1,1,0,0,0,0,0,1,1; 0,0,0,1,0,0,0,1,1,1; 0,0,1,1,1,0,0,1,1,1; 0,1,1,0,1,1,0,1,0,0; 0,1,0,0,0,1,1,1,1,0; 1,1,0,0,1,1,0,0,1,1; 1,0,0,0,1,0,0,0,0,1; 1,0,0,0,1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0,0,0,1,0,1,0,0,0,0; 1,1,0,0,1,0,0,0,0,1,0,1,1,0,0; 0,1,1,1,0,1,0,0,0,1,1,0,1,1,0; 0,1,1,0,0,1,1,0,0,0,1,1,0,1,0; 0,0,1,1,1,0,1,0,0,0,1,1,0,0,1];
tf_corr = 1;
assert(isequal(fill_a_pix_solution_check(board,solution),tf_corr))
|
4 | Fail |
board = [-1,-1,3,3,-1,-1,-1,-1,-1,-1; 3,-1,-1,-1,-1,-1,0,-1,0,-1; -1,-1,3,4,-1,3,-1,-1,-1,-1; 3,-1,4,-1,-1,-1,-1,3,-1,-1; 2,3,-1,5,-1,4,4,-1,-1,4; -1,-1,5,4,6,6,-1,4,-1,4; -1,-1,-1,-1,-1,3,3,-1,-1,4; -1,3,-1,-1,5,6,5,-1,-1,4; -1,-1,-1,7,-1,-1,-1,7,-1,5; -1,4,-1,-1,6,-1,6,-1,5,-1];
board(board==-1) = NaN;
solution = [0,0,1,1,0,0,0,0,0,0; 0,1,0,0,1,0,0,0,0,0; 1,1,0,0,1,0,0,0,0,0; 0,0,1,0,1,0,0,1,0,1; 0,1,0,1,1,1,1,0,1,1; 0,1,0,1,0,1,0,1,0,1; 0,1,0,0,1,1,1,0,0,1; 0,0,1,0,0,0,0,0,1,1; 0,0,1,1,1,1,1,1,1,0; 1,1,1,1,1,1,1,1,1,1];
tf_corr = 0;
assert(isequal(fill_a_pix_solution_check(board,solution),tf_corr))
|
5 | Fail |
board = [-1,-1,-1,4,-1,-1,4,-1,6,-1,5,4,-1,-1,1; -1,4,-1,-1,-1,-1,-1,-1,-1,7,-1,-1,-1,-1,-1; -1,-1,4,-1,-1,0,1,-1,4,-1,5,-1,6,-1,-1; 4,-1,-1,0,-1,0,-1,3,-1,-1,4,-1,5,-1,4; -1,-1,1,-1,-1,2,-1,3,5,4,-1,4,5,-1,-1; -1,2,-1,-1,3,-1,5,-1,-1,5,5,5,-1,-1,-1; -1,-1,1,2,-1,5,-1,3,4,-1,-1,-1,-1,-1,5;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,-1,-1; -1,-1,-1,-1,-1,2,-1,-1,-1,2; 1,-1,-1,-1,4,5,6,-1,-1,-1; -1,0,-1,-1,-1,7,9,-1,-1,6; -1,-1,-1,6,-1,-1,9,-1,-1,6; -1,-1,6,6,8,7,8,7,-1,5; -1,4,-1,6,6,6,-1,6,-1,4; -1,-1,-1,-1,-1,-1,3,-1,-1,-1];
board(board==-1) = NaN;
solution = [0,1,1,0,0,0,0,0,0,0; 1,1,1,1,0,0,0,0,0,0; 1,1,1,1,0,0,0,0,0,0; 0,1,1,0,0,0,0,0,0,0; 0,0,0,0,0,1,1,1,1,1; 0,0,0,1,1,1,1,1,1,1; 0,0,0,1,0,1,1,1,1,1; 0,1,1,1,1,1,1,1,1,1; 0,1,0,0,1,1,0,1,0,1; 0,0,1,0,0,0,1,0,1,0];
tf_corr = 0;
assert(isequal(fill_a_pix_solution_check(board,solution),tf_corr))
|
8 | Fail |
board = [-1,2,3,-1,-1,0,-1,-1,-1,-1; -1,-1,-1,-1,3,-1,2,-1,-1,6; -1,-1,5,-1,5,3,-1,5,7,4; -1,4,-1,5,-1,5,-1,6,-1,3; -1,-1,4,-1,5,-1,6,-1,-1,3; -1,-1,-1,2,-1,5,-1,-1,-1,-1; 4,-1,1,-1,-1,-1,1,1,-1,-1; 4,-1,1,-1,-1,-1,1,-1,4,-1; -1,-1,-1,-1,6,-1,-1,-1,-1,4; -1,4,4,-1,-1,-1,-1,4,-1,-1];
board(board==-1) = NaN;
solution = [0,1,1,0,0,0,0,0,1,1; 0,0,0,1,0,0,0,1,1,1; 0,0,1,1,1,0,0,1,1,1; 0,1,1,0,1,1,0,1,0,0; 0,1,0,1,0,1,1,1,1,0; 1,1,0,0,1,1,0,0,1,1; 1,0,0,0,1,0,0,0,0,1; 1,0,0,0,1,0,0,0,0,1; 1,1,0,0,1,1,0,0,1,1; 0,1,1,1,1,1,1,1,1,0];
tf_corr = 0;
assert(isequal(fill_a_pix_solution_check(board,solution),tf_corr))
|
9 | Pass |
board = [-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2,-1,8,-1,8,-1,-1,-1,6,5,-1,-1,-1,5; -1,1,-1,5,-1,5,-1,3,-1,-1,5,-1,3,-1,4; -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2,3,-1,-1];
board(board==-1) = NaN;
solution = [0,0,0,1,1,1,1,1,1,1,1,1,0,0,0; 0,1,1,1,0,0,0,1,1,1,1,0,1,1,0; 1,1,0,0,0,0,0,0,0,0,1,1,0,1,1; 1,0,0,0,0,0,0,0,1,0,0,1,1,0,1; 1,0,0,0,0,0,0,1,1,1,0,0,1,0,1; 0,1,0,0,1,1,0,0,0,1,0,0,1,1,1; 0,0,0,0,0,1,1,1,0,1,1,1,1,0,1; 0,0,0,0,1,0,0,1,0,0,1,1,0,1,1; 0,0,0,0,0,0,0,1,1,1,1,0,1,1,0; 0,0,0,0,1,1,1,0,1,0,0,1,1,0,0; 0,0,0,1,0,1,1,1,1,1,1,1,1,1,0; 0,0,1,1,1,1,1,1,1,1,1,0,1,1,1; 0,0,1,1,1,0,1,1,0,0,1,0,0,0,1; 0,0,0,1,1,1,1,0,0,1,1,0,0,1,1; 0,0,0,0,0,0,0,0,0,1,0,1,0,1,0];
tf_corr = 1;
assert(isequal(fill_a_pix_solution_check(board,solution),tf_corr))
|
88 Solvers
Sum all integers from 1 to 2^n
8411 Solvers
Convert a vector into a number
503 Solvers
450 Solvers
Let's get back to school, and create multiplication tables
147 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!