Submission #942321
Source Code Expand
import java.io.*; import java.util.*; /** * Created by fcdkbear on 15.10.16. */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new PrintWriter(outputStream); new Task().solve(in, out); out.close(); } static class Task { public void solve(InputReader in, PrintWriter out) { String s = in.next(); int cIndex = s.indexOf('C'); int fIndex = s.lastIndexOf('F'); if ((cIndex == -1) || (fIndex == -1) || (cIndex > fIndex)) { out.println("No"); } else { out.println("Yes"); } } } static class InputReader { public BufferedReader reader; public StringTokenizer tokenizer; public InputReader(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream), 32768); tokenizer = null; } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } } }
Submission Info
Submission Time | |
---|---|
Task | A - CF |
User | Fcdkbear |
Language | Java8 (OpenJDK 1.8.0) |
Score | 100 |
Code Size | 1726 Byte |
Status | AC |
Exec Time | 142 ms |
Memory | 8404 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 | 8400 KB |
0_001.txt | AC | 97 ms | 8400 KB |
0_002.txt | AC | 97 ms | 8400 KB |
0_003.txt | AC | 97 ms | 8400 KB |
1_004.txt | AC | 95 ms | 8400 KB |
1_005.txt | AC | 96 ms | 8404 KB |
1_006.txt | AC | 142 ms | 8396 KB |
1_007.txt | AC | 97 ms | 8404 KB |
1_008.txt | AC | 97 ms | 8400 KB |
1_009.txt | AC | 95 ms | 8404 KB |
1_010.txt | AC | 95 ms | 8404 KB |
1_011.txt | AC | 95 ms | 8404 KB |