Yousef is at the entrance of a long hallway with $$$n$$$ doors in a row, numbered from $$$1$$$ to $$$n$$$. He needs to pass through all the doors from $$$1$$$ to $$$n$$$ in order of numbering and reach the exit (past door $$$n$$$).
Each door can be open or closed. If a door is open, Yousef passes through it in $$$1$$$ second. If the door is closed, Yousef can't pass through it.
However, Yousef has a special button which he can use at most once at any moment. This button makes all closed doors become open for $$$x$$$ seconds.
Your task is to determine if Yousef can pass through all the doors if he can use the button at most once.
The first line of the input contains an integer $$$t$$$ ($$$1 \le t \le 1000$$$) — the number of test cases.
The first line of each test case contains two integers $$$n, x$$$ ($$$1 \le n, x \le 10$$$) — the number of doors and the number of seconds of the button, respectively.
The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, ..., a_n$$$ ($$$a_i \in \{0, 1\}$$$) — the state of each door. Open doors are represented by '0', while closed doors are represented by '1'.
It is guaranteed that each test case contains at least one closed door.
For each test case, output "YES" if Yousef can reach the exit, and "NO" otherwise.
You can output the answer in any case (upper or lower). For example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as positive responses.
74 20 1 1 06 31 0 1 1 0 08 81 1 1 0 0 1 1 11 215 11 0 1 0 17 40 0 0 1 1 0 110 30 1 0 0 1 0 0 1 0 0
YES NO YES YES NO YES NO
In the first test case, the optimal way is as follows:
In the second test case, Yousef has a 3-second button, but he would need at least a 4-second button to reach the exit. Therefore, the answer is NO.
In the third test case, Yousef can turn on the button before starting to move. All the doors will stay open until he reaches the exit.