Submission #942428
Source Code Expand
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.PriorityQueue; import java.util.StringTokenizer; import java.util.TreeSet; public class Main { static BufferedReader in; static PrintWriter out; static StringTokenizer tok; void solve() throws IOException { String S = ns(); if (S.indexOf('C') == -1 || S.indexOf('F') == -1) { out.println("No"); return; } int cindex = 0, findex = 0; for (int i = 0; i < S.length(); i++) { if (S.charAt(i) == 'C') cindex = i; if (S.charAt(i) == 'F') findex = i; } if (cindex < findex) { out.println("Yes"); } else { out.println("No"); } } String ns() throws IOException { while (!tok.hasMoreTokens()) { tok = new StringTokenizer(in.readLine(), " "); } return tok.nextToken(); } int ni() throws IOException { return Integer.parseInt(ns()); } long nl() throws IOException { return Long.parseLong(ns()); } double nd() throws IOException { return Double.parseDouble(ns()); } String[] nsa(int n) throws IOException { String[] res = new String[n]; for (int i = 0; i < n; i++) { res[i] = ns(); } return res; } int[] nia(int n) throws IOException { int[] res = new int[n]; for (int i = 0; i < n; i++) { res[i] = ni(); } return res; } long[] nla(int n) throws IOException { long[] res = new long[n]; for (int i = 0; i < n; i++) { res[i] = nl(); } return res; } public static void main(String[] args) throws IOException { in = new BufferedReader(new InputStreamReader(System.in)); out = new PrintWriter(System.out); tok = new StringTokenizer(""); Main main = new Main(); main.solve(); out.close(); } }
Submission Info
Submission Time | |
---|---|
Task | A - CF |
User | CrazyBBB |
Language | Java8 (OpenJDK 1.8.0) |
Score | 100 |
Code Size | 2177 Byte |
Status | AC |
Exec Time | 659 ms |
Memory | 8276 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_000.txt, 0_001.txt, 0_002.txt, 0_003.txt |
All | 0_000.txt, 0_001.txt, 0_002.txt, 0_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt, 1_009.txt, 1_010.txt, 1_011.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_000.txt | AC | 102 ms | 8144 KB |
0_001.txt | AC | 659 ms | 8144 KB |
0_002.txt | AC | 99 ms | 8148 KB |
0_003.txt | AC | 99 ms | 8272 KB |
1_004.txt | AC | 98 ms | 8140 KB |
1_005.txt | AC | 99 ms | 8144 KB |
1_006.txt | AC | 99 ms | 8144 KB |
1_007.txt | AC | 100 ms | 8148 KB |
1_008.txt | AC | 98 ms | 8276 KB |
1_009.txt | AC | 139 ms | 8140 KB |
1_010.txt | AC | 100 ms | 8148 KB |
1_011.txt | AC | 100 ms | 8140 KB |