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

2buggy

by Walter Kuhn

Status: Passed
Results: pass
CPU Time: 0.161
Score: 104.0
Submitted at: 2003-11-05 16:41:43 UTC
Scored at: 2003-11-05 17:41:01 UTC

Current Rank: 96th
Based on: buggy (diff)

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