rng_50216's blog

By rng_50216, 12 years ago, In English

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

Full text and comments »

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