Under construction

Still being built. Things may change

Rick-Roll Virus

Interview

Time limit2sMemory limit1024 MB

Summary
Given a line of N people with infected ones marked R, decide whether M cures can stop the virus that spreads K cells per day.
Level

Medium4 of 10

Topics
Greedy, Intervals
Solved
No attempts yet

Problem

In 2033, while a vote to pick the top meme in Harunaland ends with Rick Astley as the winner, the Rick-Roll Virus spreads through Harunaland. Anyone infected hums Never gonna give you up without fail, so haru_202 wants to stop the virus.

NN people live in a straight line, each one next to the next. An infected person at x=ix=i passes the virus after 1 day to the people at x=max⁡(1,i−K)x = \max(1, i-K), ⋯\cdots, ii, ⋯\cdots, min⁡(N,i+K)\min(N, i+K).

After 1 day, can haru_202 cure every infected person with MM doses of the cure? Each person can receive only one dose.

Input

The first line contains integers NN, MM, and KK separated by spaces. (1≤N≤10 000;(1 \leq N \leq 10\,000; 0<M≤N;0 < M \leq N; 0≤K≤⌊N2⌋)0 \leq K \leq \lfloor\frac{N}{2}\rfloor)

The second line contains a string SS of length NN that shows the infection status of each person. SiS_i is the status of the person at x=ix=i as follows. (1≤i≤N)(1 \leq i \leq N)

  • .: not infected
  • R: infected

Output

After 1 day, print Yes if haru_202 can cure every person infected by the Rick-Roll Virus with MM doses of the cure, otherwise print No.

Examples2

  1. Example 1

    Input
    5 3 1
    ..R..
    
    Expected output
    Yes
    
  2. Example 2

    Input
    10 1 1
    RRRRRRRRRR
    
    Expected output
    No