ivplay's blog

By ivplay, 10 years ago, In English

This post is only for newbies. A very common trick with Cumulative Sum + BIT is discussed with some examples and problems. Here is the link Thanks for reading.

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

| Write comment?
»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Can u give some related problems...?

  • »
    »
    10 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You don't actually need ones. Just remember the idea how to count the number of elements in a multiset that lie between l and r. When you'll encounter this subproblem, use the algorithm that was explained here.

    I mean that IMHO it's not a good idea to look for a problem, for which you know in advance using what algorithm you'll solve it (exception: the case when you need to practise quick coding of a standard algorithm).

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it