Minimum on the segment
Easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Write a program which manipulates a sequence with the following operations:
: change to .
: report the minimum element in .
Note that the initial values of are .
Input
The first line contains the number of elements in and the number of queries.
Then, the -th query is given in one of the following format:
The first digit represents the type of the query: denotes and denotes . It is known that .
Output
For each operation, print the minimum value on a separate line.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 34
Acceptance rate 29%