Cody

# Problem 45182. Takuzu row

Solution 1990856

Submitted on 25 Oct 2019 by Atsushi Ueno
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 0]; tf_correct = 1; assert(isequal(takuzu_row(x),tf_correct))

dd = logical 0 dd2 = 0 0

2   Pass
x = [1 0 0]; tf_correct = 0; assert(isequal(takuzu_row(x),tf_correct))

dd = 1×2 logical array 0 1 dd2 = 0 1 1

3   Pass
x = [1 1 0 0]; tf_correct = 1; assert(isequal(takuzu_row(x),tf_correct))

dd = 1×3 logical array 1 0 1 dd2 = 1 1 1 1

4   Pass
x = [1 0 1 0 1 0 1 1 0 0]; tf_correct = 1; assert(isequal(takuzu_row(x),tf_correct))

dd = 1×9 logical array 0 0 0 0 0 0 1 0 1 dd2 = 0 0 0 0 0 0 1 1 1 1

5   Pass
x = [1 1 0 0 1 1 1 0 0 0]; tf_correct = 0; assert(isequal(takuzu_row(x),tf_correct))

dd = 1×9 logical array 1 0 1 0 1 1 0 1 1 dd2 = 1 1 1 1 1 2 1 1 2 1

6   Pass
x = [1 1 0 0 1 1 0 0 1 0 1 1]; tf_correct = 0; assert(isequal(takuzu_row(x),tf_correct))

dd = 1×11 logical array 1 0 1 0 1 0 1 0 0 0 1 dd2 = 1 1 1 1 1 1 1 1 0 0 1 1

7   Pass
x = [1 1 0 1 1 0 1 1 0 1 0 0 1 0 0 1 0 0]; tf_correct = 1; assert(isequal(takuzu_row(x),tf_correct))

dd = 1×17 logical array 1 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 1 dd2 = 1 1 0 1 1 0 1 1 0 0 1 1 0 1 1 0 1 1