Simple dp

Revision en1, by Domonion, 2017-02-10 15:31:52

You are given a sequence A1, A2, ... , An,  - 1000 ≤ Ai ≤ 1000, 1 ≤ n ≤ 1000.

You can split this sequence into contiguous non-empty parts

.

Your task is to find the maximum value . If k = 1 then sum equal to 0.

Can anyone help me come up with solution?

Tags dp, dynamic programming, problem

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
ru1 Russian Domonion 2017-02-10 15:43:27 581 Первая редакция перевода на Русский
en1 English Domonion 2017-02-10 15:31:52 479 Initial revision (published)