non increasing subsequence by BioFALSE (author)

$mx=10;
while(<>){chomp;
@_=split//;
for(@_){
if ($mx>=$_){ $mx=$_; $k++ ; $a.=$_ }
else { $kx<$k and ($kx=$k, $b=$a); $a=""; $k=0; $mx=10; unshift@_,$_   }
}
$kx<$k and ($kx=$k , $b=$a); print "$b\n" ; $kx=0; $k=0; $mx=10
}

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

download

return to the top page