There is an array $$$A_1, A_2, \ldots, A_N$$$ consisting of $$$N$$$ integers, and $$$2$$$ binary strings $$$L$$$, $$$R$$$. There will be $$$Q$$$ updates, where in each update, the value of some element is changed. Before any updates and after each update, print the answer to the following problem:
Let's create an unoriented graph $$$G$$$ consisting of $$$N$$$ vertices. For each $$$i$$$, we add up to two edges:
It is guaranteed that the sum of $$$N$$$ over all test cases does not exceed $$$10^5$$$.
It is guaranteed that the sum of $$$Q$$$ over all test cases does not exceed $$$10^5$$$.
For each test, print $$$Q + 1$$$ lines, each consisting of one integer, the number of connected components. Note that the first line is the answer before any updates take place!
25 41 2 4 1 11010111011A 1 4A 1 1L 2 0A 5 34 41 1 1 011111111A 2 2R 1 0L 4 0A 4 1
3 3 3 3 2 2 3 3 3 2
| Name |
|---|


