Cody

Solution 2212570

Submitted on 15 Apr 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   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))

Index exceeds the number of array elements (6). Error in kurosuchecker (line 35) s2=s2+1; b=b(s2); 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))

Index exceeds the number of array elements (6). Error in kurosuchecker (line 35) s2=s2+1; b=b(s2); 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))

Index exceeds the number of array elements (6). Error in kurosuchecker (line 35) s2=s2+1; b=b(s2); 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))

Index exceeds the number of array elements (6). Error in kurosuchecker (line 35) s2=s2+1; b=b(s2); 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))

Index exceeds the number of array elements (6). Error in kurosuchecker (line 35) s2=s2+1; b=b(s2); 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))

Index exceeds the number of array elements (6). Error in kurosuchecker (line 35) s2=s2+1; b=b(s2); 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))

Index exceeds the number of array elements (6). Error in kurosuchecker (line 35) s2=s2+1; b=b(s2); 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))

Index exceeds the number of array elements (6). Error in kurosuchecker (line 35) s2=s2+1; b=b(s2); 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))

Index exceeds the number of array elements (6). Error in kurosuchecker (line 35) s2=s2+1; b=b(s2); 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))

Index exceeds the number of array elements (6). Error in kurosuchecker (line 35) s2=s2+1; b=b(s2); Error in Test11 (line 8) assert(isequal(kurosuchecker(b),false))