Cody

# Problem 42889. Should Mr McNugget even get out of bed today?

Solution 1524391

Submitted on 9 May 2018 by J. S. Kowontan
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
nuggets = [2 5]; frob_correct = [1 3]; out_of_bed=reshape(sort(hungerGame2(nuggets)),1,[]); assert(isequal(out_of_bed,frob_correct))

ans = 1 3

2   Pass
nuggets = [6 9 20]; frob_correct = [1 2 3 4 5 7 8 10 11 13 14 16 17 19 22 23 25 28 31 34 37 43]; out_of_bed=reshape(sort(hungerGame2(nuggets)),1,[]); assert(isequal(out_of_bed,frob_correct))

ans = 1 2 3 4 5 7 8 10 11 13 14 16 17 19 22 23 25 28 31 34 37 43

3   Pass
nuggets = [17 19 32]; frob_correct = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 20 21 22 23 24 25 26 27 28 29 30 31 33 35 37 39 40 41 42 43 44 45 46 47 48 50 52 54 56 58 59 60 61 62 63 65 67 69 71 73 75 77 78 79 80 82 84 86 88 90 92 94 97 99 101 103 105 107 109 111 116 118 120 122 124 126 135 137 139 141 143 154 156 158 173 175]; out_of_bed=reshape(sort(hungerGame2(nuggets)),1,[]); assert(isequal(out_of_bed,frob_correct))

ans = Columns 1 through 30 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 20 21 22 23 24 25 26 27 28 29 30 31 33 Columns 31 through 60 35 37 39 40 41 42 43 44 45 46 47 48 50 52 54 56 58 59 60 61 62 63 65 67 69 71 73 75 77 78 Columns 61 through 90 79 80 82 84 86 88 90 92 94 97 99 101 103 105 107 109 111 116 118 120 122 124 126 135 137 139 141 143 154 156 Columns 91 through 93 158 173 175

4   Pass
nuggets = [13 14 15]; frob_correct = [1 2 3 4 5 6 7 8 9 10 11 12 16 17 18 19 20 21 22 23 24 25 31 32 33 34 35 36 37 38 46 47 48 49 50 51 61 62 63 64 76 77]; out_of_bed=reshape(sort(hungerGame2(nuggets)),1,[]); assert(isequal(out_of_bed,frob_correct))

ans = Columns 1 through 30 1 2 3 4 5 6 7 8 9 10 11 12 16 17 18 19 20 21 22 23 24 25 31 32 33 34 35 36 37 38 Columns 31 through 42 46 47 48 49 50 51 61 62 63 64 76 77

5   Pass
nuggets = [7 11 21]; frob_correct = [1 2 3 4 5 6 8 9 10 12 13 15 16 17 19 20 23 24 26 27 30 31 34 37 38 41 45 48 52 59]; out_of_bed=reshape(sort(hungerGame2(nuggets)),1,[]); assert(isequal(out_of_bed,frob_correct))

ans = 1 2 3 4 5 6 8 9 10 12 13 15 16 17 19 20 23 24 26 27 30 31 34 37 38 41 45 48 52 59