This problem cannot be dp ?

Revision en2, by hieua3xyz, 2023-09-17 18:38:12

Given $$$n$$$ elements $$$a_i$$$

Each operation can increase or decrease an element by one unit.

Ask for the minimum number of operations so that two consecutive elements have a difference less than $$$k$$$.

Let $$$n \le 100; \;a_i, k \le 10^9$$$

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English hieua3xyz 2023-09-17 18:41:07 0 (published)
en2 English hieua3xyz 2023-09-17 18:38:12 28 (saved to drafts)
en1 English hieua3xyz 2023-09-17 18:35:49 248 Initial revision (published)