(help) Range updates + range queries on how many occurrences

Правка en1, от babin, 2019-06-14 00:10:45

Suppose we are given a constant c in the beginning and an array. We have range updates(add a value on a range) and range queries(how many occurrences of c are there in a given range?). Is it possible to effectively perform these queries? I know how to do that for counting the number of minimums/maximums, but I'm not sure how to do that for a constant c given in the beginning. Thanks in advance.

Теги data structures

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский babin 2019-06-14 00:17:27 19 Tiny change: ' not sure how to do that f' -> ' not sure if there is a way do that f'
en1 Английский babin 2019-06-14 00:10:45 470 Initial revision (published)