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: Wrong Answer

Solution code:
S=input()

if S.find("A")>-1 and S.find("B")>-1:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
print("YES" if "AC" in input() else "NO")

Submission status: Wrong Answer

Solution code:
n = input()
if "A" in n and "C" in n[n.index("A"):]:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()
ans = 'Yes' if any(s[i:i + 2] for i in range(len(s) - 1)) else 'No'
print(ans)

Submission status: Wrong Answer

Solution code:
s = list(input())
for i in range(len(s) - 1):
    if s[i] == "A" and s[i + 1] == "C":
        print("YES")
        exit()
print("NO")

Submission status: Wrong Answer

Solution code:
s = input()

for i in range(len(s)-2):
    if s[i:i+2] == 'AC':
        print('Yes')
        exit()

print('No')

Submission status: Wrong Answer

Solution code:
s = input()
flag = 0
for i in range(len(s) - 2):
    if s[i] == "A":
        if s[i + 1] == "C":
            flag = 1
if flag == 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=input()
ans='No'
for i in range(len(s)-1):
  if s[i]+s[i+1]=='AC':
    ans=='Yes'
print(ans)

Submission status: Wrong Answer

Solution code:
s=input()

if s in 'AC':
    print('Yes')

else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
if 'AC' in S:
  print("AC")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = input()
if 'AC' in S:
  print("AC")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
s = list(input())

for i in range(len(s)):
    if s[i] == 'A' and i+1 < len(s):
        if s[i+1] == 'C':
            print('Yes')
            exit()
        else:
            print('No')

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
#from decimal import *

S = input()

for i in range(len(S)-1):
	if S[i] == "A" and S[i+1] == "C":
		print("YES")
		break
else:
	print("NO")

Submission status: Wrong Answer

Solution code:
s = list(input())

for i in range(len(s) - 1):
    if 'A' == s[i]:
        if 'C' == s[i]:
            print('Yes')
            exit(0)

print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
for i in range(len(s)-2):
    if s[i] == 'A' and s[i+1] == 'C':
        print('Yes')
        exit()
print('No')

Submission status: Wrong Answer

Solution code:
s=input()
yn=0
for i in range(len(s)-1):
    if s[i:i+1]=="AC":
        yn=1
        break
if yn==1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
count = 1
flag = "ok"
for i in s:
  if count == 2:
    if i != "A":
      flag = "ng"
  if count == 3:
    if i != "C":
      flag = "ng"
  count += 1
if flag == "ng":
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
l = input()
for i in range(len(l)-1):
  if l[i:i+1] == "AC":
    print("Yes")
    break
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = input()
flg=False
for i in range(len(S)-2):
    if S[i:i+2]=='AC':
        flg=True
        break
ans='Yes' if flg else 'No'
print(ans)

Submission status: Wrong Answer

Solution code:
s = list(input())
for i in range(len(s)):
    if s[i] == "A":
        for j in range(i, len(s)):
            if s[j] == "C":
                print("Yes")
                exit()
print("No")

Submission status: Wrong Answer

Solution code:
s = list(input())
for i in range(len(s)):
    if s[i] == "A":
        for j in range(i, len(s)):
            if s[j] == "C":
                print("YES")
                exit()
print("NO")

Submission status: Wrong Answer

Solution code:
s=input()
if 'CD' in s:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
l = list(input())

if "AC" in l:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()

if "A" in s and "C" in s:
    ans = "Yes"
else:
    ans = "No"

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
for i in range(len(S)-1):
  if S[i]+S[i] == "AC":
    print("Yes")
    break
print("No")

Submission status: Wrong Answer

Solution code:
S = input().split()
flag = 0
for i in range(len(S)-2+1):
    if S[i:i+2]=="AC":
        flag = 1
        break
if flag==1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = set(input())
if 'A' in S and 'C' in S:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
print('AC' in input())

Submission status: Wrong Answer

Solution code:
s = input()

flag = True

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

Submission status: Wrong Answer

Solution code:
s=input()
for i in range(0,len(s)-1):
    if s[i]=="A" and s[i+1]=="C":
        print("Yes")
        exit()
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
print(["Yes", "No"]["AC" in input()])

Submission status: Wrong Answer

Solution code:
s=input()
b=True
for i in range(0,len(s)-1):
    if s[i:i+2]=='AC':
        print('Yes')
        b=False
if b==True:print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
ans = "No"
for i in range(len(s)-1):
  if s[i:i+2] == "AC":
    print("Yes")
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
ans = "No"
for i in range(len(s)-1):
  if s[i:i+1] == "AC":
    print("Yes")
print(ans)

Submission status: Wrong Answer

Solution code:
# code-festival-2017-qualcA - Can you get AC?
def main():
    s = input()
    print("YES" if "AC" in s else "NO")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")


S = sys.stdin.readline().rstrip()
if re.match('.*A.*C.*',S):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = [i for i in input()]
if "AC"in s:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=input()

if s.count("AC") >=1:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
S=input()

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

Submission status: Wrong Answer

Solution code:
s= input()
t=0
for i in range(len(s)-1):
  if s[i:i+1]=="AC":
    t +=1
if t>0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s=input()
flag=False
for i in range(len(s)-1):
  print(s[i:i+2])
  if s[i:i+1]=='AC':
    flag=True
if flag:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s=input()
flag=False
for i in range(len(s)-1):
  if s[i:i+1]=='AC':
    flag=True
if flag:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
print('YNeos'['AC'in input()::2])

Submission status: Wrong Answer

Solution code:
from collections import deque
s = deque(input())
print(s)
le = len(s)
cnt = 0
while le>1:
  if s[0] == s[-1]:
    s.pop()
    s.popleft()
    le -= 2
  elif s[0] == "x":
    s.popleft()
    cnt += 1
    le -= 1
  elif s[-1] == "x":
    s.pop()
    cnt += 1
    le -= 1
  else:
    print(-1)
    break
  print(s)
else:
  print(cnt)

Submission status: Wrong Answer

Solution code:
s = input()
for i in range(len(s)):
  if s[i]=="A":
    for j in reversed(range(len(s))):
      if s[j] == "C":
        if i<j:
          print("Yes")
          exit()
print("No")

Submission status: Wrong Answer

Solution code:
import re

s = input()
m = re.match("AC",s)
if m:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()
print("yes" if "AC" in s else "No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x=input()
y='AC'


if x in y==True:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
print(["NO","YES"]["AC"in input()])

Submission status: Wrong Answer

Solution code:
s = input()
a = ''
for i in range(len(s)-1):  
  if s[i] + s[i+1] =='AC':
    a = 'yes'
  else:
    pass

if a == 'yes':
  print(a)
else:
  print('no')

Submission status: Wrong Answer

Solution code:
data = input()
tmp = data.replace("x", "")
c1 , c2, num = 0, -1, 0
if tmp == tmp[::-1]:
    while(c1 < len(data) + c2):
        if data[c1] == data[c2]:
            c1+=1
            c2-=1
        elif data[c2]=="x":
            c2-=1
            num+=1
        else:
            c1+=1
            num+=1
else:
    num = -1
print(num)

Submission status: Wrong Answer

Solution code:
S = input()
f = True
for i in range( len(S)-1 ):
    if S[i] == 'A' and S[i+1] == 'C':
        print('Yes')
        f = False

if f:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()
found = False
for i in range(len(s)):
    if s[i] == 'a' and s[i+1] == 'c':
        print('Yes')
        found = True
        break
if not found:
    print('No')

Submission status: Wrong Answer

Solution code:
st=raw_input()
a=st.find('A')
c=st.find('C')
if abs(a-c)==1 and a!=-1 and c!=-1: print "Yes"
else:
	print "No"

Submission status: Wrong Answer

Solution code:
s=input()
c=s.replace("x","")
def insert(s,n,b):
    c=s[n]
    a=s.split(c)
    h=a[0]+b+c+a[1]
    return h

def kaibun(s):
    n=0
    for i in range(int(len(s)/2)):
        if s[i]!=s[len(s)-1-i]:
            n=1
    return n
    
center=int(len(c)/2)
num=0
j=1
f=c[:center+1]
if kaibun(c)==1:
    print(-1)
else:
    for ch in f:
        i=num
        while(1):
            if ch==s[i]:
                break
            i+=1
            num=i
        print(len(s)-num)

Submission status: Wrong Answer

Solution code:
s = input()
s_x = [i for i in s if 'x' not in i]
 
cnt = 1
a, b = ' ', ''
for c in s:
    if c == 'x':
        pass
    elif c != s_x[len(s_x)-cnt]:
        print(-1)
        break
    else:
        cnt += 1
    d = len(s_x)/2
    if cnt <= d+1:
        a += c
        if c == 'x' and cnt > d:
            b += c
    elif cnt > d:
        b += c
else:
    b = ' ' + b[::-1]
    ans = 0
    i, j = 0, 0
    while i < len(a)-1 or j < len(b)-1:
        if i >= len(a):
            a += " "
        if j >= len(b):
            b += " "
        if a[i] == b[j]:
            i += 1
            j += 1
        elif a[i] == 'x':
            i += 1
            ans += 1
        elif b[j] == 'x':
            j += 1
            ans += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
s_x = [i for i in s if 'x' not in i]

cnt = 1
cen = int(len(s) / 2)
for i, c in enumerate(s):
    d = len(s_x)/2
    if cnt == int(d):
        cen = i+1
    if c == 'x':
        pass
    elif c != s_x[len(s_x)-cnt]:
        print(-1)
        break
    else:
        cnt += 1
        
else:
    a = s[:cen]
    for i in range(cen, len(s)):
        if s[i] == 'x':
            a += s[i]
        else:
            break
    b = s[cen:]
    b = b[::-1]
    ans = 0
    i, j = 0, 0

    while i < len(a)-1 or j < len(b)-1:
        if i >= len(a):
            a += " "
        if j >= len(b):
            b += " "
        if a[i] == b[j]:
            i += 1
            j += 1
        elif a[i] == 'x':
            i += 1
            ans += 1
        elif b[j] == 'x':
            j += 1
            ans += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
s_x = [i for i in s if 'x' not in i]

cnt = 1
cen = int(len(s) / 2)
for i, c in enumerate(s):
    d = len(s_x)/2
    if cnt == int(d):
        cen = i+1
    if c == 'x':
        pass
    elif c != s_x[len(s_x)-cnt]:
        print(-1)
        break
    else:
        cnt += 1
        
else:
    a = s[:cen]
    for i in range(cen, len(s)):
        if s[i] == 'x':
            a += s[i]
        else:
            break
    b = s[cen:]
    b = b[::-1]
    ans = 0
    i, j = 0, 0
    while i < len(a)-1 or j < len(b)-1:
        if i >= len(a):
            i -= 1
        if j >= len(b):
            j -= 1
        if a[i] == b[j]:
            i += 1
            j += 1
        elif a[i] == 'x':
            i += 1
            ans += 1
        elif b[j] == 'x':
            j += 1
            ans += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
def palindrome(str):
  return True if str == str[::-1] else False

str, count, i = input(), 0, 1
default_strlen = len(str)

if palindrome(str):
  print(count)
else:
  while not palindrome(str):
    if i > default_strlen and count == 0:
      count = -1
      break

    check_str = str[0:i]

    if not palindrome(check_str):
      appended_check_str = check_str + 'x'
      returned_appended_check_str = 'x' + check_str

      if palindrome(appended_check_str) or palindrome(returned_appended_check_str):
        if palindrome(appended_check_str):
          str = appended_check_str + str[i:]
        elif palindrome(returned_appended_check_str):
          str = returned_appended_check_str + str[i:]
        count += 1

    i += 1

  print(count)

Submission status: Wrong Answer

Solution code:
import sys

sys.setrecursionlimit(10000000)

s = input()

def check(str,flag):
	if str == "":
		return True
	flag += str.count(str[0])%2
	if flag >1:
		return False
	else:
		return check(str.replace(str[0],""),flag)

def check2(str,x):
	if str=="" or check(str,0):
		return x
	count = len(str)-1
	while(not check(str[0:count],0)):
		count -= 1
	return check2(str[count:],x+1)

a = min(check2(s,1),check2(s[::-1],1))
print(a)

Submission status: Wrong Answer

Solution code:
a = input()
kaibun = a.replace("x","")

def palindrome(string):
    return 0 if string==string[::-1] else -1

if palindrome(kaibun) == -1:
    print(-1)
elif palindrome(a) == 0:
    print(0)
else:
    #もし回文の数が奇数なら、xの数は偶数
    if int(len(kaibun)) % 2 == 1:
        print(int(len(a)) - int(len(kaibun)))
    else:
        print(int(len(a)) - int(len(kaibun)) + 1)

Submission status: Wrong Answer

Solution code:
S=input()
if(S.find('AC')):
 print('Yes')
else:
 print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
i = 0
j = len(s)-1
ist = 0

while i < j:
    if s[i] == s[j]:
        i += 1
        j -= 1
    elif s[i] == 'x':
        ist += 1
        i += 1
    elif s[j] == 'x':
        ist += 1
        j -= 1
    else:
        print(-1)
        exit()

print(ist)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
"AC" in str(input())

Submission status: Wrong Answer

Solution code:
a=input("");
a=a.upper();
flag=False;
for i in range(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: Wrong Answer

Solution code:
a = input()
list(a)
for i in range(len(a)):
    if a[i] != "A" :
        continue
    elif a[i] == "A" :
        if a[i+1] == "C" :
            print("Yes")
            break
    print("No")

Submission status: Wrong Answer

Solution code:
a=input("");
flag=False;
for i in range(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: Wrong Answer

Solution code:
S=input()
i=0
p="Yes"
d=0
while i<len(S)-1 and d==0:
    if S[i]=="A" and S[i+1]=="C":
        d=1
    i+=1
if i==len(S)-1:
    p="No"
print(p)

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    words=list(input())
    flag=False
    for i in range(0,len(words)-1,2):
        if words[i]=='A' and words[i+1]=='C':
            print('Yes')
            flag=True
            break
    if flag==False:
        print('No')

Submission status: Wrong Answer

Solution code:
s = input()
out = "NO"
for i in range(len(s)):
    if i+1 != len(s):
        if s[i] == "A" and s[i+1] == "C":
            out = "YES"
print(out)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

data = input()

if data.find('AC') > -1:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

Solution code:
print("AC" in input())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

x = 'No'
for i in range(len(S)-2):
    s = S[i:i+2]
    if s == 'AC':
        x = 'Yes'
        break

print(x)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# !/usr/bin/env python
# vim: set fileencoding=utf-8 :

"""
#
# Author:   Noname
# URL:      https://github.com/pettan0818
# License:  MIT License
# Created: 日 10/22 21:00:20 2017

# Usage
#
"""
def checker(target):
    if len(target.split("AC")) > 0:
        print("Yes")
    else:
        print("No")



if __name__ == '__main__':
    target = input()
    checker(target)

Submission status: Wrong Answer

Solution code:
print 'YES' if 'AC' in raw_input() else 'NO'

Submission status: Wrong Answer

Solution code:
s = input()
if 'A' in s and 'C' in s:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.buffer.readline
in_n = lambda: int(input())
in_nn = lambda: map(int, input().split())
in_s = lambda: input().rstrip().decode('utf-8')
in_map = lambda: [s == ord('.') for s in input() if s != ord('\n')]

MOD = 10**9 + 7
INF = 8 * 10**18


def main():

    S = in_s()
    if "AC" in S:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S=input()

if S.find("AC")>-1:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
S = input()
f = 0
for i in range(len(S)-1):
  if S[i] == "A" and S[i+1] == "C":
    f = 1
    break
if f == 0:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()

if s.count('AC')>=1:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
s = input()
p = False
for i in range(len(s)-1):
  if s[i:i+2] == 'AC': p = True
if p: print('Yes')
else: print('No')

Submission status: Accepted

Solution code:
print("Yes" if input().count("AC") >0 else "No")

Submission status: Accepted

Solution code:
N = list(input())
flag = 0
for i in range(0, len(N)):
    if N[i] == "C" and N[i - 1] == "A":
        flag = 1

if flag == 1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()
ans="No"
for i in range(len(S)):
    if "AC" == S[i:i+2]:
        ans="Yes"
        break
    
print(ans)

Submission status: Accepted

Solution code:
# import math
# import statistics
a=input()
#b,c=int(input()),int(input())
c=[]
for i in a:
   c.append(i)
# e1,e2 = map(int,input().split())
#f = list(map(int,input().split()))
#g = [input() for _ in range(a)]
count=0
if "AC" in a :
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s=input()
n=len(s)
for i in range(n-1):
    if s[i]=="A" and s[i+1]=="C":
        print("Yes")
        exit()
print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    s = input()
    if "AC" in s:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# coding: utf-8
s=input()
flg=False
for i in range(len(s)-1):
    if s[i]=="A" and s[i+1]=="C":
        flg=True
if flg:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]

def main():
    S = input()
    if 'AC' in S:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def main():
    s = input()
    for i in range(len(s)-1):
        ans = s[i]+s[i+1]
        if ans == 'AC':
            print('Yes')
            sys.exit()
    print('No')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

S=input()
if 'AC' in S:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print('YNeos'['AC' not in input()::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print("Yes" if input().count("AC") > 0 else "No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print('NYoe s'['AC'in input()::2])

Submission status: Accepted

Solution code:
S=input()
for i in range(len(S)-1):
    if (S[i]=="A")&(S[i+1]=="C"):
        print("Yes")
        break
else:
    print("No")

Submission status: Accepted

Solution code:
n = input()
if "A" in n and "C" == n[n.index("A")+1]:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
'''
Created on 2020/08/20

@author: harurun
'''
def main():
  import re
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  S=pin()[:-1]
  if re.fullmatch(r"[A-Z]*AC[A-Z]*",S)==None:
    print("No")
    return 
  print("Yes")
  return 

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#CODE FESTIVAL 2017 qual C a
s=input()
if "AC" in s:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input()
ans = 'Yes' if any(s[i:i + 2] == 'AC' for i in range(len(s) - 1)) else 'No'
print(ans)

Submission status: Accepted

Solution code:
s = list(input())
for i in range(len(s) - 1):
    if s[i] == "A" and s[i + 1] == "C":
        print("Yes")
        exit()
print("No")

Submission status: Accepted

Solution code:
def main():
    S = input()
    if 'AC' in S:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
flag = False
for i in range(len(s) - 1):
    if s[i:i + 2] == "AC":
        flag = True
        break
if flag == True:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

if "AC" in s:
  print("Yes")
else :
  print("No")

Submission status: Accepted

Solution code:
s = input()

for i in range(len(s)-1):
    if s[i:i+2] == 'AC':
        print('Yes')
        exit()

print('No')

Submission status: Accepted

Solution code:
n = input()

for i in range(len(n)-1):
    if n[i:i+2] == 'AC':
        print('Yes')
        break
else:
    print('No')

Submission status: Accepted

Solution code:
import collections


def main():
    s = list(input())
    for i in range(len(s) - 1):
        if s[i] == 'A' and s[i + 1] == 'C':
            print('Yes')
            return
    print('No')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print("YNeos"[not input().count("AC")::2])

Submission status: Accepted

Solution code:
a = input()
for i in range(len(a)-1):
    b = a[i:i+2]
    if b == "AC":
        print("Yes")
        exit()
print("No")

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


def main():
    S = input().rstrip()

    if S.count("AC") > 0:
        ans = "Yes"
    else:
        ans = "No"

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
s = input()
for x, y in zip(s, s[1:]):
  if x == 'A' and y == 'C':
    print('Yes')
    sys.exit()
print('No')

Submission status: Accepted

Solution code:
def main():
    s=input()
    if(s.find('AC')!=-1):
        print('Yes')
    else:
        print('No')

main()

Submission status: Accepted

Solution code:
s = input()
n = len(s)
for i in range(n - 1):
    if s[i : i + 2] == "AC":
        print("Yes")
        break
else:
    print("No")

Submission status: Accepted

Solution code:
s = input()
flag = 0
for i in range(len(s) - 1):
    if s[i] == "A":
        if s[i + 1] == "C":
            flag = 1
if flag == 1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
for i in range(len(s)-1):
    if s[i] == 'A' and s[i+1] == 'C':
        print('Yes')
        exit()
print('No')

Submission status: Accepted

Solution code:
s = input()

if s.count('AC'):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s = input()

if "AC" in s:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=str(input())
temp=0
for i in range(len(s)):
  if s[i]=="A" and i<=len(s)-2:
    if s[i+1]=="C":
      temp=1
if temp==1:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
S=input()
for i in range(len(S)-1):
  if S[i] == 'A' and S[i+1] == 'C':
    print('Yes')
    exit()
    
print('No')

Submission status: Accepted

Solution code:

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    s=input()
    if "AC" in s:
        print("Yes")
    else:
        print("No")

main()

Submission status: Accepted

Solution code:
s=input()

for i in range(len(s)-1):
    if s[i]+s[i+1]=="AC":
        print("Yes")
        exit()
print("No")

Submission status: Accepted

Solution code:
S = input()
print('Yes' if any([S[i:i+2] == 'AC' for i in range(len(S)-1)]) else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
for i in range(len(s)):
  if s[i:i+2] =='AC':
    print("Yes")
    exit()
print("No")

Submission status: Accepted

Solution code:
S = input()
print("Yes" if sum([S[i:i+2]=="AC" for i in range(len(S))]) else "No")

Submission status: Accepted

Solution code:
s=input()
ans='No'
if s.count('AC')!=0:
  ans='Yes'
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    s = input()
    for i in range(len(s) - 1):
        if s[i:i + 2] == 'AC':
            print('Yes')
            exit()
    print('No')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S=input()
for i in range(1,len(S)):
  if "AC"==S[i-1]+S[i]:
    print("Yes")
    exit()
print("No")

Submission status: Accepted

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