Maximum Cyclic Segment Sum by ySas

#!perl -lpa
$a=$$,map$a[$a+=$_]="@F[0..$q++%@F]",@F=(pop@F,@F)for@F;@a=$_=pop@a

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

download

return to the top page