## Strict Evaluation

View as PDF

Points: 17
Time limit: 0.6s
Memory limit: 256M

Author:
Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

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 v Increment each value in the range by .
• 2 l r v Make each value in the range equal to (i.e. for each element , such that , set ).
• 3 l r Output the minimum value in the range .

In operations 1 and 2, is guaranteed to be an integer in the range . Every value in the starting array is also guaranteed to be in this range.

#### Input Specifications

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.

#### Output Specification

For each operation of type 3, output the answer on its own line.

#### Sample Input

5 3
1 2 3 4 5
3 2 4
2 2 4 10
3 2 5

#### Sample Output

2
5

Can this be called Segment Tree Test 2?