Maximum Cyclic Segment Sum by murky-satyr

oo{a=gt./.m &:toi
s a.sz.j([]){|r,i|r+(a*2).e_(i+1).to}.m_{|s|s.ij:+}*' '}

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

download

return top