Code Festival B Union Find by tails

$`%(map{$y=$x;0while$_=${$x=$_}}sort/ \d+/g)?print$x-$y?NO:YES,$/:$x-$y?$$x=$y:0for<>

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

download

return to the top page