Cody

Problem 44658. Kurosu solver

Solution 2599693

Submitted on 23 Jun 2020
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   Fail
filetext = fileread('kurosusolver.m'); assert(isempty(strfind(filetext,'eval'))) assert(isempty(strfind(filetext,'echo'))) assert(isempty(strfind(filetext,'switch')))

Error using fileread (line 23) Could not open file kurosusolver.m. No such file or directory. Error in Test1 (line 1) filetext = fileread('kurosusolver.m');

2   Fail
b0 = zeros(6); b1 = kurosusolver(b0); assert(isempty(b1))

Undefined function 'kurosusolver' for input arguments of type 'double'. Error in Test2 (line 2) b1 = kurosusolver(b0);

3   Fail
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 = kurosusolver(b0); assert(~isempty(b1) && all(ismember(bin2dec(char(48+[b1;b1'])),str2num('11,13,19,21,22,25,26,37,38,41,42,44,50,52'))))

Undefined function 'kurosusolver' for input arguments of type 'double'. Error in Test3 (line 7) b1 = kurosusolver(b0);

4   Fail
b0 = [ 1 -1 -1 1 1 -1 -1 -1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 1 -1 -1 -1 -1 1 1 -1 -1 -1 1 -1 -1 0 -1 -1 -1 -1]; b1 = kurosusolver(b0); assert(~isempty(b1) && all(ismember(bin2dec(char(48+[b1;b1'])),str2num('11,13,19,21,22,25,26,37,38,41,42,44,50,52'))))

Undefined function 'kurosusolver' for input arguments of type 'double'. Error in Test4 (line 7) b1 = kurosusolver(b0);

5   Fail
b0 = [-1 -1 0 -1 0 0 -1 -1 -1 1 -1 1 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 0 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1]; b1 = kurosusolver(b0); assert(~isempty(b1) && all(ismember(bin2dec(char(48+[b1;b1'])),str2num('11,13,19,21,22,25,26,37,38,41,42,44,50,52'))))

Undefined function 'kurosusolver' for input arguments of type 'double'. Error in Test5 (line 7) b1 = kurosusolver(b0);

6   Fail
b0 = [1 0 0 1 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 1 1 0 0 1 1 0 1 0 1 0 0 1 0 1 0 1]; b1 = kurosusolver(b0); assert(~isempty(b1) && all(ismember(bin2dec(char(48+[b1;b1'])),str2num('11,13,19,21,22,25,26,37,38,41,42,44,50,52'))))

Undefined function 'kurosusolver' for input arguments of type 'double'. Error in Test6 (line 7) b1 = kurosusolver(b0);

7   Fail
b0 = [1 0 0 1 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 1 1 0 0 1 0 0 1 1 1 0 1 1 0 0 0 1]; b1 = kurosusolver(b0); assert(isempty(b1))

Undefined function 'kurosusolver' for input arguments of type 'double'. Error in Test7 (line 7) b1 = kurosusolver(b0);

8   Fail
b0 = [0 1 0 1 1 0 1 0 1 0 0 1 1 1 0 1 0 0 0 0 1 1 0 1 1 0 1 0 1 0 0 1 0 0 1 1]; b1 = kurosusolver(b0); assert(isempty(b1))

Undefined function 'kurosusolver' for input arguments of type 'double'. Error in Test8 (line 7) b1 = kurosusolver(b0);

9   Fail
b0 = [1 0 0 1 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 -1 1 0 0 1 1 0 1 0 1 0 0 1 0 1 0 1]; b1 = kurosusolver(b0); b2 = zeros(6); b2(4,2) = 2; assert(isequal(b1,b0+b2))

Undefined function 'kurosusolver' for input arguments of type 'double'. Error in Test9 (line 7) b1 = kurosusolver(b0);

Suggested Problems

More from this Author34

Community Treasure Hunt

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

Start Hunting!