Блог пользователя adaptatron

Автор adaptatron, 5 недель назад, По-английски

Given an array, split it into $$$k$$$ disjoint consecutive blocks such that the value of $$$\sum a[i] \cdot blockIndex[i]$$$ is maximized.

I created a video discussing why the greedy strategy for this problem is not obvious. Here is the practice problem

https://youtu.be/y_lk5x4ZRNI

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится