Problem 3473 · Medium

Sum of K Subarrays With Length at Least M

Pick k disjoint subarrays of length at least m with the largest total, using a row-by-row prefix DP.

Open the interactive visualisation