Jimmy is Late
All submissions for this problem are available.
Jimmy over slept and is late for class! But it had rained earlier, and the roads are filled with puddles.
The diatance between hostel and classrooms is N meters. Jimmy doesn’t like to wet his new shoes, so he decides
to jump over the puddles. Unfortunately, Jimmy cannot jump more than K meters.
Help Jimmy! Tell his if he can reach his class without wetting his new shoes.
First line contains the number of test cases T.
For each test case the first line 2 contains integers N and K.
The next line contains a string of length N. If the i'th character is '#' means there is a puddle at i'th meter and '.' if its dry.
Print "YES" if Jimmy can reach his class without wetting his new shoes, and "NO" otherwise.
Input: 2 5 3 .###. 6 2 .#.#.# Output: NO YES
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, CLOJ, FS|
Fetching successful submissions