Nakochi's blog

By Nakochi, 10 years ago, In English

As the title said, I can't solve this problem even if I've read the tutorial. I can understood the idea of dp[x], the part that dp[x] is a monotone increasing function. But I can't figure out how to use it to solve the problem. Naive implement will cause TLE. Any hint? Thank you in advance. Here's the LINK to the problem.

  • Vote: I like it
  • +9
  • Vote: I do not like it