Cody

Problem 44376. The sliding puzzle: 3D

Solution 1294719

Submitted on 18 Oct 2017 by @bmtran (Bryant Tran)
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
p = [0;2;3;1;5;6;4;7;9;10;11;12;13;17;14;16;8;18;19;20;21;22;23;15;25;26;24]; m = sliding3d(p); for i = 1:numel(m) if round(m(i)) == m(i) && m(i) <= numel(p) && m(i) > 0 zero=find(p == 0); [a0 b0 c0] = ind2sub([3 3 3],zero); [a1 b1 c1] = ind2sub([3 3 3],m(i)); if abs(a1 - a0) + abs(b1 - b0) + abs(c1 - c0) == 1 p([m(i) zero]) = p([zero m(i)]); end end end assert(isequal(p,[1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;0]))

current(:,:,1) = 0 1 4 2 5 7 3 6 9 current(:,:,2) = 10 13 16 11 17 8 12 14 18 current(:,:,3) = 19 22 25 20 23 26 21 15 24 dist = 1.3843 current(:,:,1) = 1 0 4 2 5 7 3 6 9 current(:,:,2) = 10 13 16 11 17 8 12 14 18 current(:,:,3) = 19 22 25 20 23 26 21 15 24 dist = 0.8843 current(:,:,1) = 1 4 0 2 5 7 3 6 9 current(:,:,2) = 10 13 16 11 17 8 12 14 18 current(:,:,3) = 19 22 25 20 23 26 21 15 24 dist = 0.5509 current(:,:,1) = 1 4 7 2 5 0 3 6 9 current(:,:,2) = 10 13 16 11 17 8 12 14 18 current(:,:,3) = 19 22 25 20 23 26 21 15 24 dist = 0.3843 current(:,:,1) = 1 4 7 2 5 8 3 6 9 current(:,:,2) = 10 13 16 11 17 0 12 14 18 current(:,:,3) = 19 22 25 20 23 26 21 15 24 dist = 0.3009 current(:,:,1) = 1 4 7 2 5 8 3 6 9 current(:,:,2) = 10 13 16 11 0 17 12 14 18 current(:,:,3) = 19 22 25 20 23 26 21 15 24 dist = 0.1759 current(:,:,1) = 1 4 7 2 5 8 3 6 9 current(:,:,2) = 10 13 16 11 14 17 12 0 18 current(:,:,3) = 19 22 25 20 23 26 21 15 24 dist = 0.0926 current(:,:,1) = 1 4 7 2 5 8 3 6 9 current(:,:,2) = 10 13 16 11 14 17 12 15 18 current(:,:,3) = 19 22 25 20 23 26 21 0 24 dist = 0.0370 current(:,:,1) = 1 4 7 2 5 8 3 6 9 current(:,:,2) = 10 13 16 11 14 17 12 15 18 current(:,:,3) = 19 22 25 20 23 26 21 24 0 dist = 0

2   Pass
p = [1;0;2;4;8;5;7;9;18;10;21;12;11;14;15;16;17;6;13;3;19;20;22;24;25;23;26]; m = sliding3d(p); for i = 1:numel(m) if round(m(i)) == m(i) && m(i) <= numel(p) && m(i) > 0 zero=find(p == 0); [a0 b0 c0] = ind2sub([3 3 3],zero); [a1 b1 c1] = ind2sub([3 3 3],m(i)); if abs(a1 - a0) + abs(b1 - b0) + abs(c1 - c0) == 1 p([m(i) zero]) = p([zero m(i)]); end end end assert(isequal(p,[1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;0]))

current(:,:,1) = 1 4 7 0 8 9 2 5 18 current(:,:,2) = 10 11 16 21 14 17 12 15 6 current(:,:,3) = 13 20 25 3 22 23 19 24 26 dist = 4.0370 current(:,:,1) = 1 4 7 2 8 9 0 5 18 current(:,:,2) = 10 11 16 21 14 17 12 15 6 current(:,:,3) = 13 20 25 3 22 23 19 24 26 dist = 3.7037 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 11 16 21 14 17 0 15 6 current(:,:,3) = 13 20 25 3 22 23 19 24 26 dist = 4.0370 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 11 16 0 14 17 21 15 6 current(:,:,3) = 13 20 25 3 22 23 19 24 26 dist = 3.7037 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 11 16 3 14 17 21 15 6 current(:,:,3) = 13 20 25 0 22 23 19 24 26 dist = 3.7037 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 11 16 3 14 17 21 15 6 current(:,:,3) = 0 20 25 13 22 23 19 24 26 dist = 3.5370 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 11 16 3 14 17 21 15 6 current(:,:,3) = 20 0 25 13 22 23 19 24 26 dist = 3.5370 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 11 16 3 14 17 21 15 6 current(:,:,3) = 20 22 25 13 0 23 19 24 26 dist = 3.4537 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 11 16 3 14 17 21 15 6 current(:,:,3) = 20 22 25 0 13 23 19 24 26 dist = 3.1204 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 11 16 3 14 17 21 15 6 current(:,:,3) = 0 22 25 20 13 23 19 24 26 dist = 2.7870 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 11 16 3 14 17 21 15 6 current(:,:,3) = 20 22 25 19 13 23 0 24 26 dist = 3.0648 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 11 16 3 14 17 0 15 6 current(:,:,3) = 20 22 25 19 13 23 21 24 26 dist = 2.8981 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 11 16 0 14 17 3 15 6 current(:,:,3) = 20 22 25 19 13 23 21 24 26 dist = 2.5648 current(:,:,1) = 1 4 7 2 8 9 0 5 18 current(:,:,2) = 10 11 16 3 14 17 12 15 6 current(:,:,3) = 20 22 25 19 13 23 21 24 26 dist = 2.5648 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 0 11 16 10 14 17 3 15 6 current(:,:,3) = 20 22 25 19 13 23 21 24 26 dist = 2.8148 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 11 16 14 0 17 3 15 6 current(:,:,3) = 20 22 25 19 13 23 21 24 26 dist = 2.8148 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 0 16 14 11 17 3 15 6 current(:,:,3) = 20 22 25 19 13 23 21 24 26 dist = 2.4398 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 0 10 16 14 11 17 3 15 6 current(:,:,3) = 20 22 25 19 13 23 21 24 26 dist = 2.6898 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 16 0 14 11 17 3 15 6 current(:,:,3) = 20 22 25 19 13 23 21 24 26 dist = 2.6898 current(:,:,1) = 1 0 7 2 8 9 12 5 18 current(:,:,2) = 10 4 16 14 11 17 3 15 6 current(:,:,3) = 20 22 25 19 13 23 21 24 26 dist = 2.6898 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 22 16 14 11 17 3 15 6 current(:,:,3) = 20 0 25 19 13 23 21 24 26 dist = 2.6898 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 22 16 14 11 17 3 15 6 current(:,:,3) = 20 13 25 19 0 23 21 24 26 dist = 2.6898 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 22 16 14 11 17 3 15 6 current(:,:,3) = 20 13 25 19 23 0 21 24 26 dist = 2.6343 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 22 16 14 11 17 3 15 6 current(:,:,3) = 20 13 25 19 23 26 21 24 0 dist = 2.5972 current(:,:,1) = 1 4 7 2 8 9 12 5 18 current(:,:,2) = 10 22 16 14 11 17 3 15 0 current(:,:,3) = 20 13 25 19 23 26 21 24 6 dist = 2.5972 current(:,:,1) = 1 4 7 2 8 9 12 5 0 current(:,:,2) = 10 22 16 14 11 17 3 15 18 current(:,:,3) = 20 13 25 19 23 26 21 24 6 dist = 2.4861 current(:,:,1) = 1 4 7 2 8 0 12 5 9 current(:,:,2) = 10 22 16 14 11 17 3 15 18 current(:,:,3) = 20 13 25 19 23 26 21 24 6 dist = 2.3194 current(:,:,1) = 1 4 7 2 0 8 12 5 9 current(:,:,2) = 10 22 16 14 11 17 3 15 18 current(:,:,3) = 20 13 25 19 23 26 21 24 6 dist = 2.0694 current(:,:,1) = 1 4 7 2 5 8 12 0 9 current(:,:,2) = 10 22 16 14 11 17 3 15 18 current(:,:,3) = 20 13 25 19 23 26 21 24 6 dist = 1.9028 current(:,:,1) = 1 4 7 2 5 8 0 12 9 current(:,:,2) = 10 22 16 14 11 17 3 15 18 current(:,:,3) = 20 13 25 19 23 26 21 24 6 dist = 1.9028 current(:,:,1) = 1 4 7 2 5 8 3 12 9 current(:,:,2) = 10 22 16 14 11 17 0 15 18 current(:,:,3) = 20 13 25 19 23 26 21 24 6 dist = 1.7361 current(:,:,1) = 1 4 7 2 5 8 3 12 9 current(:,:,2) = 10 22 16 0 11 17 14 15 18 current(:,:,3) = 20 13 25 19 23 26 21 24 6 dist = 1.8194 current(:,:,1) = 1 4 7 2 5 8 3 12 9 current(:,:,2) = 10 22 16 11 0 17 14 15 18 current(:,:,3) = 20 13 25 19 23 26 21 24 6 dist = 1.6944 current(:,:,1) = 1 4 7 2 5 8 3 12 9 current(:,:,2) = 10 0 16 11 22 17 14 15 18 current(:,:,3) = 20 13 25 19 23 26 21 24 6 dist = 1.6944 current(:,:,1) = 1 4 7 2 5 8 3 12 9 current(:,:,2) = 10 13 16 11 22 17 14 15 18 current(:,:,3) = 20 0 25 19 23 26 21 24 6 dist = 1.5278 current(:,:,1) = 1 4 7 2 5 8 3 12 9 current(:,:,2) = 10 13 16 11 22 17 14 15 18 current(:,:,3) = 0 20 25 19 23 26 21 24 6 dist = 1.5278 current(:,:,1) = 1 4 7 2 5 8 3 12 9 current(:,:,2) = 10 13 16 11 22 17 14 15 18 current(:,:,3) = 19 20 25 0 23 26 21 24 6 dist = 1.3611 current(:,:,1) = 1 4 7 2 5 8 3 12 9 current(:,:,2) = 10 13 16 11 22 17 14 15 18 current(:,:,3) = 19 20 25 21 23 26 0 24 6 dist = 1.5278 current(:,:,1) = 1 4 7 2 5 8 3 12 9 current(:,:,2) = 10 13 16 11 22 17 14 15 18 current(:,:,3) = 19 20 25 23 0 26 21 24 6 dist = 1.5278 current(:,:,1) = 1 4 7 2 5 8 3 12 9 current(:,:,2) = 10 13 16 11 22 17 14 15 18 current(:,:,3) = ...

3   Pass
p = [1;4;3;19;10;6;7;2;9;20;11;0;16;14;12;5;13;18;22;23;21;17;15;24;25;8;26]; m = sliding3d(p); for i = 1:numel(m) if round(m(i)) == m(i) && m(i) <= numel(p) && m(i) > 0 zero=find(p == 0); [a0 b0 c0] = ind2sub([3 3 3],zero); [a1 b1 c1] = ind2sub([3 3 3],m(i)); if abs(a1 - a0) + abs(b1 - b0) + abs(c1 - c0) == 1 p([m(i) zero]) = p([zero m(i)]); end end end assert(isequal(p,[1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;0]))

current(:,:,1) = 1 19 7 4 10 2 3 6 9 current(:,:,2) = 20 16 5 11 14 13 0 12 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 6.8981 current(:,:,1) = 1 19 7 4 10 2 3 6 9 current(:,:,2) = 20 16 5 11 14 13 12 0 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 6.8148 current(:,:,1) = 1 19 7 4 10 2 3 6 9 current(:,:,2) = 20 16 5 11 0 13 12 14 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 6.8981 current(:,:,1) = 1 19 7 4 0 2 3 6 9 current(:,:,2) = 20 16 5 11 10 13 12 14 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 6.3981 current(:,:,1) = 1 19 7 0 4 2 3 6 9 current(:,:,2) = 20 16 5 11 10 13 12 14 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 5.6481 current(:,:,1) = 1 0 7 4 19 2 3 6 9 current(:,:,2) = 20 16 5 11 10 13 12 14 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 5.8981 current(:,:,1) = 0 19 7 1 4 2 3 6 9 current(:,:,2) = 20 16 5 11 10 13 12 14 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 6.1481 current(:,:,1) = 1 19 7 3 4 2 0 6 9 current(:,:,2) = 20 16 5 11 10 13 12 14 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 6.1481 current(:,:,1) = 1 19 7 11 4 2 3 6 9 current(:,:,2) = 20 16 5 0 10 13 12 14 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 6.1481 current(:,:,1) = 1 19 7 11 4 2 3 6 9 current(:,:,2) = 0 16 5 20 10 13 12 14 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 5.3981 current(:,:,1) = 0 19 7 11 4 2 3 6 9 current(:,:,2) = 1 16 5 20 10 13 12 14 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 5.8981 current(:,:,1) = 1 19 7 11 4 2 3 6 9 current(:,:,2) = 22 16 5 20 10 13 12 14 18 current(:,:,3) = 0 17 25 23 15 8 21 24 26 dist = 6.0648 current(:,:,1) = 1 19 7 11 4 2 3 6 9 current(:,:,2) = 20 16 5 10 0 13 12 14 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 6.1481 current(:,:,1) = 1 19 7 11 4 2 3 6 9 current(:,:,2) = 20 16 5 10 14 13 12 0 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 6.0648 current(:,:,1) = 1 19 7 11 4 2 3 6 9 current(:,:,2) = 20 16 5 10 13 0 12 14 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 6.1065 current(:,:,1) = 1 19 7 11 4 2 3 6 9 current(:,:,2) = 20 16 0 10 13 5 12 14 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 5.7731 current(:,:,1) = 1 19 7 11 4 2 3 6 9 current(:,:,2) = 20 0 16 10 13 5 12 14 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 5.5231 current(:,:,1) = 1 0 7 11 4 2 3 6 9 current(:,:,2) = 20 19 16 10 13 5 12 14 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 4.5231 current(:,:,1) = 1 4 7 11 0 2 3 6 9 current(:,:,2) = 20 19 16 10 13 5 12 14 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 4.2731 current(:,:,1) = 1 4 7 11 2 0 3 6 9 current(:,:,2) = 20 19 16 10 13 5 12 14 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 4.1898 current(:,:,1) = 1 4 7 11 2 5 3 6 9 current(:,:,2) = 20 19 16 10 13 0 12 14 18 current(:,:,3) = 22 17 25 23 15 8 21 24 26 dist = 4.1898 current(:,:,1) = 1 4 7 11 2 5 3 6 9 current(:,:,2) = 20 19 16 10 13 8 12 14 18 current(:,:,3) = 22 17 25 23 15 0 21 24 26 dist = 4.1620 current(:,:,1) = 1 4 7 11 2 5 3 6 9 current(:,:,2) = 20 19 16 10 13 8 12 14 18 current(:,:,3) = 22 17 25 23 15 26 21 24 0 dist = 4.1250 current(:,:,1) = 1 4 7 11 2 5 3 6 9 current(:,:,2) = 20 19 16 10 13 8 12 14 18 current(:,:,3) = 22 17 25 23 0 15 21 24 26 dist = 4.1620 current(:,:,1) = 1 4 7 11 2 5 3 6 9 current(:,:,2) = 20 19 16 10 13 8 12 14 18 current(:,:,3) = 22 0 25 23 17 15 21 24 26 dist = 3.8287 current(:,:,1) = 1 4 7 11 2 5 3 6 9 current(:,:,2) = 20 19 16 10 13 8 12 14 18 current(:,:,3) = 0 22 25 23 17 15 21 24 26 dist = 3.4954 current(:,:,1) = 1 4 7 11 2 5 3 6 9 current(:,:,2) = 0 19 16 10 13 8 12 14 18 current(:,:,3) = 20 22 25 23 17 15 21 24 26 dist = 2.8287 current(:,:,1) = 1 4 7 11 2 5 3 6 9 current(:,:,2) = 10 19 16 0 13 8 12 14 18 current(:,:,3) = 20 22 25 23 17 15 21 24 26 dist = 2.5787 current(:,:,1) = 1 4 7 0 2 5 3 6 9 current(:,:,2) = 10 19 16 11 13 8 12 14 18 current(:,:,3) = 20 22 25 23 17 15 21 24 26 dist = 2.0787 current(:,:,1) = 1 4 7 2 0 5 3 6 9 current(:,:,2) = 10 19 16 11 13 8 12 14 18 current(:,:,3) = 20 22 25 23 17 15 21 24 26 dist = 1.8287 current(:,:,1) = 1 4 7 2 5 0 3 6 9 current(:,:,2) = 10 19 16 11 13 8 12 14 18 current(:,:,3) = 20 22 25 23 17 15 21 24 26 dist = 1.6620 current(:,:,1) = 1 4 7 2 5 8 3 6 9 current(:,:,2) = 10 19 16 11 13 0 12 14 18 current(:,:,3) = 20 22 25 23 17 15 21 24 26 dist = 1.5787 current(:,:,1) = 1 4 7 2 5 8 3 6 9 current(:,:,2) = 10 19 16 11 13 15 12 14 18 current(:,:,3) = 20 22 25 23 17 0 21 24 26 dist = 1.5787 current(:,:,1) = 1 4 7 2 5 8 3 6 9 current(:,:,2) = 10 19 16 11 13 15 12 14 18 current(:,:,3) = 20 22 25 23 0 17 21 24 26 dist = 1.4676 current(:,:,1) = 1 4 7 2 5 8 3 6 9 current(:,:,2) = 10 19 16 11 13 15 12 14 18 current(:,:,3) = 20 22 25 0 23 17 21 24 26 dist = 1.3009 current(:,:,1) = 1 4 7 2 5 8 3 6 9 current(:,:,2) = 10 19 16 11 13 15 12 14 18 current(:,:,3) = 0 22 25 20 23 17 21 24 26 dist = 0.9676 current(:,:,1) = 1 4 7 2 5 8 3 6 9 current(:,:,2) = 10 19 16 11 13 15 12 14 18 current(:,:,3) = 22 0 25 20 23 17 21 24 26 dist = 1.3009 current(:,:,1) = 1 4 7 2 5 8 3 6 9 current(:,:,2) = 10 0 16 11 13 15 12 14 18 current(:,:,3) = 22 19 25 20 23 17 21 24 26 dist = 0.9676 current(:,:,1) = 1 4 7 2 5 8 3 6 9 current(:,:,2) = 10 13 16 11 0 15 12 14 18 current(:,:,3) = 22 19 25 20 23 17 21 24 26 dist = 0.8426 current(:,:,1) = 1 4 7 2 5 8 3 6 9 current(:,:,2) = 10 13 16 11 14 15 12 0 18 current(:,:,3) = ...

4   Pass
p = [1;5;3;10;7;0;13;9;24;22;2;15;16;11;17;12;8;6;19;20;21;26;14;23;4;25;18]; m = sliding3d(p); for i = 1:numel(m) if round(m(i)) == m(i) && m(i) <= numel(p) && m(i) > 0 zero=find(p == 0); [a0 b0 c0] = ind2sub([3 3 3],zero); [a1 b1 c1] = ind2sub([3 3 3],m(i)); if abs(a1 - a0) + abs(b1 - b0) + abs(c1 - c0) == 1 p([m(i) zero]) = p([zero m(i)]); end end end assert(isequal(p,[1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;0]))

current(:,:,1) = 1 10 13 5 7 9 3 0 24 current(:,:,2) = 22 16 12 2 11 8 15 17 6 current(:,:,3) = 19 26 4 20 14 25 21 23 18 dist = 6.8843 current(:,:,1) = 1 10 13 5 0 9 3 7 24 current(:,:,2) = 22 16 12 2 11 8 15 17 6 current(:,:,3) = 19 26 4 20 14 25 21 23 18 dist = 6.8843 current(:,:,1) = 1 10 13 0 5 9 3 7 24 current(:,:,2) = 22 16 12 2 11 8 15 17 6 current(:,:,3) = 19 26 4 20 14 25 21 23 18 dist = 6.3843 current(:,:,1) = 1 10 13 2 5 9 3 7 24 current(:,:,2) = 22 16 12 0 11 8 15 17 6 current(:,:,3) = 19 26 4 20 14 25 21 23 18 dist = 6.1343 current(:,:,1) = 1 10 13 2 5 9 3 7 24 current(:,:,2) = 0 16 12 22 11 8 15 17 6 current(:,:,3) = 19 26 4 20 14 25 21 23 18 dist = 5.8843 current(:,:,1) = 1 10 13 2 5 9 3 7 24 current(:,:,2) = 22 16 12 11 0 8 15 17 6 current(:,:,3) = 19 26 4 20 14 25 21 23 18 dist = 6.0093 current(:,:,1) = 1 10 13 2 5 9 3 7 24 current(:,:,2) = 22 16 12 11 14 8 15 17 6 current(:,:,3) = 19 26 4 20 0 25 21 23 18 dist = 5.9259 current(:,:,1) = 1 10 13 2 5 9 3 7 24 current(:,:,2) = 22 16 12 11 14 8 15 17 6 current(:,:,3) = 19 0 4 20 26 25 21 23 18 dist = 5.6759 current(:,:,1) = 1 10 13 2 5 9 3 7 24 current(:,:,2) = 22 16 12 11 14 8 15 17 6 current(:,:,3) = 19 4 0 20 26 25 21 23 18 dist = 5.6759 current(:,:,1) = 1 10 13 2 5 9 3 7 24 current(:,:,2) = 22 16 0 11 14 8 15 17 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 5.5648 current(:,:,1) = 1 10 0 2 5 9 3 7 24 current(:,:,2) = 22 16 13 11 14 8 15 17 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 5.0648 current(:,:,1) = 1 0 10 2 5 9 3 7 24 current(:,:,2) = 22 16 13 11 14 8 15 17 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 5.0648 current(:,:,1) = 1 10 13 2 5 9 3 7 24 current(:,:,2) = 22 0 16 11 14 8 15 17 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 5.3148 current(:,:,1) = 1 10 13 2 5 9 3 7 24 current(:,:,2) = 0 22 16 11 14 8 15 17 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.5648 current(:,:,1) = 1 0 13 2 5 9 3 7 24 current(:,:,2) = 22 10 16 11 14 8 15 17 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.5648 current(:,:,1) = 1 13 0 2 5 9 3 7 24 current(:,:,2) = 22 10 16 11 14 8 15 17 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.3981 current(:,:,1) = 1 13 16 2 5 9 3 7 24 current(:,:,2) = 22 10 0 11 14 8 15 17 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.7315 current(:,:,1) = 1 13 16 2 5 9 3 7 24 current(:,:,2) = 22 0 10 11 14 8 15 17 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.8148 current(:,:,1) = 1 13 16 2 5 9 3 7 24 current(:,:,2) = 0 22 10 11 14 8 15 17 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.0648 current(:,:,1) = 1 0 16 2 5 9 3 7 24 current(:,:,2) = 22 13 10 11 14 8 15 17 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.3148 current(:,:,1) = 1 13 16 2 5 9 3 7 24 current(:,:,2) = 11 22 10 0 14 8 15 17 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.5648 current(:,:,1) = 0 13 16 2 5 9 3 7 24 current(:,:,2) = 1 22 10 11 14 8 15 17 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.5648 current(:,:,1) = 1 13 16 2 5 9 3 7 24 current(:,:,2) = 19 22 10 11 14 8 15 17 6 current(:,:,3) = 0 4 12 20 26 25 21 23 18 dist = 4.5648 current(:,:,1) = 1 13 16 2 5 9 3 7 24 current(:,:,2) = 22 4 10 11 14 8 15 17 6 current(:,:,3) = 19 0 12 20 26 25 21 23 18 dist = 4.7315 current(:,:,1) = 1 5 16 2 0 9 3 7 24 current(:,:,2) = 22 13 10 11 14 8 15 17 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.8148 current(:,:,1) = 0 1 16 2 5 9 3 7 24 current(:,:,2) = 22 13 10 11 14 8 15 17 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.8148 current(:,:,1) = 1 5 16 2 7 9 3 0 24 current(:,:,2) = 22 13 10 11 14 8 15 17 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.8148 current(:,:,1) = 1 13 16 2 5 9 3 7 24 current(:,:,2) = 11 22 10 14 0 8 15 17 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.8148 current(:,:,1) = 1 13 16 2 5 9 3 7 24 current(:,:,2) = 11 22 10 14 17 8 15 0 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.7731 current(:,:,1) = 1 13 16 2 5 9 3 7 24 current(:,:,2) = 11 22 10 14 17 8 0 15 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.6065 current(:,:,1) = 1 13 16 2 5 9 3 0 24 current(:,:,2) = 11 22 10 14 17 8 15 7 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.6065 current(:,:,1) = 1 13 16 2 5 9 3 24 0 current(:,:,2) = 11 22 10 14 17 8 15 7 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.6065 current(:,:,1) = 1 13 16 2 5 0 3 24 9 current(:,:,2) = 11 22 10 14 17 8 15 7 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.4398 current(:,:,1) = 1 13 16 2 5 8 3 24 9 current(:,:,2) = 11 22 10 14 17 0 15 7 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.3565 current(:,:,1) = 1 13 16 2 5 8 3 24 9 current(:,:,2) = 11 22 10 14 0 17 15 7 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 4.2315 current(:,:,1) = 1 13 16 2 5 8 3 24 9 current(:,:,2) = 11 22 10 0 14 17 15 7 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 3.9815 current(:,:,1) = 1 13 16 2 5 8 3 24 9 current(:,:,2) = 0 22 10 11 14 17 15 7 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 3.4815 current(:,:,1) = 0 13 16 2 5 8 3 24 9 current(:,:,2) = 1 22 10 11 14 17 15 7 6 current(:,:,3) = 19 4 12 20 26 25 21 23 18 dist = 3.9815 current(:,:,1) = 1 13 16 2 5 8 3 24 9 current(:,:,2) = 19 22 10 11 14 17 15 7 6 current(:,:,3) = 0 4 12 20 26 25 21 23 18 dist = 3.9815 current(:,:,1) = 1 13 16 2 5 8 3 24 9 current(:,:,2) = 11 0 10 14 22 17 15 7 6 current(:,:,3) = ...