segment tree question

Revision en1, by _QWOiNYUIVMPFSBKLiGSMAP_, 2018-12-16 05:54:06

IF you have ranges and you want to query on how many elements in this range but every cell have to contain at most one element and the updates are on the range whether be +1 or -1. this could be done with segment tree and how ?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English _QWOiNYUIVMPFSBKLiGSMAP_ 2018-12-16 05:54:06 250 Initial revision (published)