Range query problem

Revision en2, by lohitpt252003, 2025-11-05 09:32:58

You are given an arr (len(arr) <= 1e5) (-1e9 <= arr[i] <= 1e9) and q (<= 1e5) queries, now each query is of the form, (l, r, x) (1 <= l <= r <= len(arr), x can be any 32 bit integer) for each query u need to output the sum(arr[i]) such that l <= i <= r and arr[i] >= x.

I am stuck with this problem can anyone solve this problem?

Tags range query

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English lohitpt252003 2025-11-05 09:32:58 66
en1 English lohitpt252003 2025-11-05 09:32:14 287 Initial revision (published)