Diffing "probably not the shortest - tweak" and "12th try!"

Title: probably not the shortest - tweak 12th try!
Author: Christopher Cheng Mohsen Nosratinia
Submitted: 2003-11-06 11:35:39 UTC 2003-11-06 12:38:43 UTC
Status: Passed Passed
Score: 193.0 191.0
Result: pass pass
CPU Time: 6.86 6.92
Code:
w=(b(:,1)+1)*inf;
w=(b(:,1)+1)/0;
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 all(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};