Cody

Solution 1394808

Submitted on 26 Dec 2017 by Thomas Steffen
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
maze = reshape([15 15 15 15 15 15 15 15 15 31], [1 1 1 1 10]); truth = reshape([1 2 3 4 5 6 7 8 9 10], [1 1 1 1 10]); assert(isequal(solve_maze5(maze), truth));

path1(:,:,1,1,1) = 1 path1(:,:,1,1,2) = 2 path1(:,:,1,1,3) = 3 path1(:,:,1,1,4) = 4 path1(:,:,1,1,5) = 5 path1(:,:,1,1,6) = 6 path1(:,:,1,1,7) = 7 path1(:,:,1,1,8) = 8 path1(:,:,1,1,9) = 9 path1(:,:,1,1,10) = 10 path2(:,:,1,1,1) = -1 path2(:,:,1,1,2) = -2 path2(:,:,1,1,3) = -3 path2(:,:,1,1,4) = -4 path2(:,:,1,1,5) = -5 path2(:,:,1,1,6) = -6 path2(:,:,1,1,7) = -7 path2(:,:,1,1,8) = -8 path2(:,:,1,1,9) = -9 path2(:,:,1,1,10) = -10 path(:,:,1,1,1) = 1 path(:,:,1,1,2) = 2 path(:,:,1,1,3) = 3 path(:,:,1,1,4) = 4 path(:,:,1,1,5) = 5 path(:,:,1,1,6) = 6 path(:,:,1,1,7) = 7 path(:,:,1,1,8) = 8 path(:,:,1,1,9) = 9 path(:,:,1,1,10) = 10

2   Pass
maze = reshape([28 28 30 28 30 30 29 30 28 29 29 30 31 29 28 29 30 30 31 29 29 28 30 29 29 29 28 30 31 29 29 30 29 31 29 29 30 30 28 31 30 29 28 30 31 30 30 29 30 29 28 31 30 29 28 30 29 29 28 31 29 28 30 31 30 29 30 31 29 29 29 29 28 30 30 31 28 30 31 29 29 31 29 28 29 28 31 30 30 29 30 30 31 31 30 30 30 30 30 31], [10 10 1 1 1]); truth = reshape([1 2 3 4 5 6 7 0 11 12 0 0 0 0 0 0 8 9 10 13 0 0 0 0 0 0 0 0 0 14 0 0 0 0 0 0 0 0 16 15 0 0 0 0 0 0 0 0 17 18 0 0 0 0 0 0 0 0 20 19 0 0 0 0 0 0 0 0 21 0 0 0 0 0 0 0 24 23 22 0 0 0 0 0 0 26 25 0 0 0 0 0 0 0 0 27 28 29 30 31], [10 10 1 1 1]); assert(isequal(solve_maze5(maze), truth));

path1 = 1 2 3 4 5 8 9 10 11 12 2 3 8 9 6 7 16 17 18 13 3 4 7 10 11 12 15 16 15 14 4 5 6 7 12 13 14 17 30 31 5 16 15 14 13 22 21 18 29 28 6 17 18 19 20 23 20 19 26 27 7 8 19 18 21 24 25 24 25 28 12 9 20 17 22 23 24 23 34 29 11 10 21 16 17 20 21 22 33 30 12 13 14 15 18 19 34 33 32 31 path2 = -1 0 0 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 -3 0 -1 0 0 0 0 0 0 0 -4 -3 -2 -1 0 0 0 0 -24 -23 -5 0 0 0 0 0 0 0 -25 -26 -6 0 0 0 0 0 0 0 -26 -27 -7 -8 -13 -14 0 0 0 -24 -25 -28 -10 -9 -12 -15 0 0 0 -23 -28 -29 -11 -10 -11 -16 -17 -20 -21 -22 -29 -30 -12 -13 -14 -15 -18 -19 -28 -29 -30 -31 path = 1 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 26 27 7 8 0 0 0 0 0 24 25 28 0 9 0 0 0 0 0 23 0 29 11 10 0 16 17 20 21 22 0 30 12 13 14 15 18 19 0 0 0 31

3   Pass
maze = reshape([20 29 22 23 23 23 22 30 29 21 28 29 23 29 29 29 30 29 29 29 23 22 31 30 31 23 23 29 23 21 29 29 23 22 31 23 23 22 22 31 28 23 21 28 29 31 23 30 31 23 30 22 31 23 23 28 30 31 29 21 31 29 31 21 29 22 31 29 29 29 23 23 23 31 23 22 31 22 31 31 28 23 28 23 23 23 22 31 30 23 28 23 23 28 23 31 30 31 23 23 28 31 29 28 29 31 29 29 31 31 29 31 30 29 31 29 30 31 30 31 30 30 30 31 31], [5 5 1 5 1]); truth = reshape([1 2 0 0 0 0 3 0 0 0 13 14 0 0 0 12 15 16 0 0 11 18 17 0 0 0 0 0 0 0 0 4 0 0 0 0 5 0 0 0 9 8 25 28 29 10 19 26 27 30 0 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 7 24 0 0 0 20 23 0 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 21 22 0 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 33], [5 5 1 5 1]); assert(isequal(solve_maze5(maze), truth));

path1(:,:,1,1) = 1 2 13 12 11 2 3 14 15 18 11 4 19 16 17 12 5 6 7 8 15 12 11 10 9 path1(:,:,1,2) = 2 3 4 9 10 5 4 5 8 19 10 9 18 25 26 13 14 17 28 27 14 13 18 29 30 path1(:,:,1,3) = 3 6 5 8 11 4 7 6 7 20 5 8 19 24 23 14 15 16 17 18 15 34 33 32 31 path1(:,:,1,4) = 6 33 32 9 10 5 34 37 10 21 16 39 38 13 22 15 40 17 24 25 16 35 18 23 32 path1(:,:,1,5) = 7 8 31 30 29 8 35 36 11 28 17 18 19 12 27 38 39 20 21 26 37 36 19 22 33 path2(:,:,1,1) = -1 0 -13 -12 -11 -2 -3 -14 -15 -18 0 -2 0 -16 -17 0 -1 0 0 0 0 0 0 0 0 path2(:,:,1,2) = 0 0 0 -9 -10 0 -4 -5 -8 -19 0 0 0 -25 -26 0 0 0 -28 -27 0 0 0 -29 -30 path2(:,:,1,3) = 0 0 0 -6 -3 0 0 -6 -7 -20 0 0 0 -24 -23 0 0 0 0 0 0 -28 -29 -30 -31 path2(:,:,1,4) = 0 -15 -14 -5 -4 0 -16 -19 -4 -21 0 -21 -20 -1 -22 0 -22 0 -6 -7 0 -27 0 -5 -32 path2(:,:,1,5) = 0 0 -13 -12 -11 0 -17 -18 -3 -10 0 0 -1 -2 -9 -24 -23 -2 -3 -8 -25 -26 0 -4 -33 path(:,:,1,1) = 1 0 13 12 11 2 3 14 15 18 0 0 0 16 17 0 0 0 0 0 0 0 0 0 0 path(:,:,1,2) = 0 0 0 9 10 0 4 5 8 19 0 0 0 25 26 0 0 0 28 27 0 0 0 29 30 path(:,:,1,3) = 0 0 0 0 0 0 0 6 7 20 0 0 0 24 23 0 0 0 0 0 0 0 0 0 31 path(:,:,1,4) = 0 0 0 0 0 0 0 0 0 21 0 0 0 0 22 0 0 0 0 0 0 0 0 0 32 path(:,:,1,5) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 33

4   Pass
maze = reshape([18 23 19 28 27 22 23 22 31 19 25 22 29 25 21 27 25 29 27 29 30 30 31 22 31 29 23 29 29 29 29 21 29 21 31 31 30 31 31 29 29 29 21 29 29 23 23 23 30 31 23 23 29 27 19 27 27 31 22 31 30 23 28 23 27 22 29 29 19 25 19 30 31 27 23 30 22 30 28 31 29 31 21 23 23 30 29 29 21 29 22 31 31 31 31 31 30 31 30 23 27 23 22 23 29 17 19 29 23 29 25 23 19 27 29 31 22 30 31 29 18 31 19 27 31 23 31 21 28 29 31 23 31 31 29 30 29 29 31 29 23 29 30 28 31 23 30 31 31 23 19 27 29 23 27 31 30 31 27 25 19 27 30 30 31 22 31 21 26 27 31 19 31 22 23 31 30 31 22 29 28 31 28 31 31 31 29 23 21 21 23 30 23 31 31 23 23 22 30 31 29 26 31 30 29 27 26 30 29 29 30 30 30 31 27 29 26 31 25 25 30 31 27 31 31 30 30 28 31 29 30 31 30 30 31 28 29 30 31 31 31 31 30 31 29 30 31 30 30 31], [5 5 2 5 1]); truth = reshape([1 2 0 0 0 0 0 0 0 0 0 24 23 0 0 0 19 22 0 0 0 20 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 18 13 0 0 0 17 14 0 0 0 3 0 0 0 0 0 0 0 0 0 25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 0 0 0 0 11 0 0 0 0 12 0 0 0 16 15 0 0 0 4 0 0 0 0 0 0 0 0 0 26 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 0 0 0 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 27 0 0 0 0 0 0 0 0 0 0 0 35 36 0 6 7 0 0 0 0 0 0 0 0 28 0 0 0 0 29 30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 33 38 0 0 0 34 37 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 31 32 39 0 0 0 0 40], [5 5 2 5 1]); assert(isequal(solve_maze5(maze), truth));

path1(:,:,1,1) = 1 62 5 6 21 2 63 24 19 20 59 56 23 22 21 54 55 70 71 50 53 50 53 52 51 path1(:,:,2,1) = 2 3 4 7 8 69 64 63 18 17 60 61 62 13 14 69 68 69 72 73 52 51 76 75 74 path1(:,:,1,2) = 2 61 26 37 10 3 64 25 36 35 58 57 32 33 34 67 48 31 26 49 64 49 54 57 58 path1(:,:,2,2) = 69 60 59 56 9 68 65 58 57 16 67 10 11 12 15 66 67 28 27 48 65 72 55 56 47 path1(:,:,1,3) = 3 40 39 38 11 4 23 26 23 12 27 78 77 24 45 28 47 30 25 76 63 62 61 60 59 path1(:,:,2,3) = 4 41 40 55 12 69 22 41 42 43 8 9 76 75 44 69 68 29 74 75 70 71 72 73 46 path1(:,:,1,4) = 6 41 18 21 12 5 24 27 22 17 26 25 78 47 46 29 46 79 38 35 84 81 80 37 36 path1(:,:,2,4) = 5 20 19 54 13 6 21 28 29 16 7 44 43 30 43 84 45 40 39 44 83 82 35 36 45 path1(:,:,1,5) = 7 8 17 20 19 88 11 16 49 18 89 12 15 48 43 30 13 14 33 34 31 32 33 38 37 path1(:,:,2,5) = 88 9 52 53 14 87 10 51 50 15 86 87 42 31 42 85 88 41 32 41 90 89 34 39 40 path2(:,:,1,1) = -1 0 0 0 -19 -2 0 -24 -19 -20 0 0 -23 -22 -21 0 0 -10 -9 -30 0 0 -27 -28 -29 path2(:,:,2,1) = 0 0 0 0 0 -11 0 0 -18 -17 0 0 0 -13 -14 -11 -12 -11 -8 -7 0 0 -4 -5 -6 path2(:,:,1,2) = 0 0 -24 0 0 -3 0 -25 0 0 0 0 0 0 0 -13 0 0 0 -31 -16 0 -26 -23 -22 path2(:,:,2,2) = -11 0 0 0 0 -12 0 0 0 -16 -13 -10 -11 -12 -15 -14 -13 0 0 -32 -15 -8 -25 -24 -33 path2(:,:,1,3) = 0 0 0 0 0 -4 0 -26 0 0 0 -2 -3 0 0 0 0 0 0 -4 -17 -18 -19 -20 -21 path2(:,:,2,3) = 0 0 0 0 0 -11 0 0 0 0 -8 -9 -4 -5 0 -11 -12 0 -6 -5 -10 -9 -8 -7 -34 path2(:,:,1,4) = 0 0 0 0 0 -5 0 -27 0 0 0 0 -2 0 0 0 0 -1 0 -35 0 0 0 0 -36 path2(:,:,2,4) = 0 0 0 0 0 -6 0 -28 -29 0 -7 0 0 -30 -37 0 0 0 0 -36 0 0 0 0 -35 path2(:,:,1,5) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -37 0 0 0 -33 -34 0 0 0 -38 -37 path2(:,:,2,5) = 0 0 0 0 0 0 0 0 0 0 0 0 0 -31 -38 0 0 0 -32 -39 0 0 0 -39 -40 path(:,:,1,1) = 1 0 0 0 0 2 0 24 19 20 0 0 23 22 21 0 0 0 0 0 0 0 0 0 0 path(:,:,2,1) = 0 0 0 0 0 0 0 0 18 17 0 0 0 13 14 0 0 0 0 0 0 0 0 0 0 path(:,:,1,2) = 0 0 0 0 0 3 0 25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 path(:,:,2,2) = 0 0 0 0 0 0 0 0 0 16 0 10 11 12 15 0 0 0 0 0 0 0 0 0 0 path(:,:,1,3) = 0 0 0 0 0 4 0 26 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 path(:,:,2,3) = 0 0 0 0 0 0 0 0 0 0 8 9 0 0 0 0 0 0 0 0 0 0 0 0 0 path(:,:,1,4) = 0 0 0 0 0 5 0 27 0 0 0 0 0 0 0 0 0 0 0 35 0 0 0 0 36 path(:,:,2,4) = 0 0 0 0 0 6 0 28 29 0 7 0 0 30 0 0 0 0 0 0 0 0 0 0 0 path(:,:,1,5) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 33 34 0 0 0 38 37 path(:,:,2,5) = 0 0 0 0 0 0 0 0 0 0 0 0 0 31 0 0 0 0 32 0 0 0 0 39 40

5   Pass
maze = reshape([21 5 22 29 19 23 31 7 30 15 21 26 23 7 19 23 22 29 11 11 14 15 30 30 23 11 7 11 25 15 13 13 15 15 27 23 31 28 29 27 13 14 31 31 15 23 14 23 30 19 30 30 31 29 25 7 14 29 23 31 25 27 30 29 23 30 29 12 31 19 7 23 31 19 11 28 30 15 26 27 15 13 25 26 23 27 23 23 28 15 19 20 23 27 15 7 31 19 23 27 28 23 22 31 15 30 23 29 30 15 15 28 31 23 21 23 30 23 29 23 22 15 15 23 23 26 15 23 7 29 23 28 31 25 15 23 27 27 31 23 29 23 14 29 25 23 7 15 23 31 27 30 15 25 21 28 23 19 31 15 31 27 23 19 23 22 30 30 27 15 30 15 27 7 23 30 27 26 31 25 23 19 30 31 23 29 29 14 31 27 23 30 23 15 23 23 23 30 31 19 7 23 23 25 27 26 27 23 13 23 21 31 23 27 15 31 15 29 26 23 15 19 31 23 15 29 23 30 31 15 31 31 7 28 31 14 23 13 23 15 29 21 31 30 31 31 31 23 30 31 26 27 25 31 21 15 21 31 28 31 15 23 21 29 29 26 31 29 27 29 30 31 27 15 15 27 23 23 13 27 25 23 23 29 19 30 27 27 31 19 31 28 27 15 29 15 23 23 23 15 15 26 31 5 15 31 30 15 29 31 26 31 30 31 29 15 13 31 17 31 27 31 27 15 15 27 31 30 30 27 11 13 23 19 29 31 27 29 14 31 28 29 27 27 15 31 31 27 30 23 30 31 15 13 15 15 15 29 31 13 13 31 15 31 29 29 29 23 23 23 15 23 30 23 7 22 27 7 19 29 25 30 30 30 31 23 29 23 30 25 11 29 7 22 31 26 31 26 30 27 29 31 27 28 27 15 15 27 27 27 28 30 27 19 31 31 14 15 27 21 30 31 31 23 31 19 28 31 27 15 21 21 23 31 29 27 31 29 23 15 22 29 29 31 25 27 23 15 7 15 29 25 13 30 29 15 27 21 27 23 30 15 29 26 23 28 29 15 22 31 27 23 3 14 31 13 15 14 30 29 29 15 23 23 29 31 14 30 31 23 22 23 15 15 29 23 15 23 15 31 15 30 28 30 29 28 27 31 11 27 31 13 30 15 11 13 28 31 15 11 15 27 14 30 15 28 27 28 15 11 30 31 15 29 13 28 30 27 31 31 30 30 30 27 31 30 31 26 31 15 15 29 28 15 27 25 31 31 13 13 31 26 31 31 29 29 27 26 31 29 27 30 31 30 31 25 28 27 30 31 31 27 27 28 31 26 31 26 31 15 26 29 30 31 27 15 31 31 14 27 29 15 15 14 15 30 31 31 29 15 30 15 30 31 15 31 29 30 30 15 15 15 15 14 31 25 30 30 18 31 15 21 23 14 31 7 30 29 15 13 14 27 27 23 31 23 27 7 26 27 31 27 23 31 29 29 15 15 15 29 30 15 19 21 15 29 31 29 29 27 15 31 23 31 23 21 29 13 22 15 31 31 27 25 11 14 29 29 22 31 28 31 31 11 27 31 14 30 30 31 7 22 31 25 13 23 25 27 23 31 25 23 25 22 31 29 28 31 27 31 31 27 30 26 15 21 23 21 29 15 15 23 31 15 23 31 13 30 30 23 28 31 21 15 13 23 31 31 22 31 19 31 7 30 23 26 31 30 29 15 30 15 22 31 15 19 28 31 30 23 23 31 26 31 7 15 7 27 14 29 29 26 30 27 31 23 26 31 23 25 30 30 14 31 31 26 31 27 30 31 23 11 31 15 21 7 23 28 31 23 26 31 31 31 27 26 30 30 31 25 30 23 31 14 31 31 31 21 26 15 30 30 31 31 7 15 23 28 31 31 15 29 27 13 15 15 30 30 31 27 29 23 29 29 15 23 23 31 30 31 30 23 30 29 31 28 31 31 15 15 15 14 15 31 15 30 23 27 7 17 30 15 19 13 31 27 7 23 30 23 31 22 27 29 27 30 23 22 31 31 22 31 23 15 15 22 29 15 19 11 31 23 19 30 29 22 23 27 23 31 19 19 22 15 31 31 11 19 31 31 31 29 30 31 31 19 29 29 14 29 29 31 31 25 29 31 31 19 31 31 27 29 31 11 19 29 31 28 30 31 31 29 23 30 15 14 29 13 23 29 7 27 31 14 31 22 30 31 31 31 31 15 7 13 15 15 29 30 31 23 7 23 15 14 15 15 31 14 15 23 21 23 31 27 27 30 23 27 28 27 27 27 15 29 27 27 29 21 30 27 27 31 31 14 27 15 11 23 27 23 31 23 27 23 15 15 31 30 15 23 31 31 15 23 27 15 27 30 30 31 25 27 30 31 23 30 29 30 27 27 15 30 27 14 31 14 23 27 13 27 7 27 31 31 23 15 27 23 19 15 29 22 30 31 25 27 23 31 25 27 21 7 23 31 23 31 15 27 15 15 21 31 15 29 15 15 29 29 15 7 15 31 29 23 29 30 31 31 23 7 14 31 30 15 15 31 30 30 30 29 25 15 11 15 15 27 29 29 29 31 30 31 31 31 15 15 14 31 11 27 28 27 27 29 29 31 27 31 31 31 29 28 30 29 15 27 30 29 31 9 14 27 27 15 31 15 15 30 31 27 11 29 13 15 29 13 30 31 25 15 31 30 30 31 29 15 30 31 11 31 13 14 31 30 31 31 15 28 30 29 26 31 27 27 15 30 31 30 15 29 15 30 11 31 27 29 14 31 29 15 31 14 29 15 31 30 31 31 31 15 28 30 30 31 15 31 15 31 30 31 7 28 30 15 13 15 30 23 15 15 15 21 21 30 31 29 23 27 7 27 23 23 23 22 15 24 30 29 19 21 21 15 31 27 23 31 30 29 28 31 22 15 31 29 29 30 23 30 23 23 31 11 27 15 23 25 28 15 29 29 31 30 23 29 29 23 11 19 31 27 19 27 19 26 27 23 23 29 7 23 23 7 30 29 9 30 11 15 23 15 25 27 30 15 15 31 27 15 27 31 14 30 29 14 31 29 13 29 29 31 23 31 15 23 7 30 31 21 23 15 23 15 30 31 15 30 27 30 15 19 22 27 30 28 31 13 31 29 30 31 29 27 30 31 13 31 30 27 23 31 27 31 21 31 31 27 15 27 14 31 22 15 11 25 19 30 31 27 30 23 19 23 30 31 15 23 29 26 31 29 15 27 30 29 15 28 27 31 31 27 23 21 14 30 29 31 23 23 23 15 29 30 31 27 31 31 31 19 26 31 15 15 28 31 23 30 29 23 29 23 30 31 26 31 23 22 29 29 29 29 28 31 29 31 15 31 22 31 30 29 14 30 31 31 31 31 23 31 14 31 11 15 11 23 29 30 31 22 31 23 29 29 19 24 27 26 31 22 31 13 26 15 14 31 31 30 29 31 23 11 13 30 31 14 31 31 7 23 31 31 14 31 11 25 27 31 15 23 31 19 27 15 7 13 19 28 15 25 15 7 30 27 27 27 15 30 31 15 23 15 14 31 27 30 31 27 19 29 29 31 21 7 31 30 23 30 31 27 27 31 30 29 31 13 15 27 15 27 31 7 31 15 7 22 29 7 29 15 15 31 23 31 29 15 13 15 30 15 23 31 31 23 31 30 23 29 11 7 30 27 11 27 27 25 15 28 23 31 15 19 15 28 31 11 13 11 30 23 30 31 27 31 27 30 31 11 7 29 29 23 29 15 31 31 29 29 22 31 23 15 15 14 11 19 23 30 23 30 27 23 31 19 22 15 29 23 21 21 15 29 30 15 15 31 29 27 30 31 30 31 23 30 29 15 15 29 31 29 21 15 30 23 15 27 11 21 27 22 30 25 31 23 7 23 31 14 23 31 15 29 15 14 23 23 15 31 23 14 31 23 7 23 7 15 31 15 15 30 15 31 13 11 27 13 13 30 31 29 31 31 14 31 15 11 27 28 30 28 31 15 31 15 31 30 27 25 29 30 29 27 15 31 14 31 15 28 30 30 31 31 27 29 27 15 31 15 30 27 31 31 31 31 26 29 29 30 31 31 31 15 31 31 27 26 31 27 25 30 27 11 30 31 15 30 15 31 31 30 30 15 30 30 15 30 27 14 31 30 31 31 31 29 14 31 15 15 31 31 27 27 13 31 28 15 15 30 31 31 31 15 14 31 13 13 31 29 15 31 15 29 30 31 14 31 31 30 27 21 30 31 30 29 27 30 31 23 29 28 15 21 21 15 30 31 29 15 22 15 11 31 25 27 11 30 25 27 27 15 13 15 11 26 31 27 7 22 31 25 26 29 22 30 31 27 15 23 31 27 27 21 29 23 27 30 27 31 27 14 31 7 28 31 15 26 31 15 7 23 30 15 28 31 29 31 25 25 23 31 13 31 27 14 31 15 31 26 15 7 31 27 19 19 23 11 7 30 15 13 15 29 30 7 30 23 15 23 14 31 21 15 15 22 30 31 31 15 31 7 30 15 30 7 29 30 27 26 27 30 29 13 31 22 29 23 31 30 31 27 19 27 22 31 26 15 15 14 30 30 23 15 23 31 26 31 25 22 31 27 11 31 29 25 30 31 27 31 15 23 22 27 30 30 15 19 31 25 29 23 7 31 29 27 23 27 27 29 29 29 28 31 15 31 31 23 31 21 13 21 29 19 31 31 29 23 21 29 31 23 15 31 27 28 31 26 15 27 31 15 26 31 21 7 14 30 31 29 20 30 31 15 31 31 13 30 29 31 29 30 31 29 30 31 23 31 15 27 11 15 22 23 14 27 15 7 15 25 30 29 29 11 23 28 31 31 27 27 31 30 30 15 23 31 22 31 31 31 23 21 30 29 31 29 30 23 31 27 30 31 22 15 15 30 31 15 19 14 31 29 31 13 22 31 31 31 31 25 27 23 25 19 31 11 30 31 27 27 27 22 31 23 26 31 27 19 27 15 30 23 15 27 30 15 29 15 31 7 27 30 31 31 27 15 30 22 27 31 31 31 15 15 14 31 30 31 15 14 29 13 30 31 15 31 31 7 29 30 15 30 23 23 22 31 27 15 27 15 21 28 31 7 15 15 15 23 13 31 13 25 23 31 23 31 22 30 23 30 27 31 11 15 15 31 30 15 25 14 31 22 31 27 26 29 23 31 27 15 31 23 11 23 22 31 21 15 19 29 14 31 23 23 23 7 15 29 15 23 29 30 31 27 14 31 15 23 23 28 30 23 29 31 29 19 27 29 15 23 25 29 31 15 29 15 27 14 31 30 30 31 31 7 30 30 30 31 7 29 31 29 13 29 23 29 31 23 23 15 29 31 31 7 23 31 7 31 15 31 15 26 31 15 13 29 13 30 31 31 29 31 31 13 29 30 30 31 31 15 27 30 27 31 11 28 31 28 15 27 29 27 29 15 13 15 27 15 13 29 25 15 30 31 31 31 15 15 15 31 25 30 15 15 29 30 31 29 31 31 29 27 27 25 25 31 28 27 31 14 31 31 27 31 28 31 15 13 29 27 15 30 31 15 31 15 30 31 15 15 13 11 27 15 30 31 14 31 15 29 28 29 29 31 31 15 31 15 15 31 14 31 31 31 28 31 31 31 29 31 15 31 14 31 30 18 22 30 31 26 23 22 30 25 22 29 26 31 31 19 31 28 30 23 26 31 31 27 23 25 29 23 22 27 31 31 23 27 31 30 30 31 27 29 23 21 22 27 27 22 30 23 30 31 27 26 29 26 31 29 25 23 30 27 29 29 29 27 23 27 23 31 23 23 30 31 26 30 31 29 23 28 31 19 27 23 29 23 23 26 23 27 30 23 28 27 30 27 27 23 23 30 27 23 22 31 31 30 31 23 31 22 29 29 29 23 29 29 29 31 31 23 31 23 30 30 31 31 23 21 31 29 28 23 29 27 31 27 27 31 25 25 22 27 29 23 30 29 23 30 23 19 31 27 29 25 23 21 27 27 31 23 31 23 21 29 23 23 23 31 31 23 30 23 27 27 31 22 23 25 29 27 26 31 31 27 30 31 23 21 22 23 26 31 23 27 22 31 23 31 30 27 26 27 27 31 30 31 23 23 31 28 31 27 19 31 21 31 29 25 27 31 21 31 30 31 31 31 31 31 30 31 22 23 29 21 30 29 31 31 31 23 29 23 31 29 29 29 23 22 31 30 31 31 27 29 30 29 21 23 29 29 31 23 28 31 29 23 23 29 23 29 19 23 23 23 30 31 23 29 22 31 27 19 29 25 29 28 31 31 29 31 31 21 21 23 30 31 31 31 26 23 31 27 23 19 30 31 31 28 31 22 27 19 31 29 29 21 25 29 31 31 31 31 30 31 27 26 31 23 30 30 23 29 18 31 25 31 31 30 31 31 23 23 29 29 22 31 21 27 30 30 31 19 22 23 23 31 31 31 29 23 29 23 30 31 31 30 21 30 30 30 31 31 31 23 30 22 31 26 30 29 27 31 31 28 31 29 31 21 31 29 27 31 29 23 30 31 23 31 23 26 23 23 27 27 19 31 31 23 26 30 31 25 23 25 19 27 31 27 31 26 23 25 23 19 31 30 31 31 31 23 29 29 21 31 23 27 31 27 31 31 21 29 27 29 29 23 31 27 27 31 30 19 29 26 29 30 23 31 25 30 31 27 29 27 19 23 31 31 29 30 31 31 23 31 22 23 31 23 31 30 30 23 28 31 29 29 31 23 23 31 29 29 23 23 28 31 31 22 31 31 30 31 30 27 30 27 27 30 29 29 26 29 29 27 30 29 31 29 27 28 31 29 31 27 30 31 31 29 30 30 31 31 31 26 30 31 29 31 31 30 31 31 28 31 27 30 29 31 31 27 27 31 28 30 31 27 27 31 30 31 29 25 25 26 30 31 27 30 27 30 31 29 30 27 30 31 31 26 30 31 31 31 28 31 27 25 31 31 31 27 31 31 31 31 31 25 27 27 27 31 31 27 31 28 28 30 31 30 31 29 31 29 29 31 31 29 29 31 29 28 31 31 31 30 31 30 31], [5 5 5 5 5]); truth = reshape([1 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 93 92 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 95 94 91 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 98 0 0 0 0 99 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 96 97 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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 0 0 0 0 0 0 0 0 0 115 0 0 0 0 114 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 71 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 78 0 0 0 70 77 0 0 0 0 24 0 0 0 26 25 0 0 0 0 0 0 0 0 0 79 0 0 0 69 22 0 0 0 68 23 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 33 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 116 0 0 0 0 117 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65 0 0 0 0 54 57 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 66 67 0 43 42 55 56 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 36 0 0 41 32 35 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 38 37 0 0 40 39 122 123], [5 5 5 5 5]); assert(isequal(solve_maze5(maze), truth));

path1(:,:,1,1,1) = 1 2 297 298 999 4 5 678 549 999 243 362 679 548 547 244 245 704 243 546 267 246 533 698 545 path1(:,:,2,1,1) = 416 865 864 999 999 407 676 677 238 999 412 177 240 239 999 925 926 241 242 495 268 95 534 697 494 path1(:,:,3,1,1) = 415 910 577 578 999 414 403 90 579 580 413 402 401 398 399 924 923 400 399 999 93 94 535 692 493 path1(:,:,4,1,1) = 620 619 576 899 570 621 88 89 470 471 622 947 948 471 474 93 350 485 486 999 92 349 484 693 492 path1(:,:,5,1,1) = 999 999 575 898 895 999 999 944 943 894 95 946 945 942 475 94 351 102 487 488 91 352 883 882 491 path1(:,:,1,2,1) = 2 3 296 299 300 3 360 359 550 303 242 361 680 307 282 9 706 705 308 309 266 265 532 543 544 path1(:,:,2,2,1) = 3 862 863 554 999 408 861 358 555 999 409 920 681 556 999 708 707 596 557 260 127 126 689 542 495 path1(:,:,3,2,1) = 4 909 154 153 999 5 999 357 356 581 710 921 594 355 999 709 922 595 558 999 188 187 536 691 412 path1(:,:,4,2,1) = 999 999 901 900 569 6 999 90 469 999 711 150 949 472 473 98 99 100 879 999 189 348 537 878 411 path1(:,:,5,2,1) = 999 999 444 897 896 999 999 445 999 999 96 967 940 941 166 97 102 101 880 489 190 103 884 881 490 path1(:,:,1,3,1) = 917 4 295 552 301 918 343 344 551 302 241 242 677 676 675 10 335 334 333 310 337 336 531 530 529 path1(:,:,2,3,1) = 916 907 906 553 150 919 860 905 352 351 240 919 682 353 674 599 598 597 332 261 128 185 688 497 496 path1(:,:,3,3,1) = 915 908 903 152 999 8 999 904 583 582 9 999 683 354 167 686 685 684 627 628 129 186 689 690 413 path1(:,:,4,3,1) = 999 793 902 999 999 7 448 447 999 999 712 149 950 951 166 713 700 345 626 999 714 347 346 877 999 path1(:,:,5,3,1) = 999 792 999 999 999 999 85 446 999 999 191 966 965 952 165 702 701 102 625 164 715 999 999 999 999 path1(:,:,1,4,1) = 922 225 226 995 348 921 342 345 346 347 20 341 678 315 672 19 340 687 684 671 338 339 686 685 670 path1(:,:,2,4,1) = 225 224 993 994 349 920 859 992 999 350 239 918 991 999 673 20 21 50 629 262 21 184 687 668 669 path1(:,:,3,4,1) = 999 999 999 269 616 237 236 237 268 267 238 917 990 989 988 687 22 51 628 161 22 183 182 999 999 path1(:,:,4,4,1) = 999 999 999 614 615 942 943 999 613 612 149 148 147 146 165 688 699 950 999 999 689 690 951 999 999 path1(:,:,5,4,1) = 188 189 190 607 616 941 944 947 606 999 860 151 948 953 166 859 698 949 624 163 858 857 856 999 999 path1(:,:,1,5,1) = 923 228 227 322 323 20 229 318 317 318 19 20 679 316 999 18 47 680 683 999 17 16 17 666 999 path1(:,:,2,5,1) = 232 231 999 999 320 233 230 999 999 319 999 999 999 999 264 999 48 49 999 263 14 15 16 667 999 path1(:,:,3,5,1) = 999 999 999 270 271 234 235 999 611 266 915 916 999 999 265 914 53 52 999 162 15 166 165 164 163 path1(:,:,4,5,1) = 999 999 999 609 272 999 999 999 610 611 999 149 694 999 166 17 692 693 999 499 16 691 952 143 498 path1(:,:,5,5,1) = 999 999 999 608 617 999 999 999 605 604 999 150 695 144 167 34 697 696 143 496 35 146 855 142 497 path1(:,:,1,1,2) = 418 419 226 235 999 5 288 287 236 999 6 363 286 285 280 7 248 703 244 255 8 247 700 699 256 path1(:,:,2,1,2) = 417 866 867 999 999 406 675 868 237 999 411 176 395 284 283 8 927 252 253 254 269 270 271 696 257 path1(:,:,3,1,2) = 912 911 999 999 999 405 404 999 999 497 974 973 396 397 496 833 102 103 932 495 834 363 104 695 494 path1(:,:,4,1,2) = 999 618 573 572 571 624 87 88 891 892 623 972 889 890 375 102 101 482 933 374 361 362 483 694 375 path1(:,:,5,1,2) = 788 787 574 185 186 191 86 183 184 893 970 971 888 477 476 103 104 887 934 373 90 353 886 371 372 path1(:,:,1,2,2) = 773 290 225 118 999 4 289 224 305 304 907 364 367 306 281 8 365 366 245 282 9 264 265 246 527 path1(:,:,2,2,2) = 774 291 292 117 999 817 588 393 116 999 410 589 394 115 282 123 590 251 116 259 124 125 540 541 258 path1(:,:,3,2,2) = 913 170 391 562 999 626 587 392 561 999 411 592 593 560 283 832 591 104 559 999 131 132 539 999 999 path1(:,:,4,2,2) = 999 617 390 563 568 625 616 89 468 467 614 615 480 479 466 357 100 481 464 465 358 111 538 999 410 path1(:,:,5,2,2) = 789 790 443 188 187 190 85 442 189 458 969 968 939 478 459 356 355 938 937 374 191 354 885 110 409 path1(:,:,1,3,2) = 772 5 294 119 999 771 6 217 999 999 908 811 368 999 312 607 378 379 312 311 10 11 380 247 528 path1(:,:,2,3,2) = 815 222 293 998 149 816 221 220 999 999 909 810 999 999 153 600 999 250 331 154 11 134 249 248 497 path1(:,:,3,3,2) = 914 171 796 151 150 451 586 585 584 999 612 999 999 999 986 687 999 417 630 629 130 133 416 415 414 path1(:,:,4,3,2) = 189 794 795 92 999 450 449 90 91 92 613 108 107 984 985 704 109 344 631 874 717 110 343 876 875 path1(:,:,5,3,2) = 188 791 999 437 999 189 84 441 440 93 190 957 964 73 999 703 962 963 426 999 716 999 142 425 999 path1(:,:,1,4,2) = 925 926 151 996 149 770 927 218 999 999 21 812 369 314 313 608 485 486 487 148 11 484 381 488 149 path1(:,:,2,4,2) = 814 223 150 997 148 937 858 219 999 999 910 813 999 999 152 609 999 999 330 151 12 483 382 489 150 path1(:,:,3,4,2) = 101 102 797 642 999 938 103 104 641 999 611 814 105 146 987 610 815 180 159 160 23 144 181 490 999 path1(:,:,4,4,2) = 100 999 999 999 999 939 818 999 999 999 150 817 106 145 164 27 816 633 632 999 718 143 142 491 138 path1(:,:,5,4,2) = 187 186 999 438 999 940 945 946 439 999 861 956 955 954 163 28 29 634 623 162 147 144 141 140 999 path1(:,:,1,5,2) = 924 805 804 321 324 769 928 319 320 999 768 999 316 315 999 767 46 681 682 999 766 765 18 665 999 path1(:,:,2,5,2) = 807 806 803 802 319 808 857 326 325 320 911 999 327 324 323 999 999 328 329 999 13 14 383 999 999 path1(:,:,3,5,2) = 999 95 800 801 999 809 856 855 640 321 912 853 854 639 322 913 54 637 638 501 24 167 168 999 999 path1(:,:,4,5,2) = 97 96 999 999 273 152 819 999 999 170 151 956 957 144 169 26 955 636 143 500 25 954 953 492 493 path1(:,:,5,5,2) = 188 189 999 619 618 999 960 999 620 603 999 959 958 621 168 33 32 635 622 495 36 145 854 141 494 path1(:,:,1,1,3) = 821 420 227 234 233 258 259 222 221 280 257 260 873 872 279 256 249 702 877 738 253 252 701 112 737 path1(:,:,2,1,3) = 172 171 172 217 999 173 674 869 216 999 174 175 870 871 276 121 928 273 274 275 544 545 272 111 110 path1(:,:,3,1,3) = 173 999 999 666 999 826 743 744 999 498 975 742 745 114 999 120 929 930 931 378 835 364 365 366 377 path1(:,:,4,1,3) = 999 999 184 999 999 827 630 183 999 499 976 977 186 115 999 117 978 979 116 379 360 117 118 367 376 path1(:,:,5,1,3) = 997 786 785 999 189 998 181 182 999 500 999 999 999 382 381 88 105 106 935 380 89 118 109 370 137 path1(:,:,1,2,3) = 820 9 230 231 232 819 10 223 220 279 906 261 874 875 278 905 262 263 876 739 542 263 264 525 526 path1(:,:,2,2,3) = 775 170 19 218 999 818 11 20 219 999 999...