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?