Cody

Solution 1326644

Submitted on 3 Nov 2017 by Angelo Gelmini
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=[1 4 7 10; 2 5 8 11; 3 6 9 12]; R=2;C=3; X(:,:,1) =[1 4 7 ; 2 5 8]; X(:,:,2) =[2 5 8 ; 3 6 9]; X(:,:,3) =[4 7 10 ; 5 8 11]; X(:,:,4) =[5 8 11 ; 6 9 12]; assert(isequal(BreakTheMatrix(M,R,C),X))

z = 1 z = 1 4 z = 1 4 7 z = 1 4 7 2 0 0 z = 1 4 7 2 5 0 z = 1 4 7 2 5 8 z = 1 4 7 2 5 8 z = [] z = 2 z = 2 5 z = 2 5 8 z = 2 5 8 3 0 0 z = 2 5 8 3 6 0 z = 2 5 8 3 6 9 z = 2 5 8 3 6 9 z = [] z = 4 z = 4 7 z = 4 7 10 z = 4 7 10 5 0 0 z = 4 7 10 5 8 0 z = 4 7 10 5 8 11 z = 4 7 10 5 8 11 z = [] z = 5 z = 5 8 z = 5 8 11 z = 5 8 11 6 0 0 z = 5 8 11 6 9 0 z = 5 8 11 6 9 12 z = 5 8 11 6 9 12 z = []

2   Pass
x=1:ceil(35+25*rand());r=1;c=1; M=BreakTheMatrix(x,r,c); assert(all(arrayfun(@(y) (M(:,:,y)==y),1:numel(x))))

z = 1 z = 1 z = [] z = 2 z = 2 z = [] z = 3 z = 3 z = [] z = 4 z = 4 z = [] z = 5 z = 5 z = [] z = 6 z = 6 z = [] z = 7 z = 7 z = [] z = 8 z = 8 z = [] z = 9 z = 9 z = [] z = 10 z = 10 z = [] z = 11 z = 11 z = [] z = 12 z = 12 z = [] z = 13 z = 13 z = [] z = 14 z = 14 z = [] z = 15 z = 15 z = [] z = 16 z = 16 z = [] z = 17 z = 17 z = [] z = 18 z = 18 z = [] z = 19 z = 19 z = [] z = 20 z = 20 z = [] z = 21 z = 21 z = [] z = 22 z = 22 z = [] z = 23 z = 23 z = [] z = 24 z = 24 z = [] z = 25 z = 25 z = [] z = 26 z = 26 z = [] z = 27 z = 27 z = [] z = 28 z = 28 z = [] z = 29 z = 29 z = [] z = 30 z = 30 z = [] z = 31 z = 31 z = [] z = 32 z = 32 z = [] z = 33 z = 33 z = [] z = 34 z = 34 z = [] z = 35 z = 35 z = [] z = 36 z = 36 z = []

3   Pass
x=eye(7);r=2;c=2; M=BreakTheMatrix(x,r,c); ids=[1 8 15 22 29 36]; urs=ids(1:5)+1; lls=urs+5; z=setxor(1:size(M,3),[ids urs lls]); a1=arrayfun(@(a) isequal(M(:,:,a),eye(2)),ids); a2=arrayfun(@(a) isequal(M(:,:,a),[0 1 ; 0 0]),urs); a3=arrayfun(@(a) isequal(M(:,:,a),[0 0 ; 1 0]),lls); a4=arrayfun(@(a) isequal(M(:,:,a),zeros(2)),z); assert(all([a1 a2 a3 a4]))

z = 1 z = 1 0 z = 1 0 0 0 z = 1 0 0 1 z = 1 0 0 1 z = [] z = 0 z = 0 1 z = 0 1 0 0 z = 0 1 0 0 z = 0 1 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 1 0 z = 0 0 1 0 z = 0 0 1 0 z = [] z = 1 z = 1 0 z = 1 0 0 0 z = 1 0 0 1 z = 1 0 0 1 z = [] z = 0 z = 0 1 z = 0 1 0 0 z = 0 1 0 0 z = 0 1 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 1 0 z = 0 0 1 0 z = 0 0 1 0 z = [] z = 1 z = 1 0 z = 1 0 0 0 z = 1 0 0 1 z = 1 0 0 1 z = [] z = 0 z = 0 1 z = 0 1 0 0 z = 0 1 0 0 z = 0 1 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 1 0 z = 0 0 1 0 z = 0 0 1 0 z = [] z = 1 z = 1 0 z = 1 0 0 0 z = 1 0 0 1 z = 1 0 0 1 z = [] z = 0 z = 0 1 z = 0 1 0 0 z = 0 1 0 0 z = 0 1 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 1 0 z = 0 0 1 0 z = 0 0 1 0 z = [] z = 1 z = 1 0 z = 1 0 0 0 z = 1 0 0 1 z = 1 0 0 1 z = [] z = 0 z = 0 1 z = 0 1 0 0 z = 0 1 0 0 z = 0 1 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 0 0 z = 0 0 0 0 z = 0 0 0 0 z = [] z = 0 z = 0 0 z = 0 0 1 0 z = 0 0 1 0 z = 0 0 1 0 z = [] z = 1 z = 1 0 z = 1 0 0 0 z = 1 0 0 1 z = 1 0 0 1 z = []

4   Pass
u=ceil(10*rand())+4; x=magic(u);r=u;c=u; M=BreakTheMatrix(x,r,c); assert(isequal(M,x))

z = 144 z = 144 2 z = 144 2 3 z = 144 2 3 141 z = 144 2 3 141 140 z = 144 2 3 141 140 6 z = 144 2 3 141 140 6 7 z = 144 2 3 141 140 6 7 137 z = 144 2 3 141 140 6 7 137 136 z = 144 2 3 141 140 6 7 137 136 10 z = 144 2 3 141 140 6 7 137 136 10 11 z = 144 2 3 141 140 6 7 137 136 10 11 133 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 0 0 0 0 0 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 0 0 0 0 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 0 0 0 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 0 0 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 0 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 0 0 0 0 0 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 0 0 0 0 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 0 0 0 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 0 0 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 0 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 111 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 111 110 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 111 110 36 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 111 110 36 108 0 0 0 0 0 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 111 110 36 108 38 0 0 0 0 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 111 110 36 108 38 39 0 0 0 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 111 110 36 108 38 39 105 0 0 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 111 110 36 108 38 39 105 104 0 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 111 110 36 108 38 39 105 104 42 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 111 110 36 108 38 39 105 104 42 43 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 111 110 36 108 38 39 105 104 42 43 101 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 111 110 36 108 38 39 105 104 42 43 101 100 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 111 110 36 108 38 39 105 104 42 43 101 100 46 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 111 110 36 108 38 39 105 104 42 43 101 100 46 47 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 111 110 36 108 38 39 105 104 42 43 101 100 46 47 97 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 111 110 36 108 38 39 105 104 42 43 101 100 46 47 97 96 0 0 0 0 0 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 111 110 36 108 38 39 105 104 42 43 101 100 46 47 97 96 50 0 0 0 0 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 115 114 32 33 111 110 36 108 38 39 105 104 42 43 101 100 46 47 97 96 50 51 0 0 0 0 0 0 0 0 0 z = 144 2 3 141 140 6 7 137 136 10 11 133 13 131 130 16 17 127 126 20 21 123 122 24 25 119 118 28 29 ...

5   Pass
temp=ceil(8*rand)+3; x=ones(temp);r=2;c=2; M=BreakTheMatrix(x,r,c); assert(size(M,3)==(temp-1)^2); assert(all(arrayfun(@(a) isequal(M(:,:,a),ones(2)),1:size(M,3))))

z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = [] z = 1 z = 1 1 z = 1 1 1 0 z = 1 1 1 1 z = 1 1 1 1 z = []

6   Pass
x=eye(7);r=7;c=7; assert(isequal(x,BreakTheMatrix(x,r,c)))

z = 1 z = 1 0 z = 1 0 0 z = 1 0 0 0 z = 1 0 0 0 0 z = 1 0 0 0 0 0 z = 1 0 0 0 0 0 0 z = 1 0 0 0 0 0 0 0 0 0 0 0 0 0 z = 1 0 0 0 0 0 0 0 1 0 0 0 0 0 z = 1 0 0 0 0 0 0 0 1 0 0 0 0 0 z = 1 0 0 0 0 0 0 0 1 0 0 0 0 0 z = 1 0 0 0 0 0 0 0 1 0 0 0 0 0 z = 1 0 0 0 0 0 0 0 1 0 0 0 0 0 z = 1 0 0 0 0 0 0 0 1 0 0 0 0 0 z = 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0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