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

See if it (2)...

by Bowen Kerins

Status: Passed
Results: pass
CPU Time: 0.36
Score: 98.0
Submitted at: 2003-11-05 16:02:56 UTC
Scored at: 2003-11-05 16:10:30 UTC

Current Rank: 40th
Based on: See if this works... (diff)

Comments
Bowen Kerins
05 Nov 2003
... taking advantage of brilliant b = 1 assignment.
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);
           x = c(1);
           s = x*nnz(c);
           if c==x & s > b
               b = s;
           end
       end
   end
end