Please read the new rule regarding the restriction on the use of AI tools. ×

Segment Tree lazy propagation

Revision en4, by Saber.HMN, 2019-07-08 20:29:18

Given an array of size N.There can be multiple queries of the following types. 1 . Update(l, r, x) : Increment the a[i] (l <= i <= r) with value x. 2 . query(l, r): Find index of the maximum value in the array in a range l to r (both are included).

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English Saber.HMN 2019-07-08 20:29:18 291
en3 English Saber.HMN 2019-07-08 17:38:17 7
en2 English Saber.HMN 2019-07-08 17:36:33 8
en1 English Saber.HMN 2019-07-08 17:35:40 296 Initial revision (published)