Empty String

Правка en3, от Mohsina_Shaikh, 2025-03-03 02:12:30

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 ​

Теги dp, strin

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский Mohsina_Shaikh 2025-03-03 02:12:30 44
en2 Английский Mohsina_Shaikh 2025-03-03 02:11:46 106 (published)
en1 Английский Mohsina_Shaikh 2025-03-03 02:11:14 618 Initial revision (saved to drafts)