Help me to make a data structure

Правка en1, от frostcloud, 2024-09-11 22:03:55

Create a data structure, that can:

  1. Add/subtract a number on a segment;
  2. Count amount of negative numbers on a segment.

How to solve it for $$$O(\sqrt{n})$$$ / $$$O(\log^2{n})$$$ / $$$O(\log{n})$$$ per query?

Теги data structures, range query

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский frostcloud 2024-09-11 22:03:55 239 Initial revision (published)