In a high-tech industrial facility, a series of nuclear reactors are arranged in a linear configuration. Each reactor operates under strict pressure regulations to ensure safety and efficiency. To prevent critical failures, each reactor has a specific maximum pressure limit. When a reactor's internal pressure reaches or exceeds this limit, a controlled pressure release (venting) is initiated. This system requires sophisticated management due to dynamic operational adjustments and the need for continuous monitoring.
You are tasked with designing and implementing a system to manage the pressure of a line of $$$n$$$ reactors. Each reactor, indexed from $$$1$$$ to $$$n$$$, has an initial maximum pressure limit $$$p_i$$$. All of the reactors' initial pressure are $$$0$$$. The system must support two types of operations:
The first line contains two integers $$$n$$$ and $$$q$$$, representing the number of reactors and the number of operations, respectively.
The second line contains $$$n$$$ integers, the $$$i$$$-th integer $$$p_i$$$ represents the initial maximum pressure limit of the $$$i$$$-th reactor.
The following $$$q$$$ lines describe the operations. Each line begins with an integer $$$op$$$.
For each query that $$$op = 2$$$, print a single integer on a new line, representing the total number of venting operations that have occurred among all reactors within the specified range since the beginning of the system's operation.
10 55 10 23 45 10 45 65 10 68 91 5 10 6641 2 9 52 4 101 8 8 52 1 10
8 9
10 1079 26 9 28 13 40 26 54 69 191 1 5 61 5 7 22 4 71 9 10 192 5 71 5 7 272 10 102 9 91 6 6 201 3 8 6
0 0 1 0
10 1056 29 49 42 47 21 23 54 8 312 9 91 5 6 232 6 72 4 71 5 6 682 1 92 3 61 2 10 892 6 81 3 6 53
0 1 1 3 3 5
| Name |
|---|


