Maximum Cyclic Segment Sum by leonid

#!ruby -pa
d=$F*m=2
$F.fill{|i,*s|$F.map{s<<d[i+=1];x=eval s*"+";m<x&&$_=s*" "+$/%m=x}}

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

download

return top