PROGRAMMING:Xiao Shuai piling
Shuai recently came up with a strange idea when he was driving piles. Please help me: * given a row of pits with n points, you can drive piles into or pull piles out of the pits. Shuai will randomly drive or pull piles out of a certain pit, After each operation, he will ask you from time to time how many continuous piles you have**
###Input format:
Enter an integer n, m, which means that there are n pits in this row (1 < = n < = 1e6), m operations (including inquiry) (1 < = m < = 1E7);
There are n numbers in the next row, 0 means that there are no piles driven in the current pit, and 1 means that the piles have been driven in the current pit.
Next, m lines, two integers OP and IDX in each line( op ∈ { 0 , 1 , 2 } , 1 <= idx <= n )
OP = 0, pull out the pile in the pit at position IDX;
OP = 1, driving a new pile into the pit at position IDX;
OP = 2, ask how many continuous piles there are, ignore the meaning of IDX value, but still read its scanf. In particular, for the driven piles, if Xiaoshuai drives them again, he will not drive new piles and keep the original piles unchanged; And Xiao Shuai may go to the pit where there are no piles.
###Output format:
Output the number of continuous piles after each query.
###Input example:
```in
5 7
1 0 1 1 0
2 1
1 1
2 3
0 2
2 3
1 2
2 0
```
###Output example:
```out
two
two
two
one
```
Example explanation:
Initially, there are only two segments 1 and 1
After 1 1, it remains unchanged
After 0.2, it is still 10.1.0
After 1 2 is 1 0, there is only one section left
answer:If there is no answer, please comment
###Input format:
Enter an integer n, m, which means that there are n pits in this row (1 < = n < = 1e6), m operations (including inquiry) (1 < = m < = 1E7);
There are n numbers in the next row, 0 means that there are no piles driven in the current pit, and 1 means that the piles have been driven in the current pit.
Next, m lines, two integers OP and IDX in each line( op ∈ { 0 , 1 , 2 } , 1 <= idx <= n )
OP = 0, pull out the pile in the pit at position IDX;
OP = 1, driving a new pile into the pit at position IDX;
OP = 2, ask how many continuous piles there are, ignore the meaning of IDX value, but still read its scanf. In particular, for the driven piles, if Xiaoshuai drives them again, he will not drive new piles and keep the original piles unchanged; And Xiao Shuai may go to the pit where there are no piles.
###Output format:
Output the number of continuous piles after each query.
###Input example:
```in
5 7
1 0 1 1 0
2 1
1 1
2 3
0 2
2 3
1 2
2 0
```
###Output example:
```out
two
two
two
one
```
Example explanation:
Initially, there are only two segments 1 and 1
After 1 1, it remains unchanged
After 0.2, it is still 10.1.0
After 1 2 is 1 0, there is only one section left
answer:If there is no answer, please comment