Cody

Solution 496380

Submitted on 5 Sep 2014 by goc3
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
%% m=[5 1 8;3 9 4;7 2 6]; K=kurchan_score(m) % 486 assert(K==486)

t = 105 18 192 40 108 84 28 48 270 18 40 504 ans = 486 K = 486

2   Pass
%% m=[1 24 65 80 68 41 54 36 39 49 51 28 14 67 57 77 2 45 37 23 40 42 6 10 81 55 69 74 58 3 30 16 43 32 44 70 29 63 79 60 53 35 27 15 4 52 8 31 62 72 73 5 50 25 33 20 22 46 7 71 56 78 18 61 21 38 9 48 13 19 76 66 64 75 59 12 47 11 17 34 26]; tic K=uint64(kurchan_score(m)) % 481200422400 toc assert(K==481200422400)

t = 1.0e+13 * Columns 1 through 9 2.6065 2.5923 2.6382 2.6080 2.6357 2.6068 2.6317 2.6339 2.6183 Columns 10 through 18 2.6380 2.5926 2.6369 2.6193 2.6024 2.6265 2.6100 2.6054 2.6404 Columns 19 through 27 2.6037 2.6101 2.6299 2.6205 2.6241 2.6158 2.6342 2.6127 2.6201 Columns 28 through 36 2.6167 2.5930 2.6370 2.6104 2.6090 2.6335 2.6157 2.6165 2.6396 ans = 4.8120e+11 K = 481200422400 Elapsed time is 0.001441 seconds.

3   Pass
%% v=[ 1 6 2 9 3 8 4 5 7]; % 366 m=reshape(v,3,[]); K=uint64(kurchan_score(m)) assert(K==366)

t = 12 216 140 36 90 112 90 192 21 378 40 24 ans = 366 K = 366

4   Pass
%% v=[ 8 2 3 7 5 1 9 4 6]; % 486 m=reshape(v,3,[]); K=uint64(kurchan_score(m)) assert(K==486)

t = 48 35 216 504 40 18 84 18 240 84 32 135 ans = 486 K = 486

5   Pass
%% v=[ 9 11 12 7 10 15 5 6 2 14 8 4 3 13 1 16]; m=reshape(v,4,[]); % 29590 K=uint64(kurchan_score(m)) assert(K==29590)

t = Columns 1 through 8 8316 4500 896 624 540 30030 480 2688 Columns 9 through 16 980 1872 660 17280 5760 440 5616 1470 ans = 29590 K = 29590

6   Pass
%% v=[ 1 16 15 6 12 3 2 8 7 9 14 13 10 11 4 5]; m=reshape(v,4,[]); % 11256 K=uint64(kurchan_score(m)) assert(K==11256)

t = Columns 1 through 8 1440 576 11466 2200 840 4752 1680 3120 Columns 9 through 16 2592 9240 4160 210 1575 9984 1232 1080 ans = 11256 K = 11256