Lazy

Revision en2, by _Bunny, 2024-08-19 05:11:26

Problem: Given an array a1, a2, ..., an (1 <= n <= 1e6) and q queries, for each query has two types.

1 l r x: a[i] = min(a[i], x) (l <= i <= r).

2 i : print value in position i.

I dont know use lazy update to solve operator 1, help me pls (sorry i'm poor E).

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English _Bunny 2024-08-19 05:11:26 5
en1 English _Bunny 2024-08-19 05:11:00 268 Initial revision (published)