Submission #942312
Source Code Expand
import java.util.StringTokenizer; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.io.OutputStream; public class Main { public static void main(String args[]) { Sc sc = new Sc(System.in); String s = sc.n(); boolean fc = false; boolean ff = false; for(int i = 0; i<s.length(); i++) { if(!fc) { if(s.charAt(i) == 'C') fc = true; } else if(s.charAt(i) == 'F') ff = true; } if(ff&&fc) System.out.println("Yes"); else System.out.println("No"); } } class Sc { public Sc(InputStream i) { r = new BufferedReader(new InputStreamReader(i)); } public boolean hasM() { return peekToken() != null; } public int nI() { return Integer.parseInt(nextToken()); } public double nD() { return Double.parseDouble(nextToken()); } public long nL() { return Long.parseLong(nextToken()); } public String n() { return nextToken(); } private BufferedReader r; private String line; private StringTokenizer st; private String token; private String peekToken() { if (token == null) try { while (st == null || !st.hasMoreTokens()) { line = r.readLine(); if (line == null) return null; st = new StringTokenizer(line); } token = st.nextToken(); } catch (IOException e) { } return token; } private String nextToken() { String ans = peekToken(); token = null; return ans; } }
Submission Info
Submission Time | |
---|---|
Task | A - CF |
User | exoji2e |
Language | Java8 (OpenJDK 1.8.0) |
Score | 100 |
Code Size | 1844 Byte |
Status | AC |
Exec Time | 97 ms |
Memory | 8148 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 | 96 ms | 8016 KB |
0_001.txt | AC | 95 ms | 8016 KB |
0_002.txt | AC | 95 ms | 8020 KB |
0_003.txt | AC | 97 ms | 8148 KB |
1_004.txt | AC | 94 ms | 8016 KB |
1_005.txt | AC | 96 ms | 8148 KB |
1_006.txt | AC | 96 ms | 8016 KB |
1_007.txt | AC | 95 ms | 8016 KB |
1_008.txt | AC | 94 ms | 8148 KB |
1_009.txt | AC | 96 ms | 8144 KB |
1_010.txt | AC | 95 ms | 8016 KB |
1_011.txt | AC | 94 ms | 8148 KB |