Cody

Solution 1007556

Submitted on 10 Oct 2016 by Marco Tullio
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
for k=1:20 x=randperm(k); assert(isequal(identity(x),x)); end assert(~isempty(strfind(fileread('identity.m'), 'diff')),'use diff')

z = [] z = -1 z = -2 1 z = -1 2 -3 z = -1 2 2 -1 z = -3 4 -5 3 -1 z = -3 1 -3 4 2 -5 z = 3 1 1 1 -5 1 5 z = 1 4 -2 3 -2 -2 5 -8 z = 2 -4 8 -2 -5 4 2 -4 6 z = -9 10 -7 2 -1 4 -6 5 -6 5 z = -6 1 4 -3 -6 8 -1 -4 -1 -1 10 z = 1 2 -5 4 7 -3 1 -3 -5 9 -11 8 z = 7 4 -2 -8 3 1 -3 4 -7 11 -2 -5 -5 z = -4 10 3 1 -13 2 8 -9 4 -1 2 5 -3 -1 z = -2 4 -1 8 -13 11 -1 2 -11 8 -1 6 -11 12 -8 z = -4 2 -1 2 -8 3 -6 2 -3 6 8 -12 3 11 -1 -7 z = Columns 1 through 16 -3 14 -1 -1 -2 6 1 -10 -2 -3 4 9 -11 4 3 -2 Column 17 -8 z = Columns 1 through 16 4 -5 -2 -1 -2 1 10 -4 6 1 -5 3 6 -14 11 2 Columns 17 through 18 -9 8 z = Columns 1 through 16 13 1 -11 13 -4 -2 -6 -2 3 10 -7 9 -11 12 -17 -2 Columns 17 through 19 8 2 2