/
実行時間制限: 1 sec / メモリ制限: 256 MiB
配点 : 100 点
問題文
このコンテストの名前はCODEFESTIVALで、いくつかの文字を消すとCFという文字列にすることが出来ます。
好奇心旺盛な高橋君は、他の文字列に対してもこのようにCFを得られるか気になりました。
英大文字アルファベットからなる文字列sが与えられるので、sからいくつかの文字を消してCFという文字列にすることが出来るか判定してください。
制約
- 2≦|s|≦100
- sは英大文字(
A-Z)のみからなる文字列である
入力
入力は以下の形式で標準入力から与えられる。
s
出力
sからいくつかの文字を消してCFという文字列にすることが出来るならYesを、そうでないならNoを出力せよ。
入力例 1
CODEFESTIVAL
出力例 1
Yes
1文字目のCと5文字目のFを残して消すことでCFが得られます。
入力例 2
FESTIVALCODE
出力例 2
No
FCなら得ることが出来ますが、文字の順番を変えることは出来ないので、この場合はCFを作ることが出来ません。
入力例 3
CF
出力例 3
Yes
一文字も消さないこともありえます。
入力例 4
FCF
出力例 4
Yes
1文字目を消すことで得られます。
Score : 100 points
Problem Statement
This contest is CODEFESTIVAL, which can be shortened to the string CF by deleting some characters.
Mr. Takahashi, full of curiosity, wondered if he could obtain CF from other strings in the same way.
You are given a string s consisting of uppercase English letters.
Determine whether the string CF can be obtained from the string s by deleting some characters.
Constraints
- 2 ≤ |s| ≤ 100
- All characters in s are uppercase English letters (
A-Z).
Input
The input is given from Standard Input in the following format:
s
Output
Print Yes if the string CF can be obtained from the string s by deleting some characters.
Otherwise print No.
Sample Input 1
CODEFESTIVAL
Sample Output 1
Yes
CF is obtained by deleting characters other than the first character C and the fifth character F.
Sample Input 2
FESTIVALCODE
Sample Output 2
No
FC can be obtained but CF cannot be obtained because you cannot change the order of the characters.
Sample Input 3
CF
Sample Output 3
Yes
It is also possible not to delete any characters.
Sample Input 4
FCF
Sample Output 4
Yes
CF is obtained by deleting the first character.