Maximum Sum of M Non-Overlapping Subarrays I
Fill a table of best totals for each prefix and number of chosen subarrays, extending by one subarray of allowed length at a time.
Fill a table of best totals for each prefix and number of chosen subarrays, extending by one subarray of allowed length at a time.