hieua3xyz's blog

By hieua3xyz, history, 3 years ago, In English

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$$$

Full text and comments »

  • Vote: I like it
  • +22
  • Vote: I do not like it