classical dp problem, m subarray maximum sum, use two DP arrays