Segment Tree Problem

Revision en1, by rickgrimes07, 2025-03-27 08:44:30

Given an array of positive integers , you have to perform Q queries . Each query can be of two types , 1 L X 0 , set arr[L]=X;

and other type be 2 L R X , find index p such that arr[p]<=X and if there is no such p , print -1.

arr size and Q are of order 1e5

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English rickgrimes07 2025-03-27 08:44:30 285 Initial revision (published)