Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

How to optimize this recurrence?
Difference between en1 and en2, changed 15 character(s)
Is there any optimisation for this given recurrence↵


~~~~~↵
DP[i][j] = 
min(DP[k][j - 1] + sum of arr(i to k - 1), DP[i][j]);↵
{0 <= i < n}↵
{i < k < n}↵
{0 <= j <= B}↵
~~~~~↵





History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English tony_sterk 2020-05-11 20:40:47 15
en1 English tony_sterk 2020-05-11 20:17:13 206 Initial revision (published)