[CDCR2015] - Jimmy is Late - Editorial

Problem Link :

Contest

Difficulty :
Cakewalk

Problem :
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.Print “YES” if Jimmy can reach his class without wetting his new shoes, and “NO” otherwise.

Explanation :
Jimmy cannot jump more than k-meters, so if k consecutive '#'s are present then answer is “NO”.