Empty String

Revision en2, by Mohsina_Shaikh, 2025-03-03 02:11:46

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.

Awaiting responses.

Thanks ​

Tags dp, strin

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English Mohsina_Shaikh 2025-03-03 02:12:30 44
en2 English Mohsina_Shaikh 2025-03-03 02:11:46 106 (published)
en1 English Mohsina_Shaikh 2025-03-03 02:11:14 618 Initial revision (saved to drafts)