How can dp be applied to this? (AcidRain)

Revision en1, by aopo, 2021-12-16 11:07:04

AcidRain

I tried solving it using the fact that there must be some collection of shield which should cover the entire range (B to E), but got the wrong answer. The tag says it to be related to dynamic programming. But how? I don't know. Can someone give any approach to how can it be solved with dp?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English aopo 2021-12-16 11:07:04 428 Initial revision (published)