{"raw_statement":[{"iden":"problem statement","content":"You are given a string of length $N$, $S=S_1S_2\\dots S_N$, consisting of `0`, `1`, and `?`.\nWe like to replace every `?` with `0` or `1` so that all of the following conditions are satisfied.\n\n*   $S$ contains exactly $K$ occurrences of `1`.\n*   These $K$ occurrences of `1` are consecutive. That is, there is an $i\\ (1 \\leq i \\le N-K+1)$ such that $S_i=S_{i+1}=\\dots=S_{i+K-1}=$ `1`.\n\nDetermine whether there is exactly one way to replace the characters to satisfy the conditions.\nYou have $T$ test cases to solve."},{"iden":"constraints","content":"*   $1 \\leq T \\leq 10^5$\n*   $1 \\leq K < N \\leq 3 \\times 10^5$\n*   $S$ is a string of length $N$ consisting of `0`, `1`, and `?`.\n*   The sum of $N$ across the test cases is at most $3 \\times 10^5$."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$T$\n$\\mathrm{case}_1$\n$\\vdots$\n$\\mathrm{case}_T$\n\nEach case is in the following format:\n\n$N$ $K$\n$S$"},{"iden":"sample input 1","content":"4\n3 2\n1??\n4 2\n?1?0\n6 3\n011?1?\n10 5\n00?1???10?"},{"iden":"sample output 1","content":"Yes\nNo\nNo\nYes\n\nFor the first test case, turning $S$ into `101`, for instance, does not satisfy the conditions since the `1`s will not be consecutive. The only way to satisfy the conditions is to turn $S$ into `110`.\nFor the second test case, we may turn $S$ into `1100` or `0110` to satisfy the conditions, so there are two ways to satisfy them.\nFor the third test case, there is no way to replace the characters to satisfy the conditions."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}