Reverse BWT by daira

<?for(;$s=trim(fgets(STDIN));print$c[$a]."
")for(list($a,$b)=split(" ",$s),$c=$b=str_split($b),$i=0;sort($c)&count($c)>++$i;)foreach($b as $k=>$v)$c[$k]=$b[$k].$c[$k];

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

download

return to the top page