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

Автор Mohsina_Shaikh, история, 20 часов назад, По-английски

Can someone please explain how the dp transition works in the above problem.

https://cses.fi/problemset/task/1080

I tried reading editorial from https://usaco.guide/problems/cses-1080-empty-string/solution

But not able to understand why we need to (k−i+1)/2 and (j−i+1)/2. For removing substrings from range [i,j] would not (j-i+1)/2 be enough,why are we also multiplying with (k-i+1)/2

Awaiting responses.

Thanks ​

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