need help in segment tree problem . . .

Revision en1, by MohammadParsaElahimanesh, 2021-08-04 10:48:12


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

Tags #segment tree


  Rev. Lang. By When Δ Comment
en1 English MohammadParsaElahimanesh 2021-08-04 10:48:12 369 Initial revision (published)