Cody

# Problem 927. Knots Contest: Minimum Knots (TestSuite)

Solution 160593

Submitted on 12 Nov 2012 by Richard Zapor
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

``` ```
``` ans = /users/msssystem1/Knots_sample.mat ans = /users/msssystem1/numKnots.m [Warning: Function /opt/mlsedu/mdcsserver/latest/m/web_common/shadow/license.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In verifyCode>evaluateCode at 189 In verifyCode at 40 In fevalJSON at 14] [Warning: Function /opt/mlsedu/mdcsserver/latest/m/web_common/shadow/graphicsAndGuis/uicontrol.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In verifyCode>evaluateCode at 189 In verifyCode at 40 In fevalJSON at 14] [Warning: Function /opt/mlsedu/mdcsserver/latest/m/common/shadow/home.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In verifyCode>evaluateCode at 189 In verifyCode at 40 In fevalJSON at 14] [Warning: Function /opt/mlsedu/mdcsserver/latest/m/common/shadow/keyboard.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In verifyCode>evaluateCode at 189 In verifyCode at 40 In fevalJSON at 14] [Warning: Function /opt/mlsedu/mdcsserver/latest/m/common/shadow/more.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In verifyCode>evaluateCode at 189 In verifyCode at 40 In fevalJSON at 14] [Warning: Function /opt/mlsedu/mdcsserver/latest/m/common/shadow/pause.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In verifyCode>evaluateCode at 189 In verifyCode at 40 In fevalJSON at 14] Elapsed time is 3.527331 seconds. ```
``` 1 KnotTime(msec) 539 Knots 1 2 KnotTime(msec) 129 Knots 0 3 KnotTime(msec) 200 Knots 1 4 KnotTime(msec) 1620 Knots 13 5 KnotTime(msec) 39 Knots 6 6 KnotTime(msec) 299 Knots 18 7 KnotTime(msec) 530 Knots 7 8 KnotTime(msec) 110 Knots 8 9 KnotTime(msec) 159 Knots 16 10 KnotTime(msec) 560 Knots 6 11 KnotTime(msec) 450 Knots 21 12 KnotTime(msec) 2529 Knots 62 13 KnotTime(msec) 40 Knots 0 14 KnotTime(msec) 1029 Knots 46 15 KnotTime(msec) 350 Knots 40 16 KnotTime(msec) 2740 Knots 102 17 KnotTime(msec) 710 Knots 25 18 KnotTime(msec) 470 Knots 35 19 KnotTime(msec) 670 Knots 2 20 KnotTime(msec) 129 Knots 6 21 KnotTime(msec) 150 Knots 8 22 KnotTime(msec) 2389 Knots 53 23 KnotTime(msec) 629 Knots 51 24 KnotTime(msec) 230 Knots 40 25 KnotTime(msec) 29 Knots 0 26 KnotTime(msec) 129 Knots 10 27 KnotTime(msec) 120 Knots 9 28 KnotTime(msec) 230 Knots 33 29 KnotTime(msec) 190 Knots 16 30 KnotTime(msec) 340 Knots 29 31 KnotTime(msec) 309 Knots 25 32 KnotTime(msec) 1790 Knots 93 33 KnotTime(msec) 1659 Knots 61 34 KnotTime(msec) 490 Knots 8 35 KnotTime(msec) 2560 Knots 75 36 KnotTime(msec) 59 Knots 6 37 KnotTime(msec) 490 Knots 68 38 KnotTime(msec) 240 Knots 12 39 KnotTime(msec) 50 Knots 10 40 KnotTime(msec) 1580 Knots 37 41 KnotTime(msec) 80 Knots 0 42 KnotTime(msec) 1060 Knots 8 43 KnotTime(msec) 280 Knots 17 44 KnotTime(msec) 1120 Knots 22 45 KnotTime(msec) 79 Knots 9 46 KnotTime(msec) 430 Knots 10 47 KnotTime(msec) 120 Knots 7 48 KnotTime(msec) 59 Knots 6 49 KnotTime(msec) 340 Knots 17 50 KnotTime(msec) 70 Knots 4 Sum KnotTime 30620 msec Knot Score 1159.00 Cody Maximum allowed Elapsed time is approximately 53 seconds Elapsed time is 36.343058 seconds. ```