Cody

# Problem 44657. Kurosu checker

Solution 1728636

Submitted on 16 Feb 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
filetext = fileread('kurosuchecker.m'); assert(isempty(strfind(filetext,'eval'))) assert(isempty(strfind(filetext,'echo'))) assert(isempty(strfind(filetext,'switch')))

2   Fail
b = zeros(6); assert(isequal(kurosuchecker(b),false))

Undefined function or variable 'x'. Error in kurosuchecker (line 3) tf = f(x)&f(x'); Error in Test2 (line 2) assert(isequal(kurosuchecker(b),false))

3   Fail
b = [1 0 1 0 0 1 1 1 0 1 0 0 0 0 1 0 1 1 0 1 0 1 1 0 1 1 0 1 0 0 0 0 1 0 1 1]; assert(isequal(kurosuchecker(b),true))

Undefined function or variable 'x'. Error in kurosuchecker (line 3) tf = f(x)&f(x'); Error in Test3 (line 7) assert(isequal(kurosuchecker(b),true))

4   Fail
b = [1 0 1 0 1 0 0 1 0 1 0 1 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 0]; assert(isequal(kurosuchecker(b),true))

Undefined function or variable 'x'. Error in kurosuchecker (line 3) tf = f(x)&f(x'); Error in Test4 (line 7) assert(isequal(kurosuchecker(b),true))

5   Fail
b = [1 0 1 0 0 1 1 0 1 1 0 0 0 1 0 0 1 1 0 1 0 1 1 0 1 1 0 1 0 0 0 0 1 0 1 1]; assert(isequal(kurosuchecker(b),false))

Undefined function or variable 'x'. Error in kurosuchecker (line 3) tf = f(x)&f(x'); Error in Test5 (line 7) assert(isequal(kurosuchecker(b),false))

6   Fail
b = [1 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0 1 1 0 1 0 1 0 0 1 1 0 1 0 0 0 0 1 0 1 1]; assert(isequal(kurosuchecker(b),false))

Undefined function or variable 'x'. Error in kurosuchecker (line 3) tf = f(x)&f(x'); Error in Test6 (line 7) assert(isequal(kurosuchecker(b),false))

7   Fail
b = [1 0 0 1 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 0 0 0 0 1 0 1 1]; assert(isequal(kurosuchecker(b),false))

Undefined function or variable 'x'. Error in kurosuchecker (line 3) tf = f(x)&f(x'); Error in Test7 (line 7) assert(isequal(kurosuchecker(b),false))

8   Fail
b = [1 0 1 0 1 0 0 1 0 1 0 1 1 0 0 0 1 1 0 1 1 0 1 0 1 1 0 1 0 0 0 0 1 1 0 1]; assert(isequal(kurosuchecker(b),false))

Undefined function or variable 'x'. Error in kurosuchecker (line 3) tf = f(x)&f(x'); Error in Test8 (line 7) assert(isequal(kurosuchecker(b),false))

9   Fail
b = [1 0 1 0 0 1 1 1 0 0 1 0 0 0 1 1 0 1 0 1 0 1 1 0 1 1 0 1 0 0 0 0 1 0 1 1]; assert(isequal(kurosuchecker(b),false))

Undefined function or variable 'x'. Error in kurosuchecker (line 3) tf = f(x)&f(x'); Error in Test9 (line 7) assert(isequal(kurosuchecker(b),false))

10   Fail
b = [1 0 1 0 0 1 0 1 1 0 0 1 0 0 0 0 1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0]; assert(isequal(kurosuchecker(b),false))

Undefined function or variable 'x'. Error in kurosuchecker (line 3) tf = f(x)&f(x'); Error in Test10 (line 8) assert(isequal(kurosuchecker(b),false))

11   Fail
b = [1 0 1 0 0 1 0 1 1 0 0 1 0 1 0 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 1 0 0 1 0 0 1 0 1 1 0 0 0 0 1 0 1 0 1]; assert(isequal(kurosuchecker(b),false))

Undefined function or variable 'x'. Error in kurosuchecker (line 3) tf = f(x)&f(x'); Error in Test11 (line 8) assert(isequal(kurosuchecker(b),false))