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.
# | User | Rating |
---|---|---|
1 | tourist | 3682 |
2 | ecnerwala | 3603 |
3 | Benq | 3549 |
4 | Radewoosh | 3494 |
5 | Petr | 3452 |
6 | ksun48 | 3413 |
7 | maroonrk | 3406 |
8 | Miracle03 | 3314 |
9 | scott_wu | 3313 |
10 | Um_nik | 3299 |
# | User | Contrib. |
---|---|---|
1 | 1-gon | 214 |
2 | Errichto | 188 |
3 | awoo | 187 |
3 | rng_58 | 187 |
5 | SecondThread | 184 |
6 | Um_nik | 177 |
7 | Ashishgup | 176 |
8 | maroonrk | 173 |
9 | antontrygubO_o | 171 |
10 | -is-this-fft- | 169 |
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.
Name |
---|
Can u give some related problems...?
You don't actually need ones. Just remember the idea how to count the number of elements in a multiset that lie between
l
andr
. 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).
https://codeforces.com/contest/474/problem/D
I think this one is similar https://atcoder.jp/contests/abc107/tasks/arc101_b
Well written.