Winner Nicke (Revolution IV)

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

h13

by john arthur

Status: Passed
Results: pass
CPU Time: 17.294
Score: 172.0
Submitted at: 2003-11-06 17:53:08 UTC
Scored at: 2003-11-06 20:04:11 UTC

Current Rank: 2nd
Based on: h12 (diff)

Comments
Please login or create a profile.
Code
[h w b]=size(a);
p=h*w;
for k=';;;;;;;;;;;'
  for i=1:p
    c=i;   
    while i
      t = i+[1&mod(i,h) -(1&mod(i-1,h)) h -h];
      t(t<1|t>p)=i;
      i = t(a(t)==a(i)+1);
      j=nnz(i);
      if j
          i=i(ceil(j*rand));
      end
      c =[c; i];
   end

   if nnz(c)>nnz(b)
      b=c;
   end
end  
end