Create MaxSumOnSegment