Problem:


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.



Sample input:
CODEFESTIVAL


Sample output:
Yes

Submission status: Accepted

Solution code:
s = input()
n = len(s)
cnt = 0
for i in range(n):
  if cnt == 0 and s[i] == 'C':
    cnt += 1
  elif cnt == 1 and s[i] == 'F':
    cnt += 1
    break
if cnt >= 2:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
import re

print('Yes' if re.match('.*C.*F.*',input()) else 'No')

Submission status: Accepted

Solution code:
S = input()
a= S.find('C')
b= S.find('F',a+1)
print('Yes') if a>=0 and b>=0 and a<b else print('No')

Submission status: Accepted

Solution code:
s = input()
now = ["C","F"]
now_k = 0
flag = 0
for i in range(len(s)):
    if s[i] == now[now_k]:
        now_k += 1
        if now_k == 2:
            print("Yes")
            flag = 1
            break
if flag == 0:
    print("No")

Submission status: Accepted

Solution code:
# coding: utf-8

text = input().rstrip()
c_index = text.find("C")
f_index = text.find("F", c_index)

print("Yes" if (0 <= c_index < f_index and f_index >= 0) else "No")

Submission status: Accepted

Solution code:
s=list(input())
c=False
for x in s:
    if not c:
        if x=="C":c=True
    if c and x=="F":
        print("Yes")
        exit(0)
print("No")

Submission status: Accepted

Solution code:
s = input()
if s.find('C') >= 0 and s.find('F') >= 0:
    if s.index('C') < s.rindex('F'):
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Accepted

Solution code:
s=input()
s_len=len(s)
ans="No"
for i in range(s_len-1):
    if s[i]=="C":
        if "F" in s[i+1:]:
            ans="Yes"
print(ans)

Submission status: Accepted

Solution code:
S=input()
A=S.find("C")
print("YNeos"[not(A>=0 and S.find("F", A+1)>=0)::2])

Submission status: Accepted

Solution code:
s = input()
ss = ""
p = 0
for i in range(len(s)):
    if p == 0 and s[i] == "C":
        p = 1
    elif p == 1 and s[i] == "F":
        p = 2
print("Yes" if p == 2 else "No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import re
s = input()
m = re.findall(r"C.*F", s)
print("Yes") if m else print("No")

Submission status: Accepted

Solution code:
s = input()
if s.find("C") != -1 and s.find("F") != -1 :
    print("Yes" if s.find("C") < s.rfind("F") else "No")
else :
    print("No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
s = input()
c_bit = 0
for i in range(len(s)):
    if c_bit and s[i] == "F":
        print("Yes")
        exit()
    if s[i] == "C":
        c_bit = 1
print("No")

Submission status: Accepted

Solution code:
S = input()

a = 0

for i in S:
  if a == 0 and i == "C":
    a += 1
  if a == 1 and i == "F":
    a += 1
    
if a == 2:
  print ("Yes")
else:
  print ("No")

Submission status: Accepted

Solution code:
s=input()
n=len(s)
c=0
for i in range(n):
  if c==1 and s[i]=="F":
    print("Yes")
    exit()
  if c==0 and s[i]=="C":
    c+=1
print("No")

Submission status: Accepted

Solution code:
s = input()
ans = []

for i in range(len(s)):
  if len(ans) == 0 and s[i] == 'C':
    ans.append(s[i])
  elif len(ans) == 1 and s[i] == 'F':
    ans.append(s[i])

if len(ans) == 2 and ans[0] == 'C' and ans[1] == 'F':
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
s = input()
for i in s:
	if i =="C":
		for j in s[s.index("C"):]:
			if j =="F":
				print("Yes")
				exit()

print("No")

Submission status: Accepted

Solution code:
def main():
    S = input()
    c = S.find("C")
    f = S[::-1].find("F")
    # print(c, len(S) - f - 1)
    if c >= 0 and f >= 0 and c < len(S) - f - 1:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    S=ST()
    C = False
    F = False
    for s in S:
        if s=="C":
            C=True
        if s=="F":
            if C:
                F=True

    if C and F:
        print("Yes")
    else:
        print("No")
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
c_f = False
f_f = False
S = input()
for i in range(len(S)):
	if S[i] == "C":
		c_f = True
	if c_f == True and S[i] == "F":
		f_f = True
if c_f == True and f_f == True:
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    S=ST()
    C = False
    F = False
    for s in S:
        if s=="C":
            C=True
        if s=="F":
            if C:
                F=True

    if C and F:
        print("Yes")
    else:
        print("No")
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = list(input())

f = False
for ss in s:
    if f:
        if ss == "F":
            print("Yes")
            import sys
            sys.exit()
    if ss == "C":
        f = True

print("No")

Submission status: Accepted

Solution code:
s = input()
flag = False
if 'C' in s and 'F' in s and s.index('C') < s.rindex('F'):
  flag = True
print('Yes' if flag == True else 'No')

Submission status: Accepted

Solution code:
s = input()
flag = False
if 'C' in s and 'F' in s and s.index('C') < s.rindex('F'):
  flag = True
  
print('Yes' if flag == True else 'No')

Submission status: Accepted

Solution code:
s = input()
prev = -1
 
se = set()
for i in ['c','f']:
    for idx,j in enumerate(s):
        if j.lower() == i and idx > prev:
            se.add(j.lower())
            prev = idx
            break
            
print('Yes' if len(se) == 2 else 'No')

Submission status: Accepted

Solution code:
s=input()
t=[]
c=200
f=0
for i in range(len(s)):
  if s[i]=="C" and c>i:
    c=i
  elif s[i]=="F" and f<i:
    f=i

if c<f:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
from sys import stdin

s = stdin.readline().rstrip()
now = 0
for i in s:
    if now == 0 and i == "C":
        now += 1
    elif now == 1 and i == "F":
        print("Yes")
        exit()
print("No")

Submission status: Accepted

Solution code:
import math
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

def swap(a,b):
    return (b,a)

def my_round(a,dig=0):
    p = 10 ** dig
    return (a * p * 2 + 1) // 2 / p

def gcd(a,b): #最大公約数
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def lcm(a,b): #最小公倍数
    return a/gcd(a,b)*b

def divisors(a): # 約数列挙
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def is_prime(a): #素数判定
    if a<2:
        return False
    elif a==2:
        return True
    elif a%2==0:
        return False
    sqrt_num = int(a**0.5)
    for i in range(3,sqrt_num+1,2):
        if a%i==0:
            return False
    return True

def prime_num(a): #素数列挙
    pn = [2]
    for i in range(3,int(a**0.5),2):
        prime = True
        for j in pn:
            if i%j==0:
                prime = False
                break
        if prime:
            pn.append(i)
    return pn

def prime_fact(a): #素因数分解
    sqrt = math.sqrt(a)
    res = []
    i = 2
    if is_prime(a):
        res.append(a)
    else:
        while a!=1:
            while a%i==0:
                res.append(i)
                a //= i
            i += 1
    return res

def main():
    s = input()
    C = False
    F = False
    for i in range(len(s)):
        if s[i] == 'C':
            C = True
        elif s[i] == 'F' and C:
            F = True
    if C and F:
        print('Yes')
    else:
        print('No')
    return

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
s = input()

a = 0
b = 0
for i in range(len(s)):
    if s[i] == "C":
        a = 1
    if s[i] == "F" and a == 1:
        b = 1

if b == 1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s=input()
if(('C' in s) and ('F' in s)):
    if(s.find('C') < s.rfind('F')):
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Accepted

Solution code:
def main():
    s = list(input())
    for i in range(len(s)):
        for j in range(i+1,len(s)):
            if s[i]=="C" and s[j]=="F":
                print("Yes")
                exit()
    print("No")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()

for i in range(len(s)):
    if s[i] == "C":
        break
    elif i == len(s) - 1:
        print("No")

if i != len(s) - 1:
    for j in range(i, len(s)):
        if s[j] == "F":
            print("Yes")
            break
        elif j == len(s) - 1:
            print("No")

Submission status: Accepted

Solution code:
print('YNeos'[1-any(['F' in i for i in input().split('C')[1:]])::2])

Submission status: Accepted

Solution code:
s=input()
try: 
  if "F" in s[s.index("C"):]:
    print("Yes")
  else:
    print("No")
 
except:
  print("No")

Submission status: Accepted

Solution code:
S = input()
if "C" not in S:
  print("No")
  exit()
idx = S.index("C")
if idx == len(S) - 1:
  print("No")
  exit()
if "F" not in S[idx+1:]:
  print("No")
  exit()
print("Yes")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

s = input()

c = s.find('C')
f = s.rfind('F')

print('Yes' if c != -1 and f != -1 and c < f else 'No')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
 
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
#S = list(str(input()))
#N = int(input())
s = str(input())

cflag = False
for i in range(len(s)) :
  if s[i] == "C" :
    cflag = True
  if cflag == True and s[i] == "F" :
    print ("Yes")
    exit()
print ("No")

Submission status: Accepted

Solution code:
s = input()
flg = [0,0]

for i in range(len(s)):
	if s[i] == "C":
		if flg[0] == 0:
			flg[0] = 1
		else:
			continue

	if s[i] == "F":
		if flg[0] == 1 and flg[1] == 0:
			flg[1] = 1
		else:
			continue

if flg == [1,1]:
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
s=input()
n=len(s)
t = 1000
u = 1000
for i in range(n):
  if s[i] == "C":
    t = i
    break
for i in range(n-1,-1,-1):
  if s[i] == "F":
    u = i
    break
if max(t,u) != 1000 and t<u:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
s=input()

if 'C' in s and 'F' in s:
    if s.find('C') < s.rfind('F'):
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Accepted

Solution code:
S = input()
i1 = S.find('C')
i2 = S.rfind('F') 
print('Yes' if i1!=-1 and i1<i2 else 'No')

Submission status: Accepted

Solution code:
S = input()
A = 0
for i in range(len(S)):
  if S[i] == "F":
    A = i
if S.count("C") > 0:
  if S.index("C") < A:
  	print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Accepted

Solution code:
s = input().strip()
if "C" in s:
    indc = s.index("C")
else:
    indc = 10**3
if "F" in s[indc:]:
    indf = indc+s[indc:].index("F")
else:
    indf = -1
if indc<indf:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
S = input()
N = len(S)
for i in range(N):
    for j in range(i, N):
        if S[i] == "C" and S[j] == "F":
            print("Yes")
            exit()
print("No")

Submission status: Accepted

Solution code:
s = input()
n = len(s)

def solve() :
  for i in range(n) :
    for j in range(i + 1, n) :
      if s[i] == 'C' and s[j] == 'F' :
        return 'Yes'
    
  return 'No'
      
print(solve())

Submission status: Accepted

Solution code:
def examA():
    S = SI()
    ans = "No"
    flag = False
    for s in S:
        if flag:
            if s=="F":
                ans = "Yes"
                break
        else:
            if s=="C":
                flag = True
    print(ans)
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

if __name__ == '__main__':
    examA()

Submission status: Accepted

Solution code:
s = input()

flag = 0

if s.count('C')*s.count('F')==0:
	print('No')
	exit()
	
for i in range(len(s)):
	if s[i]=='C':
		flag = 1
	if flag == 1 and s[i]=='F':
		print('Yes')
		exit()

print('No')

Submission status: Accepted

Solution code:
a = list(input())
p = 0
f = 0
for i in a:
    if i == 'C':
        p = 1
    elif i == 'F' and p == 1:
        print('Yes')
        f = 1
        break
if f != 1:
    print('No')

Submission status: Accepted

Solution code:
S = input()

cf = "CF"
i = 0
for s in S:
    if s == cf[i]:
        i += 1

    if i == 2:
        break

if i == 2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s=str(input())
count=0
for i in range(len(s)):
  if count==0 and s[i]=='C':
    count+=1
  elif count==1 and s[i]=='F':
    count+=1
    print('Yes');exit()
    
print('No')

Submission status: Accepted

Solution code:
s=input()
if "C"not in s:print("No")
elif s.find("C",0)<s.find("F",s.find("C",0)+1):print("Yes")
else:print("No")

Submission status: Accepted

Solution code:
s=input()

ans='No'
temp=''
for i in range(len(s)):
    if s[i]=='C':
        temp=s[i:]
        break
for i in temp:
    if i=='F':
        ans='Yes'
        break
        
print(ans)

Submission status: Accepted

Solution code:
import sys
s = list(input())
t = len(s)
for i in range(len(s)):
    if s[i] == "C":
        t = i
        break
for i in range(t,len(s)):
    if s[i] == "F":
        print("Yes")
        sys.exit()
print("No")

Submission status: Accepted

Solution code:
#coding:utf-8
s = input()

if s.find('C') >= 0 and s.find('C') < s.rfind('F'):
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
s = input()
C = s.find('C')
F = s.rfind('F')

if -1 < C < F:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s = input()
C = False
F = False

for i in s:
    if i == 'C':
        C = True
    elif i == 'F' and C:
        F = True

if C and F:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s = list(input())
if "C" in s and "F" in s:
    c_ind = s.index("C")
    if "F" in s[c_ind:]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

Solution code:
s=input()

f=0
for i in range(len(s)):
    if s[i]=="C":
        f=1
    if s[i]=="F" and f:
        print("Yes")
        exit()
print("No")

Submission status: Accepted

Solution code:
S = input()
c =False
ok = False
for s in S:
  if s == 'C':
    c = True
  elif s == 'F' and c:
    ok = True
ans = 'Yes' if ok else 'No'
print(ans)

Submission status: Accepted

Solution code:
s = input()
c = len(s)
f = 0
for x,i in enumerate(s):
  if i == "C":
    c = min(c,x)
  elif i == "F":
    f = max(f,x)
if c < f:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    s = str(readline().rstrip().decode('utf-8'))
    cnt = 0
    for i in range(len(s)):
        if cnt == 0:
            if s[i] == "C":
                cnt += 1
        elif cnt == 1:
            if s[i] == "F":
                print("Yes")
                exit()
    print("No")


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
s=input()
c=f=0
for i in range(len(s)):
	if s[i]=="C":
		c=True
	if s[i]=="F" and c==True:
		f=True
if c==f==True:
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
s=input()
f='C' in s and 'F' in s and s.index('C')<len(s)-1-s[::-1].index('F')
print('Yes' if f else 'No')

Submission status: Accepted

Solution code:
s=input()
t=100
for i in range(len(s)):
    if s[i]=='C':
        t=i
    if s[i]=='F' and i>t:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

Solution code:
n=list(input())
cindex=[i for i,j in enumerate(n) if j=="C"]
findex=[i for i,j in enumerate(n) if j=="F"]
if ("C" in n and "F" in n) and (min(cindex)<max(findex)):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = str(input())
C = 0
F = 0
for i in s:
    if C == 0 and i == 'C':
        C = 1
    elif C == 1 and i == 'F':
        F = 1
if F == 1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s = input()
if 0 <= s.find("C") < (s.find("F") or s.find("F", 2)):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
print(
    "Yes"
    if "CF" in "".join([s if s == "C" or s == "F" else "" for s in input()])
    else "No"
)

Submission status: Accepted

Solution code:
S = input()
ans = 'No'
t = 'C'
for i in range(len(S)):
  if t == 'C' and S[i] == t:
    t = 'F'
  elif t == 'F' and S[i] == t:
    ans = 'Yes'
print(ans)

Submission status: Accepted

Solution code:
S = input()
C = len(S)
F = 0
for i, s in enumerate(S):
    if s == 'C':
        C = min(i, C)
    if s == 'F':
        F = max(i, F)

if C < F:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s = input()
if "C" in s and "F" in s and s.find("C") < s.rfind("F"):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
#CF
s = input()
n = len(s)
c = 0
f = 0
for i in range(n):
    if s[i] == 'C' and c == 0:
        c = i+1
    if s[i] == 'F':
        f = i+1
if c != 0 and f != 0 and c < f:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s=input()
c=False
f=False
for ch in s:
  if ch=="C":
    c=True
  if c and ch=="F":
    print("Yes")
    break
else:
  print("No")

Submission status: Accepted

Solution code:
s = list(input())

c = -1
f = -1

for i in range(len(s)):
    if s[i] == "C" and c == -1:
        c = i
    if s[i] == "F":
        f = i
        
if c < f and c != -1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import re
s = input()
if re.search(r".*C.*F.*", s):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input()
f = 0
for i in s:
    if i == "C" and f == 0:
        f += 1
    if i == "F" and f == 1:
        print("Yes")
        exit()
print("No")

Submission status: Accepted

Solution code:
# CODE FESTIVAL 2016 予選 C: A – CF
s = input()
print('Yes' if 'C' in s and 'F' in s[s.index('C') + 1:] else 'No')

Submission status: Accepted

Solution code:
s=list(input())
ans=0
for i in range(len(s)):
    if s[i]=='C':
        ans+=1
        break
for j in range(i,len(s)):
    if s[j]=='F':
        ans+=1
        break
if ans==2:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s = input()
t = s.find("C")
if s[t:].find("F") > 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
S=input()
L,R=len(S),-1
for i in range(len(S)):
  if(S[i]=='C'):
    L=i
    break
for i in range(len(S)):
  if(S[len(S)-1-i]=='F'):
    R=len(S)-1-i
    break
if(L<R):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
S = input()

c, f = False, False
for s in S:
    if s == 'C':
        c = True
    if c and s == 'F':
        f = True
if c and f:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s = list(input())
c = 0
f = 0
for i in s:
    if i == "C":
        c += 1
    if c == 0:
        continue
    if i == "F":
        print("Yes")
        exit(0)
print("No")

Submission status: Accepted

Solution code:
def main():
  s=input()
  x = s.find("C")
  y = s.find("F")
  if x<0 or y<0:
    print("No")
    return 0
  while x<len(s):
    if s[x]=="F":
      print("Yes")
      return 0
    x+=1
  print("No")
  

    
main()

Submission status: Accepted

Solution code:
s = str(input())
flag = 0
for i in range(len(s)):
    if s[i] == "C":
        flag += 1
        break
for j in range(i,len(s),1):
    if s[j] == "F":
        flag += 1
        break
if flag==2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s=raw_input()
l=len(s)

for i in range(l):
	for j in range(i,l):
		if s[i]+s[j]=="CF":
			print "Yes"
			quit()
else:
	print "No"

Submission status: Accepted

Solution code:
s = input()

if "C" in s and "F" in s and s.find("C") < s.find("F", s.find("C")):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
S=input()

flag=False
for s in S:
  if flag==True and s=='F':
    print('Yes')
    exit()
  if flag==False and s=='C':
    flag=True
print('No')

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    s = str(input().rstrip('\n'))
    ss = ""
    for i in range(len(s)):
        if ss == "" and s[i] == "C":
            ss = s[i]
        elif ss == "C" and s[i] == "F":
            print("Yes")
            exit()
    print("No")


if __name__ == '__main__':
    slove()

Submission status: Accepted

Solution code:
s=input()
print("Yes" if "C" in s and "F" in s[s.index("C"):] else "No")

Submission status: Accepted

Solution code:
import re


def resolve():
    s = input()
    print("Yes" if re.match(r".*C.*F.*", s) else "No")


if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
#list(map(int, input().split()))
s=input()
b=0
for i in range(len(s)):
    if s[i] == 'C':
        for j in range(i+1,len(s)):
            if(s[j]=='F'):b=1
print('Yes')if b else print('No')

Submission status: Accepted

Solution code:
s = input()
c = False
f = False
for i in range(len(s)):
    if s[i] == 'C':
        c = True
    if c == True and s[i] == 'F':
        f = True

if c and f:
    print("Yes")
else :
    print("No")

Submission status: Accepted

Solution code:
s=str(input())
n=s.find('C');m=s.rfind('F')
#print(n,m)
if 0<=n<m:print('Yes')
else:print('No')

Submission status: Accepted

Solution code:
s=input()

c=False

for i in range(len(s)):
    if c==False and s[i]=="C":
        c=True
    elif c==True and s[i]=="F":
        print("Yes")
        exit()
print("No")

Submission status: Accepted

Solution code:
#%%
s = list(input())

f1 = False
f2 = False

for i in range(len(s)):
    if s[i] == 'C':
        f1 = True
    if f1 and s[i] == 'F':
        f2 = True
if f1 and f2:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s = input()
if s.count('C') > 0 and s[s.find('C'):].count('F') > 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s = input()
c_index = float('inf')
f_index = 0
for i, c in enumerate(s):
    if c == "C":
        c_index = min(c_index, i)
    if c == "F":
        f_index = max(f_index, i)
if c_index < f_index:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s=list(input())
c=len(s)+10
n=len(s)
f=-len(s)
for i in range(len(s)):
    if s[n-1-i]=='F':
        f=n-1-i
        break
for i in range(n):
    if s[i]=="C":
        c=i
        break
if c<f:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s = input()
yes = False
for i in range(len(s) - 1):
    for j in range(i + 1, len(s)):
        if s[i] == "C" and s[j] == "F":
            yes = True
            break
    if yes:
        break
        
if yes:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input()

for i in range(len(s)):
    if s[i] == "C":
        for j in range(i+1, len(s)):
            if s[j] == "F":
                print("Yes")
                exit()
print("No")

Submission status: Accepted

Solution code:
s = list(input())
cnt =0
for i in range(len(s)):
  if s[i] =='C':
    if 'F' in s[i:]:
        cnt +=1
print('Yes' if cnt >=1 else 'No')

Submission status: Accepted

Solution code:
s = input()
x = s.find('C')
y = s.rfind('F')
if x >= 0 and y >= 0 and x < y:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
from sys import stdin

def readString() :
    return  stdin.readline().rstrip()

def solve() :
    S = readString()
    pos = S.find('C')
    if(pos ==-1):
        print("No")
        return
    pos = S[pos:].find('F')
    if(pos !=-1):
        print("Yes")
    else :
        print("No")

solve()

Submission status: Accepted

Solution code:
S=input()
N=len(S)

if "C" in S and "F" in S:
  c=S.index("C")
  S=S[::-1]
  f=N-S.index("F")-1
  #print(c,f)
  print("Yes" if c<f else "No")
else: 
  print("No")

Submission status: Accepted

Solution code:
s = list(input())

for i in range(len(s)):
    for j in range(len(s)):
        if s[i] == "C" and s[j] == "F" and i<j:
            print("Yes")
            exit()
print("No")

Submission status: Accepted

Solution code:
s=input()
try:
    A = s.index("C")
except ValueError:
    print("No")
    exit()
try:
    B = s[A:].index("F")
    print("Yes")
except ValueError:
    print("No")
    exit()

Submission status: Accepted

Solution code:
def main():

    s = input()
    Cidx = -1
    for i in range(len(s)):
        if s[i] == "C":
            Cidx = i
            break
    if Cidx == -1:
        return "No"

    for i in range(Cidx+1, len(s)):
        if s[i] == "F":
            return "Yes"
    return "No"

if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
s = input()
minc = 101
maxf = 0

for i in range(len(s)):
    if minc == 101:
        if s[i] == 'C':
            minc = i

    if maxf == 0:
        if s[-i - 1] == 'F':
            maxf = len(s) - i - 1

if minc < maxf:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
from collections import Counter, defaultdict
import sys
sys.setrecursionlimit(10 ** 5 + 10)
# input = sys.stdin.readline
from math import factorial
import heapq, bisect
import math
import itertools


import queue
from collections import deque




def main():
    a = input()
    flg = 0
    for ele in a:
        if flg == 0 and ele == 'C':
            flg += 1
        if flg == 1 and ele == 'F':
            flg += 1
    if flg == 2:
        print('Yes')

    else:
        print('No')







if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
i = s.find("C")
if i < 0:
  print("No")
  exit()
j = s.find("F", i)
if j < 0:
  print("No")
  exit()
print("Yes")

Submission status: Accepted

Solution code:
S = input()
for i,c in enumerate(S):
    if c=='C': break
print('Yes' if 'F' in S[i+1:] else 'No')

Submission status: Accepted

Solution code:
f=0
for c in input():
 if c=="C":f=1
 if f&(c=="F"):f=2
print("YNeos"[f!=2::2])

Submission status: Accepted

Solution code:
s=list(input())
n=len(s)
ans="No"
for i in range(n):
    if(s[i]=="C"):
        for j in range(n-i-1):
            if(s[i+j+1]=="F"):
                ans="Yes"
print(ans)

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    ie = False
    s = str(input().rstrip('\n'))
    for i in range(len(s)):
        if s[i] == "C":
            ie = True
        elif ie and s[i] == "F":
            print("Yes")
            exit()
    print("No")


if __name__ == '__main__':
    slove()

Submission status: Accepted

Solution code:
s = input()
i = 0
for i in range(len(s)):
  if s[i] == "C":
    if "F" in s[i:]:
      print("Yes")
      exit()
print("No")

Submission status: Accepted

Solution code:
def solve(s):
    key = "CF"
    position = 0
    for c in s:
        if key[position] == c:
            position += 1
            if position == len(key):
                return "Yes"
    return "No"

s = input()
print(solve(s))

Submission status: Accepted

Solution code:
s = input()
def serch(s):
  position_C = s.find("C")
  if position_C == -1:
    return False
  else:
    position_F = s.rfind("F")
    if position_F == -1:
      return False
    elif position_C < position_F:
      return True
    else:
      return False

if serch(s) == True:
  print("Yes")
else:
  print("No")