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

Автор adaptatron, 4 часа назад, По-английски

You are given a string. In one operation, you can delete a contiguous substring of identical characters by paying some cost. What is the minimum cost to delete the entire string when:

  • Cost is 1 regardless of the substring length.
  • Cost is equal to the length of the substring.
  • Cost is equal to $$$len^2$$$.

I created a video discussing the ideas used in this problem.

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