Cody

# Problem 1885. Minimum Sum thru a Lower Triangle

Solution 491239

Submitted on 26 Aug 2014 by rifat
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
%% s=[5 7 6 3 2 5]; MinSum=Find_MinSum(s); exp=13; assert(exp==MinSum)

m = 5 0 0 7 6 0 3 2 5

2   Pass
%% s=[7 9 8 3 2 6 7 1 5 5 9 4 8 2 4 6 3 2 9 7 5 7 2 4 8 5 1 9 4 2 9 3 8 5 2 8 8 2 4 8 5 9 2 7 3]; MinSum=Find_MinSum(s); exp=30; assert(exp==MinSum)

m = 7 0 0 0 0 0 0 0 0 9 8 0 0 0 0 0 0 0 3 2 6 0 0 0 0 0 0 7 1 5 5 0 0 0 0 0 9 4 8 2 4 0 0 0 0 6 3 2 9 7 5 0 0 0 7 2 4 8 5 1 9 0 0 4 2 9 3 8 5 2 8 0 8 2 4 8 5 9 2 7 3

3   Pass
%% s=[21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]; MinSum=Find_MinSum(s); exp=76; assert(exp==MinSum)

m = 21 0 0 0 0 0 20 19 0 0 0 0 18 17 16 0 0 0 15 14 13 12 0 0 11 10 9 8 7 0 6 5 4 3 2 1

4   Pass
%% s=1:28; MinSum=Find_MinSum(s); exp=63; assert(exp==MinSum)

m = 1 0 0 0 0 0 0 2 3 0 0 0 0 0 4 5 6 0 0 0 0 7 8 9 10 0 0 0 11 12 13 14 15 0 0 16 17 18 19 20 21 0 22 23 24 25 26 27 28

5   Pass
%% s=[82 91 13 92 64 10 28 55 96 97 16 98 96 49 81 15 43 92 80 96 66 4 85 94 68 76 75 40 66 18 71 4 28 5 10 83 ]; MinSum=Find_MinSum(s); exp=213; assert(exp==MinSum)

m = 82 0 0 0 0 0 0 0 91 13 0 0 0 0 0 0 92 64 10 0 0 0 0 0 28 55 96 97 0 0 0 0 16 98 96 49 81 0 0 0 15 43 92 80 96 66 0 0 4 85 94 68 76 75 40 0 66 18 71 4 28 5 10 83

6   Pass
%% s=[348 159 476 18 220 191 383 398 94 245 223 324 355 378 139 340 328 82 60 250 480 171 293 112 376 128 253 350 446 480 274 70 75 129 421 128 ]; MinSum=Find_MinSum(s); exp=1409; assert(exp==MinSum)

m = 348 0 0 0 0 0 0 0 159 476 0 0 0 0 0 0 18 220 191 0 0 0 0 0 383 398 94 245 0 0 0 0 223 324 355 378 139 0 0 0 340 328 82 60 250 480 0 0 171 293 112 376 128 253 350 0 446 480 274 70 75 129 421 128