Question about queries?

Правка en1, от MODDI, 2023-12-11 01:25:12

Let's say we have an array of size N(N <= 100000) and Q queries (Q <= 100000), where each query is either:

  • Add(l, r, x), add x to every element between l and r
  • Query(l, r) — number of elements that are zero between l and r

Each add operation is performed under a certain (fixed) modulo m. Any ideas on how this can be done?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский MODDI 2023-12-11 01:25:12 372 Initial revision (published)