Maximum Cyclic Segment Sum by murky-satyr

#!ruby -na
c=[]
i=0
$F.map{c+=($F*2).map(&:to_i).each_cons(i+=1).to_a}
puts c.max_by{|s|s.inject:+}*' '

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

download

return top