Cody

# Problem 44657. Kurosu checker

Solution 1585436

Submitted on 17 Jul 2018
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   Pass
b = zeros(6); assert(isequal(kurosuchecker(b),false))

b = 0 0 0 0 0 0 2 0 0 0 0 0 0 2 0 0 0 0 0 0 2 0 0 0 0 0 0 2 0 0 0 0 0 0 2 0 0 0 0 0 0 2 2 2 2 2 2 2 2

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))

b = 1 0 1 0 0 1 2 1 1 0 1 0 0 2 0 0 1 0 1 1 2 0 1 0 1 1 0 2 1 1 0 1 0 0 2 0 0 1 0 1 1 2 2 2 2 2 2 2 2

Assertion failed.

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))

b = 1 0 1 0 1 0 2 0 1 0 1 0 1 2 1 0 1 0 1 0 2 0 1 0 1 0 1 2 0 1 0 1 0 1 2 1 0 1 0 1 0 2 2 2 2 2 2 2 2

Assertion failed.

5   Pass
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))

b = 1 0 1 0 0 1 2 1 0 1 1 0 0 2 0 1 0 0 1 1 2 0 1 0 1 1 0 2 1 1 0 1 0 0 2 0 0 1 0 1 1 2 2 2 2 2 2 2 2

6   Pass
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))

b = 1 0 1 0 1 1 2 1 1 0 1 0 0 2 0 0 1 0 1 1 2 0 1 0 1 0 0 2 1 1 0 1 0 0 2 0 0 1 0 1 1 2 2 2 2 2 2 2 2

7   Pass
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))

b = 1 0 0 1 0 1 2 0 1 0 1 1 0 2 0 1 1 0 0 1 2 1 0 0 1 1 0 2 1 1 1 0 0 0 2 0 0 1 0 1 1 2 2 2 2 2 2 2 2

8   Pass
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))

b = 1 0 1 0 1 0 2 0 1 0 1 0 1 2 1 0 0 0 1 1 2 0 1 1 0 1 0 2 1 1 0 1 0 0 2 0 0 1 1 0 1 2 2 2 2 2 2 2 2

9   Pass
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))

b = 1 0 1 0 0 1 2 1 1 0 0 1 0 2 0 0 1 1 0 1 2 0 1 0 1 1 0 2 1 1 0 1 0 0 2 0 0 1 0 1 1 2 2 2 2 2 2 2 2

10   Pass
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))

b = 1 0 1 0 0 1 0 2 1 1 0 0 1 0 0 2 0 0 1 1 0 1 0 2 0 1 0 1 1 0 0 2 1 0 1 0 0 1 0 2 0 1 0 1 1 0 0 2 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2 2

11   Pass
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))

b = 1 0 1 0 0 1 0 2 1 1 0 0 1 0 1 2 0 0 1 1 0 1 0 2 0 1 0 1 1 0 1 2 1 0 1 0 0 1 0 2 0 1 0 1 1 0 0 2 0 0 1 0 1 0 1 2 2 2 2 2 2 2 2 2

### Community Treasure Hunt

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

Start Hunting!