Cody

Solution 677723

Submitted on 30 May 2015 by Alfonso Nieto-Castanon
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
%% A=[2 1 1 1 1;0 2 1 1 1;0 0 2 1 1;0 0 0 2 1;0 0 0 0 2]; assert(isequal(fairest_girl(A),1064));

2   Pass
%% A=[2 1;0 2]; assert(isequal(fairest_girl(A),1016));

3   Pass
%% assert(isequal(fairest_girl([2 1 0.5;0 2 0.5;0.5 0.5 2]),1016));

4   Pass
%% A=[2 1 1 1 1 1;0 2 1 1 1 1;0 0 2 1 1 1;0 0 0 2 0.5 0.5;0 0 0 0.5 2 0.5;0 0 0 0.5 0.5 2]; assert(isequal(fairest_girl(A),1080));

5   Pass
%% A=[2 0.5 1;0.5 2 0.5;0 0.5 2]; assert(isequal(fairest_girl(A),1016));

6   Pass
%% A=[2 1 1 1 1 1 1;0 2 1 1 1 1 1;0 0 2 1 1 1 1;0 0 0 2 0.5 0.5 1;0 0 0 0.5 2 0.5 1;0 0 0 0.5 0.5 2 1;0 0 0 0 0 0 2]; assert(isequal(fairest_girl(A),1096));

7   Pass
%% A=[2 1 1 1 1 1 0.5;0 2 1 1 1 1 0.5;0 0 2 1 1 1 0.5;0 0 0 2 0.5 0.5 0.5;0 0 0 0.5 2 0.5 0.5;0 0 0 0.5 0.5 2 0.5;0.5 0.5 0.5 0.5 0.5 0.5 2]; assert(isequal(fairest_girl(A),1080));