There are $$$n$$$ cells in a row, represented by a binary string $$$s$$$ of length $$$n$$$: 0 denotes white and 1 denotes black.
In one operation, you may toggle the color of one cell. You may perform at most $$$b$$$ operations. A black segment is a maximal nonempty contiguous segment of black cells. Find the minimum possible number of black segments after the operations.
Each test contains multiple test cases. The first line contains the number of test cases $$$T$$$ ($$$1 \le T \le 10000$$$). Description of the test cases follows.
The first line contains two integers $$$n$$$ and $$$b$$$ ($$$1 \le n \le 2 \cdot 10^5$$$, $$$0 \le b \le n$$$).
The second line contains a binary string $$$s$$$ of length $$$n$$$.
The sum of $$$n$$$ over all test cases does not exceed $$$2 \cdot 10^5$$$.
For each test case, output one line containing the answer.
Print one integer: the minimum possible number of black segments.
49 21110101117 010101015 30010012 2011010001101
1402
In the first test case, changing cells $$$4$$$ and $$$6$$$ to black produces 111111111, which has one black segment.
In the second test case, no operation is allowed, so the four original black segments remain.
In the third test case, changing the only black cell to white removes all black segments.
In the fourth test case, changing cells $$$4$$$ and $$$11$$$ to black leaves two black segments, achieving the optimum $$$2$$$.
| Name |
|---|


