You have an array of elements, indexed from to . There are operations you need to perform on it.
Each operation is one of the following:
1 l r vIncrement each value in the range by .
2 l r vMake each value in the range equal to (i.e. for each element , such that , set ).
3 l rOutput the minimum value in the range .
2, is guaranteed to be an integer in the range . Every value in the starting array is also guaranteed to be in this range.
The first line has and .
The second line has integers, the original array.
The next lines each contain an operation in the format described above.
For each operation of type
3, output the answer on its own line.
5 3 1 2 3 4 5 3 2 4 2 2 4 10 3 2 5