Cody

# Problem 44652. Draw a 'X'!

Solution 1991274

Submitted on 26 Oct 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
n=3; y=[1 0 1 0 1 0 1 0 1]; assert(isequal(X(n),y))

m = 2 A = 0 0 0 0 0 0 0 0 0 A = 0 0 0 0 1 0 0 0 0 y = 1 0 1 0 1 0 1 0 1

2   Pass
n=4; y=[1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1]; assert(isequal(X(n),y))

m = 2 y = 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1

3   Fail
n=1; y= assert(isequal(X(n),y))

y = 1 m = 1

Output argument "y" (and maybe others) not assigned during call to "X". Error in Test3 (line 3) assert(isequal(X(n),y))

4   Fail
n=2; y=[1 1;1 1] assert(isequal(X(n),y))

y = 1 1 1 1 m = 1

Output argument "y" (and maybe others) not assigned during call to "X". Error in Test4 (line 3) assert(isequal(X(n),y))

5   Pass
n=5; y=[1 0 0 0 1 0 1 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 0 0 1]; assert(isequal(X(n),y))

m = 3 A = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 A = 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 y = 1 0 0 0 1 0 1 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 0 0 1