# Diffing "sirroN kcuhC 4" and "im39"

 Title: sirroN kcuhC 4 im39 Author: Hannes Naud ismail meri? can uygan Submitted: 2006-04-12 16:46:42 UTC 2006-04-12 16:50:42 UTC Status: Passed Passed Score: 841.609 841.38 Result: 83808 83808 CPU Time: 65.3496 64.8128 Code: ```function m=solver(tb,nM) [m,b]=l0(tb,nM,1);st=sum(sum(b));if(st > 800) [m,b]=l0(tb,nM,1);st=sum(b(:));if(st > 800) [m2,b]=l0(tb,nM,0.9);st2=sum(sum(b));if st210.5*nl1 I0=40;I1=.817;I2=2.93;I3=1.566;elseif (l3*l4)>8.5*nl1 I0=29;I1=.817;I2=2.93;I3=1.566;elseif l3*l4>=256 I0=26;I1=.951;I2=2.8;I3=1.4;else I0=26;I1=.945;I2=2.97;I3=1.46;end I1=I1*z;l2=nthroot(l2,I3);I4=ceil(I2*nl1/10);I5=floor(0.66*nl1);while 1 if l5==I5,l2=nthroot(l2,2/(1+I3));end [I6,I7,I8] = I9(l2);if isempty(I6),[O0,l2]=O1(l2); if O0(1) l5=l5+1;l1(l5,:)=O0;if(l5==nl1) break;end continue end break end if l50,ip);B(:,ip)=0;B(l3-numel(kp)+1:l3,ip)=kp;end end function [O0,L8]=O1(l2) [l3 l4]=size(l2);L7=[-1 l3 1 -l3];L9=l3*l4;O0=zeros(1,3);L8=l2;Q0=0;Q1=find(l2~=0)';Q2=numel(Q1); for kc=1:Q2 jj=Q1(kc);for Q3=1:4 np=jj+L7(Q3);if np>0 && np<=L9 && l2(np)>0 && l2(np)~=l2(jj) tl2=Q4(l2,jj,np);[Q5,Q6]=I9(tl2);if (~isempty(Q6)) if (max(Q6)> Q0) Q0=max(Q6);Q7=jj;Q8=Q3;Q9=np;end else for k2=max(1,kc-20):min(Q2,kc+20) W0=Q1(k2);for W1=1:4 np2=W0+L7(W1);if np2>0 && np2<=L9 && tl2(np2)>0 && tl2(np2)~=tl2(W0) W2=Q4(tl2,W0,np2);[W3,W4,W5]=I9(W2);if (~isempty(W4) && max(W4)>Q0) W6=false;[W7,W8]=max(W4);Y=W3(W8); while (W5(Y)~=Y) Y = W5(Y);if (Y==np || Y==jj) W6=true;end end if (Y==np || Y==jj) W6=true; end if (W6) Q0=max(W4);Q7=jj;Q8=Q3;Q9=np; end end end end end end end end end if (Q0>0) O0 = [mod(Q7-1,l3),ceil(Q7/l3)-1,Q8];L8=Q4(l2,Q7,Q9); end end function l2 = Q4(l2,el1,el2) l2([el1,el2]) = l2([el2,el1]); end end end```