### rng_50216's blog

By rng_50216, 10 years ago,

Does anyone have implementation of BIT for following operations:

setmin(i, x) = a[i] := min(a[i], x)

getmin(l, r) = min(a[x], l <= x <= r)

Does anyone have implementation of BIT for following operations:

add(l, r, x) = a[i] += x, where l <= i <= r

getsum(l, r) = sum(a[i]), where l <= i <= r

• 0