Submission #941887
Source Code Expand
import java.util.*; import java.io.*; public class Main { void solve() { String s = in.nextToken(); int i = 0; while (i < s.length() && s.charAt(i) != 'C') { i++; } while (i < s.length() && s.charAt(i) != 'F') { i++; } if (i < s.length()) { out.println("Yes"); } else { out.println("No"); } } FastScanner in; PrintWriter out; void run() { in = new FastScanner(); out = new PrintWriter(System.out); solve(); out.close(); } class FastScanner { BufferedReader br; StringTokenizer st; public FastScanner() { br = new BufferedReader(new InputStreamReader(System.in)); } public FastScanner(String s) { try { br = new BufferedReader(new FileReader(s)); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public String nextToken() { while (st == null || !st.hasMoreTokens()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { } } return st.nextToken(); } public int nextInt() { return Integer.parseInt(nextToken()); } public long nextLong() { return Long.parseLong(nextToken()); } public double nextDouble() { return Double.parseDouble(nextToken()); } } public static void main(String[] args) { new Main().run(); } }
Submission Info
Submission Time | |
---|---|
Task | A - CF |
User | VArtem |
Language | Java8 (OpenJDK 1.8.0) |
Score | 100 |
Code Size | 1402 Byte |
Status | AC |
Exec Time | 120 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 | 98 ms | 8272 KB |
0_001.txt | AC | 98 ms | 8272 KB |
0_002.txt | AC | 96 ms | 8276 KB |
0_003.txt | AC | 97 ms | 8144 KB |
1_004.txt | AC | 120 ms | 8144 KB |
1_005.txt | AC | 96 ms | 8148 KB |
1_006.txt | AC | 96 ms | 8140 KB |
1_007.txt | AC | 95 ms | 8148 KB |
1_008.txt | AC | 95 ms | 8272 KB |
1_009.txt | AC | 98 ms | 8144 KB |
1_010.txt | AC | 97 ms | 8144 KB |
1_011.txt | AC | 97 ms | 8144 KB |