Problem 3929 · Hard

Minimum Partition Score II

Split the array into k contiguous parts where a part of sum s costs s(s+1)/2, and find the cheapest total with a table of best costs.

Open the interactive visualisation