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

Автор ivplay, 10 лет назад, По-английски

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.

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

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

Can u give some related problems...?

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

    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).

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