bash.ketchum's blog

By bash.ketchum, history, 2 years ago, In English

I've been trying to solve the DP section of CSES problemset and I noticed that usually the problems give TLE verdict if we're solving the problems using recursive DP. Am I doing something wrong, or the time limit is actually really strict?

Here is my solution for the problem Book Shop. Is there any way I can make my recursive solution faster?

Spoiler

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it