| Hello 2026 |
|---|
| Finished |
This is the easy version of the problem. The difference between the versions is that in this version, the restriction on the number of 1's remaining in the final string is more lenient. You can hack only if you solved all versions of this problem.
You are given a binary string $$$s_1s_2\ldots s_n$$$ containing only characters 0 and 1. You may perform $$$\lfloor\frac{n}{2}\rfloor$$$ operations. On the $$$x$$$-th operation, you may perform the following:
Your task is to find a series of operations such that the number of 1's remaining in the binary string is at most $$$15$$$. It can be shown that under the constraints of this problem, this is always possible.
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 10^5$$$). The description of the test cases follows.
The first line of each test case contains an integer $$$n$$$ ($$$3 \leq n \leq 2\cdot 10^6$$$).
The second line of each test case contains a binary string $$$s_1s_2\ldots s_n$$$ ($$$s_i \in \{0,1\}$$$).
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\cdot 10^6$$$.
For each test case, output $$$\lfloor\frac{n}{2}\rfloor$$$ numbers on a new line: the chosen $$$l$$$ for operation $$$1,2,\ldots,\lfloor\frac{n}{2}\rfloor (0 \leq l_x \leq n-x)$$$. You should guarantee that after all operations, there are at most $$$15$$$ 1 remaining in the string.
If there are multiple solutions, output any.
6300041101511101911111111110111111101115110011101010100
0 1 1 1 3 6 2 0 2 1 0 0 0 0 13 6 8 5 2 8 1
In the fourth test case:
| Name |
|---|


