Finish 2003-11-12 15:00:00 UTC

diff2

by Walter Kuhn

Status: Passed
Results: pass
CPU Time: 0.321
Score: 102.0
Submitted at: 2003-11-05 15:57:22 UTC
Scored at: 2003-11-05 15:59:22 UTC

Current Rank: 82nd
Based on: cyclist_11 (diff)
Basis for: bug (diff)

Comments
Please login or create a profile.
Code
[m n]=size(a);
b=0;
for i=1:m
   for j=i:m
       for k=1:n-j+i
           c = a(i:j,k:k+j-i); c=c(:);
           s = sum(c);
           if ~diff(c) & s > b
               b = s;
           end
       end
   end
end