Chunky Munky has an array of
Each query is one of the following
1 p x
: Set .2 l r k
: Chunky Munky picks up , then all the way until , and would like to know the index of the first element he picks up with a value strictly less than . It's guaranteed that the value of will always be such that he will pick up a value strictly less than during the process.
Help Chunky Munky answer his queries!
Note that this problem will be online enforced, meaning that input will be given in an encrypted format. To encrypt the data, the values
Constraints
For all subtasks:
For
For
For all
Input Specification
The first line contains the integers
The second line contains the array
The next
Output Specification
For each query of type
Sample Input
10 5
3 1 4 1 5 9 2 6 5 3
2 6 10 6
2 2 14 1
2 6 2 6
1 0 14
2 7 3 7
Sample Input (Unencrypted)
10 5
3 1 4 1 5 9 2 6 5 3
2 6 10 6
2 5 9 6
2 3 7 3
1 4 10
2 3 7 3
Sample Output
7
5
4
7
Comments