Maximum Cyclic Segment Sum by kaki

#!ruby -na
puts ((l=$F.size)..l*l).map{|i|($F*2)[i%l,i/l]}.max_by{|i|eval i*"+"}*" "

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

download

return top