Time limit: 4s
Memory limit: 512MB
Input:
Output:
Task
You are given , , an array of elements , and queries of the following types:
1 poz x
: The element is changed to .2 l r
: Display 3 indices such that , where and are pairwise distinct. If there are no such 3 indices, display0 0 0
.
Input data
The first line contains two integers, and . The next line contains the array of natural numbers. The following lines contain the queries.
Output data
For each query of type 2, output the answer on a new line.
Constraints and clarifications
# | Points | Constraints |
---|---|---|
1 | 13 | |
2 | 18 | |
3 | 22 | |
4 | 47 | No additional constraints |
Example
stdin
4 4
1 2 2 1
2 1 3
1 1 2
2 1 3
2 1 4
stdout
2 1 3
0 0 0
2 4 3
Explanation
In the interval , if , , and , we get , which is true, so we can output 2 1 3
. Note that this is not the only solution.
The element at position is changed to .
In the interval , there are no 3 indices such that , so we output 0 0 0
.