Блог пользователя yshen94

Автор yshen94, история, 12 дней назад, По-английски

For submission #287793085, I used dp and matrix to solve the problem. it seems that the memory limit is exceed. I know that a lot of people solve the problem using a map, but I am still curious whether using dp and matrix could be a successful solution with modifications in some way.

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
12 дней назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I recommend you see this problem, this help you with D: https://cses.fi/problemset/task/1661

the solution: https://usaco.guide/problems/cses-1661-subarray-sums-ii/solution

Note: also we need of some greedy for select the intervals, only select the with the first end for having the most intervals, i forgot what called the problems is :/