I have an array of a [] that stores the value and some queries:
1: L R : increases the numbers in range [L, R] to K.
2: L R : find i (L <= i <= R) with a [i]> = a [j] (L <= j <= R)
I think about using segment trees, can you help me ? Sorry for my poor English.