need help in segment tree problem . . .

Правка en1, от MohammadParsaElahimanesh, 2021-08-04 10:48:12

Hello,

we have array A[n][n] and q queries. each time we get l r x means we should assign A[i][j] = x (l <= i,j <= r)

at end we want to know sum of elements in A, initially A[i][j] = 0

n <= 200'000

q <= 200'000

How we can solve this problem or what is the best time complexity we can reach?

thanks in advance

Теги #segment tree

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский MohammadParsaElahimanesh 2021-08-04 10:48:12 369 Initial revision (published)