#!perl -naF $a[${\map{map$d{$i,$'}=++$i*$'?1+${\sort{$b-$a}$d{$i-1,$'},$d{$i,$j=$'-1},$d{$i-1,$j}-/\Q$f[$j]/}:$i+$',$i=-//,@F}0..@f||(@f=@F)}].=$_}{print@a
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page