Cody

Solution 2513921

Submitted on 10 Jun 2020 by ivan lyss
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
x = 1; y_correct = [1 1]; assert(isequal(your_fcn_name(x),y_correct))

c = 1 2 i = 1 j = 2 c = 1 2 c = 1 1 B = 1 1

2   Pass
x = [0 -1 1 0 0 0 1 2]; y_correct = [0 0 -1 -1 1 1 0 0 0 0 0 0 1 1 2 2]; assert(isequal(your_fcn_name(x),y_correct))

c = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 i = 1 3 5 7 9 11 13 15 j = 2 4 6 8 10 12 14 16 c = 0 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 c = 0 2 -1 4 5 6 7 8 9 10 11 12 13 14 15 16 c = 0 2 -1 4 1 6 7 8 9 10 11 12 13 14 15 16 c = 0 2 -1 4 1 6 0 8 9 10 11 12 13 14 15 16 c = 0 2 -1 4 1 6 0 8 0 10 11 12 13 14 15 16 c = 0 2 -1 4 1 6 0 8 0 10 0 12 13 14 15 16 c = 0 2 -1 4 1 6 0 8 0 10 0 12 1 14 15 16 c = 0 2 -1 4 1 6 0 8 0 10 0 12 1 14 2 16 c = 0 0 -1 4 1 6 0 8 0 10 0 12 1 14 2 16 c = 0 0 -1 -1 1 6 0 8 0 10 0 12 1 14 2 16 c = 0 0 -1 -1 1 1 0 8 0 10 0 12 1 14 2 16 c = 0 0 -1 -1 1 1 0 0 0 10 0 12 1 14 2 16 c = 0 0 -1 -1 1 1 0 0 0 0 0 12 1 14 2 16 c = 0 0 -1 -1 1 1 0 0 0 0 0 0 1 14 2 16 c = 0 0 -1 -1 1 1 0 0 0 0 0 0 1 1 2 16 c = 0 0 -1 -1 1 1 0 0 0 0 0 0 1 1 2 2 B = 0 0 -1 -1 1 1 0 0 0 0 0 0 1 1 2 2