Cody

# Problem 2174. Minimal cost

Solution 1702804

Submitted on 5 Jan 2019 by HH
• Size: 9
• This is the leading solution.
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
W=200 L=400 CL=3 CW=6 y_correct = 2239; assert(isequal(floor(minimumdist(W,L,CW,CL)),y_correct))

W = 200 L = 400 CL = 3 CW = 6 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In minimumdist (line 2) In ScoringEngineTestPoint1 (line 6) In solutionTest (line 3)]

2   Pass
W=100 L=200 CL=2 CW=3 y_correct = 623; assert(isequal(floor(minimumdist(W,L,CW,CL)),y_correct))

W = 100 L = 200 CL = 2 CW = 3 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In minimumdist (line 2) In ScoringEngineTestPoint2 (line 6) In solutionTest (line 5)]

3   Pass
W=48 L=36 CL=3 CW=5 y_correct = 300; assert(isequal(floor(minimumdist(W,L,CW,CL)),y_correct))

W = 48 L = 36 CL = 3 CW = 5 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In minimumdist (line 2) In ScoringEngineTestPoint3 (line 6) In solutionTest (line 7)]