Problem:


Score : 100 points

Problem Statement

Snuke built an online judge to hold a programming contest.

When a program is submitted to the judge, the judge returns a verdict, which is a two-character string that appears in the string S as a contiguous substring.
(The judge can return any two-character substring of S.)

Determine whether the judge can return the string AC as the verdict to a program.

Constraints

2 \leq |S| \leq 5

S consists of uppercase English letters.

Input

Input is given from Standard Input in the following format:

S

Output

If the judge can return the string AC as a verdict to a program, print Yes; if it cannot, print No.

Sample Input 1

BACD

Sample Output 1

Yes

The string AC appears in BACD as a contiguous substring (the second and third characters).

Sample Input 2

ABCD

Sample Output 2

No

Although the string ABCD contains both A and C (the first and third characters), the string AC does not appear in ABCD as a contiguous substring.

Sample Input 3

CABD

Sample Output 3

No

Sample Input 4

ACACA

Sample Output 4

Yes

Sample Input 5

XX

Sample Output 5

No



Sample input:
BACD


Sample output:
Yes

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <fstream>
#include <cmath>  
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <numeric>
#include <functional>
#include <string> 
#include <vector>
#include <bitset>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>

using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;

#define REP(i,n) for(int i = 0; i < int(n); i++)
#define REREP(i,n) for(int i = int(n - 1); i >= 0; i--)
#define FOR(i, m, n) for(int i = int(m);i < int(n);i++)
#define REFOR(i, m, n) for(int i = int(n - 1);i >= int(m);i--)
#define ALL(obj) (obj).begin(),(obj).end()

#define VI vector<int>
#define VVI vector<vector<int>>
#define VVVI vector<vector<vector<int>>>
#define VD vector<double>
#define VVD vector<vector<double>>
#define VVVD vector<vector<vector<double>>>
#define VL vector<ll>
#define VVL vector<vector<ll>>
#define VVVL vector<vector<vector<ll>>>
#define VB vector<bool>
#define VVB vector<vector<bool>>
#define VVVB vector<vector<vector<bool>>>
#define VS vector<string>
#define VVS vector<vector<string>>
#define VVVS vector<vector<vector<string>>>

#define PII pair<int,int>
#define PDD pair<double,double>
#define PLL pair<ll,ll>
#define VPII vector<pair<int,int>>
#define VVPII vector<vector<pair<int,int>>>
#define VVVPII vector<vector<vector<pair<int,int>>>>
#define VPLL vector<pair<ll,ll>>
#define VVPLL vector<vector<pair<ll,ll>>>
#define VVVPLL vector<vector<vector<pair<ll,ll>>>>

const ll MOD = (ll)1e9 + 7; // 998244353
const ll HINF = (ll)1e18;
const ll LINF = (ll)1e9;
const long double PI = 3.1415926535897932384626433;


void YN(bool flag) {
	cout << ((flag) ? "YES" : "NO") << endl;
}

void Yn(bool flag) {
	cout << ((flag) ? "Yes" : "No") << endl;
}

void yn(bool flag) {
	cout << ((flag) ? "yes" : "no") << endl;
}

int main() {
	string s; cin >> s;
	bool flg = false;
	REP(i, s.size()-1) if (s[i] == 'A' && s[i + 1] == 'C') flg = true;
	Yn(flg);

	return 0;
}

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
even=0
for i in range(N):
  if A[i]%2==0: even+=1

print(3**N-2**even)

Submission status: Runtime Error

Solution code:
print "Yes" if raw_input.find("AC") else print "No"

Submission status: Runtime Error

Solution code:
import string

ALPHABETS = string.ascii_lowercase

s = input()
N = len(s)
MAX = 2 * 10 ** 5
a = [0] * (N + 1)
for i, c in enumerate(s):
    idx = ALPHABETS.index(c)
    a[i+1] = a[i] ^ (2 ** idx)

opt = [0] * (N + 1)
dp = {}
dp[0] = 0
for i in range(1, N + 1):
    dp[a[i]] = min(dp.get(a[i], MAX), min([dp.get(a[i] ^ 2 ** j, MAX) if not j == -1 else dp.get(a[i] ^ 0, MAX) for j in range(-1, 26)]) + 1)

print(dp[a[N]] if dp[a[N]] != 0 else 1)

Submission status: Runtime Error

Solution code:
#  --*-coding:utf-8-*--

def f(str):
    s = {}
    s[0] = 0
    pat = 0

    bits = [2**i for i in range(26)]
    lenOfStr = len(str)

    for c in str:
        pat ^= bits[ord(c)-97]
        s[pat] = min(
            min(s.get(pat^bit, lenOfStr) + 1 for bit in bits),
            s.get(pat, lenOfStr))

    if pat == 0:
        return 1

    return s[pat]
            
str = input()
print(f(str))

Submission status: Runtime Error

Solution code:
import string

ALPHABETS = string.ascii_lowercase


def is_avairable(a):
    return bin(a).count('1') <= 1

s = input()
N = len(s)
a = [0] * (N + 1)
for i, c in enumerate(s):
    idx = ALPHABETS.index(c)
    a[i+1] = a[i] ^ (2 ** idx)

opt = [0] * (N + 1)
dp = [2 * (10 ** 5) + 1] * (2 ** 26)
dp[0] = 0
for i in range(1, N + 1):
    ns = [dp[a[i] ^ 2 ** j] if not j == -1 else dp[a[i] ^ 0] for j in range(-1, 26)]
    mn = min(ns)
    opt[i] = mn + 1
    if dp[a[i]] > opt[i]:
        dp[a[i]] = opt[i]

print(opt[N])

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
if __name__ == '__main__':
    N = raw_input()
    A = map(int, raw_input().split())
    c_total = 1
    c_odd = 1
    for a in A:
        if a != 1 or a != 100:
            c_total *= 3
        else:
            c_total *= 2
        if a % 2 == 0 and a != 100:
            c_odd *= 2
    print c_total - c_odd

Submission status: Runtime Error

Solution code:
N = input()
if 'AC' in N:
    print 'Yes'
else:
    print 'No'

Submission status: Runtime Error

Solution code:
# coding: utf-8
# 自分の得意な言語で
# Let's チャレンジ！！
if __name__ == '__main__':
    S = input()
    flg = True
    for index in range(len(S) - 1):
        if S[index]+S[index+1] == 'AC':
            print 'Yes'
            flg = False
            break
    if flg:
        print 'No'

Submission status: Runtime Error

Solution code:
# coding: utf-8
# 自分の得意な言語で
# Let's チャレンジ！！
if __name__ == '__main__':
    S = input()
    if 'AC' in S:
        print 'Yes'
    else:
        print 'No'

Submission status: Runtime Error

Solution code:
a = list(map(int, input().split()))
a.sort(key=int)
if a[0] == a[1]:
  print(a[2])
else:
  print(a[0])

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int, input().split()))
odd_cand = 1
ans = 1
for i in A:
    if i%2==0:
        odd_cand *= 2
    ans *= 3
 
print(ans - odd_cand)

Submission status: Runtime Error

Solution code:
printf("Hello");

Submission status: Runtime Error

Solution code:
a = input()
if "AC" in a:
 print("Yes")
elif:
 print("No")

Submission status: Runtime Error

Solution code:
a = input()
if len a[0]=A and len a[1]=C:
 print("Yes")
elif len a[1]=A and len a[2]=C:
 print("Yes")
elif len a[2]=A and len a[3]=C:
 print("Yes")
elif len a[3]=A and len a[4]=C:
 print("Yes")
elif:
 print("No")

Submission status: Runtime Error

Solution code:
s=input()
print "Yes" if s.count("AC") else "No"

Submission status: Runtime Error

Solution code:
ans=input()
if ans.find!=-1:
    print "Yes"
else:
    print "No"

Submission status: Runtime Error

Solution code:
import itertools

inputs = input()
N = int(inputs)


inputs = input().split()
A = map(lambda x: int(x), inputs)

count = 1
for i in A:
    if i % 2 == 0:
        count = count * 2
        
print(3**N - count )

Submission status: Runtime Error

Solution code:
if "AC" in input() == True:
    print("Yes")
else:
    print("No")if "AC" in input() == True:

Submission status: Runtime Error

Solution code:
a=input("");
flag=False;
for i in xrange(0,len(a)-2):
  if a[i]=='A' and a[i+1]=='C':
    flag=True;
if flag==True:
  print("Yes");
else:
  print("No");

Submission status: Runtime Error

Solution code:
a=input("")
flag=False
for i in xrange(0,len(a)-2):
  if a[i]=='A' and a[i+1]=='C':
    flag=True
if flag==True:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
S = str(input())
Slist = list(S)
flag = False
for i in range(len(Slist)-1):
    st = Slist[i] + Slist[i+1]
    if(st == "AC" and flag == False):
        prinSSFGt('Yes')
        flag = True
if(flag == False):
    print('No')

Submission status: Runtime Error

Solution code:
if "AC" in input():
    print("Yes")
else
    print("No")

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python

import sys
from typing import List


def main(arg: List[str]):
    s = input()
    i = "AC" in s
    if i:
        print("Yes")
    else:
        print("No")
    # print(123)
    # b = [int(a) for a in input().split(" ")]
    # print(b)
    # [input() for a in range(3)]


if __name__ == "__main__":
    main(sys.argv)

Submission status: Runtime Error

Solution code:
inputs = input()

x = list(inputs)

flag = False
for i in range(len(x) - 1):
    if x[i] == 'A' and x[i+1] == 'C'
        flag = True

if flag:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
inputs = input()

inputs = list(inputs)

flag = False
for i in range(len(inputs) - 1):
    if inputs[i] == 'A' and inputs[i+1] == 'C'
        flag = True
        
if flag:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
print(‘Yes’ if ‘AC’ in input() else ‘No’)

Submission status: Runtime Error

Solution code:
#! usr/bin/env python3

# A :

S = input()

if "AC" in S:
	print("Yes")

else: