Finish 2010-05-05 12:00:00 UTC

Local Average

by Chethan C U

Status: Passed
Results: 25961978 (cyc: 3, node: 165)
CPU Time: 117.166
Score: 53150.0
Submitted at: 2010-04-28 19:33:14 UTC
Scored at: 2010-04-29 00:28:44 UTC

Current Rank: 3705th (Highest: 17th )
Basis for: dry run (diff)

Comments
Chethan C U
28 Apr 2010
trial 4 -- fixed for last iteration
Alan Chalker
10 May 2010
This entry was submitted during the Darkness phase
Alan Chalker
11 May 2010
This entry gets a result of 34907282 on the test suite (8945304 more than the contest suite). It has a ranking of 3715 compared to all other entries run against the test suite according to the data set provided by Jan Keller.
Please login or create a profile.
Code
function Aest = solver(imageSize, queryLimit)
    

    Aest = zeros(imageSize);
    Mask = false*zeros(imageSize);
    m=ceil((imageSize*imageSize)/queryLimit);
    for ii=1:floor((imageSize*imageSize)/m)
%         try
            Mask = false*zeros(imageSize);
          if ii~=floor((imageSize*imageSize)/m)
        Mask((ii-1)*m+1:ii*m)=true*ones(m,1);
          else 
          Mask((ii-1)*m+1:end)=true*ones(length(Mask((ii-1)*m+1:end)),1);   
          end
        LocalSum=queryImage(logical(Mask));
        LocalAvg= round(LocalSum/m);
        Aest((ii-1)*m+1:ii*m)=LocalAvg*ones(m,1);
%         catch me
%         disp('error')
%         end
    end
    
end