Cody

# Problem 43969. Sleeping Queens 1

Solution 1091814

Submitted on 28 Dec 2016 by yurenchu
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 = [5 6 7 8 9];y_correct = 5; assert(isequal(Sleeping(x),y_correct))

y = 5 y = 5 y = 5 y = 5 y = 5 y = 5 y = 5 y = 5 y = 5 y = 5

2   Pass
x = [1 5 3 2 4];y_correct = 9; assert(isequal(Sleeping(x),y_correct))

y = 5 y = 5 y = 6 y = 6 y = 7 y = 7 y = 7 y = 9 y = 9 y = 9

3   Pass
x = [2 4 8 4 2];y_correct = 12; assert(isequal(Sleeping(x),y_correct))

y = 6 y = 6 y = 7 y = 8 y = 9 y = 9 y = 9 y = 10 y = 12 y = 12

4   Pass
x = [1 1 1 2 1];y_correct = 17; assert(isequal(Sleeping(x),y_correct))

y = 6 y = 8 y = 8 y = 11 y = 11 y = 11 y = 11 y = 17 y = 17 y = 17

5   Pass
x = [3 6 5 1 8];y_correct = 7; assert(isequal(Sleeping(x),y_correct))

y = 5 y = 5 y = 5 y = 5 y = 6 y = 6 y = 6 y = 7 y = 7 y = 7

6   Pass
assert(isequal(Sleeping([1 6 1 7 8]),11))

y = 6 y = 6 y = 6 y = 6 y = 8 y = 8 y = 8 y = 10 y = 11 y = 11

7   Pass
assert(isequal(Sleeping([2 3 3 1 5]),10))

y = 5 y = 5 y = 6 y = 7 y = 8 y = 8 y = 8 y = 10 y = 10 y = 10