はまやんはまやんはまやん

hamayanhamayan's blog

Can you get AC? [CODE FESTIVAL 2017 予選C A]

http://code-festival-2017-qualc.contest.atcoder.jp/tasks/code_festival_2017_qualc_a

解法

http://code-festival-2017-qualc.contest.atcoder.jp/submissions/1705902

愚直にやればいい。

string S;
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> S;
    int n = S.length();
 
    string ans = "No";
    rep(i, 0, n - 1) {
        if (S[i] == 'A' && S[i + 1] == 'C') ans = "Yes";
    }
    cout << ans << endl;
}