What is stack technique in dynamic programming and how to solve 1131G — Most Dangerous Shark using that technique?

Revision en1, by _Muhammad, 2019-03-05 18:29:32

What is stack technique in dynamic programming and how can I apply it to solve 1131G - Most Dangerous Shark. I can implement the dynamic programming solution of that problem which is mentioned in the editorial( and I know there is a typo ) but it will get TLE. And I don't know about stack technique to take minimum of dp state in a range. So someone please explain it or give me some useful links.

Thanks in advanced :)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English _Muhammad 2019-03-05 18:29:32 529 Initial revision (published)