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

pnts_2_3

by Stijn Helsen

Status: Passed
Results: pass
CPU Time: 6.159
Score: 183.0
Submitted at: 2003-11-06 12:49:47 UTC
Scored at: 2003-11-06 15:35:31 UTC

Current Rank: 8th
Based on: pnts_2_2 (diff)

Comments
Please login or create a profile.
Code
w=b(:,1)+99;
p={1};
q=1;
while q
    r={};
    s=[];
    for i=find(q)
        y=p{i};
        z=y(end);
        g=q(i);
        if g<w(z)
            w(z)=g;
            f{z}=y;
        end
        for j=find(a(z,:))
            if j~=y
                r=[r {[y j]}];
                s=[s g+norm(b(z,:)-b(j,:))];
            end
        end
    end
    p=r;
    q=s;
end
[i j]=max(w);
c=f{j};