/
Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 100 点
問題文
o, x からなる長さ N の文字列 S と整数 L,R が与えられます。
S の L 文字目から R 文字目までが全て o であるかどうか判定してください。
制約
- 1\leq N \leq 100
- 1\leq L \leq R \leq N
- S は
o,xのみからなる長さ N の文字列 - N,L,R は全て整数
入力
入力は以下の形式で標準入力から与えられる。
N L R S
出力
S の L 文字目から R 文字目までが全て o なら Yes、そうでないなら No と出力せよ。
入力例 1
10 6 8 xoxxooooxo
出力例 1
Yes
S の 6 文字目から 8 文字目は全て o なので答えは Yes です。
入力例 2
9 6 8 xoxxoxoox
出力例 2
No
6 文字目が x なので答えは No です。
Score : 100 points
Problem Statement
You are given a string S of length N consisting of o and x, and integers L and R.
Determine whether all characters from the L-th through the R-th character of S are o.
Constraints
- 1\leq N \leq 100
- 1\leq L \leq R \leq N
- S is a string of length N consisting of
oandx. - N, L, and R are all integers.
Input
The input is given from Standard Input in the following format:
N L R S
Output
If all characters from the L-th through the R-th character of S are o, output Yes; otherwise, output No.
Sample Input 1
10 6 8 xoxxooooxo
Sample Output 1
Yes
All characters from the 6-th through the 8-th character of S are o, so the answer is Yes.
Sample Input 2
9 6 8 xoxxoxoox
Sample Output 2
No
The 6-th character is x, so the answer is No.