#ds201. 线段树1
线段树1
Segment Tree 1
Problem Description
You are given numbers .
You must support operations:
1 x d: set .2 l r: query , and find how many times this minimum occurs.
Input Format
The first line contains two integers and ().
The next line contains integers ().
The following lines each describe an operation of the form 1 x d or 2 l r, with , , and .
Output Format
For each query, output one line with two numbers: the minimum value and how many times it occurs.
Sample Input
5 5
1 2 3 4 5
2 4 5
1 5 1
2 1 5
1 2 3
2 2 4
Sample Output
4 1
1 2
3 2
Constraints
, , , .