death_bringer's blog

By death_bringer, 3 years ago, In English

During Upsolving, I have seen that some problems can be solved using the prefix sum method way more easily and efficiently. Which topic is new for me. So, I tried practicing it from cses problemset but it has only 3-4 problems related to prefix sum and codeforces doesn't have any Prefixsum tag for problems.

So, What would be the best way to practice prefix sum problems.

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

| Write comment?
»
3 years ago, # |
  Vote: I like it +16 Vote: I do not like it

USACO Guide has a section on prefix sums, doing those problems is sufficient to get familiar with it. As you don't need to dig deep in this topic. There are far better and complex topics to learn about.

https://usaco.guide/silver/prefix-sums?lang=cpp