Submission #5949650


Source Code Expand

#include <iostream>
#include <string>
using namespace std;
int main() {
    string a;
    int b = 0, c = 0;
    cin >> a;
    for (int i = 0; i < a.size(); i++) {
        if (a[i] == "C") {
            b = 1;
            break;
        }
        if (a[i] == "F" && b == 1) {
            c = 1;
            cout << "Yes" << endl;
            break;
        }
    }
    if (b == 0 && c == 0) cout << "No" << endl;
    return 0;
}

Submission Info

Submission Time
Task A - CF
User luogu_bot4
Language C++ (GCC 5.4.1)
Score 0
Code Size 427 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:9:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
         if (a[i] == "C") {
                     ^
./Main.cpp:13:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
         if (a[i] == "F" && b == 1) {
                     ^