#P6578. [Ynoi2019] 魔法少女网站
[Ynoi2019] 魔法少女网站
Description
Amagai Kosame gives you a sequence of length . Define the sub-intervals of an interval as all intervals of the form , where are integers and .
There are operations:
1 x y: Modify the value at position to .
2 l r x: Query how many sub-intervals in have maximum value less than or equal to .
Input Format
The first line contains two integers . The second line contains integers representing the sequence.
Then follow lines, each in the form 1 x y or 2 l r x, describing each operation.
Output Format
For each operation of type 2, output one line with one number, representing the answer.
6 6
1 1 4 5 1 4
1 1 4
2 1 4 2
2 1 1 4
2 1 5 4
1 5 4
2 3 3 3
1
1
7
0
Hint
Idea: nzhtl1477, Solution: nzhtl1477, Code: ccz181078, Data: ccz181078
For of the testdata, , , , each element in the sequence is in , and all numbers are integers.
Translated by ChatGPT 5
京公网安备 11011102002149号