Maximum Cyclic Segment Sum by Mithran

#!perl -pa
use List::Util'/^/';$_=max map{$w=$_;map{sum(@s=(@F,@F)[$_..$_+$w])."
@s
"}@_}@_=0..$#F;s/.+
//

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

download

return to the top page