Code Festival B Union Find by angel

<>;($n,$x,$y)=sort(map{$_-=$"while$"=$m[$_];$_}split),$n?print$y-$x?NO:YES,$/:($m[$y]=$y-$x)for<>

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page