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: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    S = SS()

    is_ok = False
    for i in range(len(S)):
        if S[i] == 'A' and S[i+1] == 'C':
            is_ok = True
            break

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

if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
import re;print('YNeos'[not bool(re.fullmatch(r'.*AC.*',input()))::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()

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

else:
    print('No')

Submission status: Accepted

Solution code:
print("YNeos"[input().find("AC")==-1::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

for i in range(len(s)):
    if i+1 < len(s):
        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:
if (input().count("AC")):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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: Accepted

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

Submission status: Accepted

Solution code:
import re

def pattern_match(s):
    pattern = re.compile('AC')
    return re.search(pattern, s)

if pattern_match(input()):
    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:
import sys
def S(): return sys.stdin.readline().rstrip()
S = S()
print('Yes' if 'AC' in S else '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 = list(input())

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

print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    s = input()
    print("Yes" if "AC" in s else "No")


if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
S = str(input())

if S.count("AC")!=0:
  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]=="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:
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:
#!/usr/bin/env python3
import collections
import itertools as it
import math
#import numpy as np
 
s  = input()
#  = int(input())
#  = map(int, input().split())
#  = list(map(int, input().split()))
#  = [int(input()) for i in range(N)]
#
# c = collections.Counter()

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()
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:
S = input()

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

print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A. Can you get AC?
# https://atcoder.jp/contests/code-festival-2017-qualc/tasks/code_festival_2017_qualc_a

s = input()

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
#%%code
def resolve():
    S=input()
    for i in range(len(S)-1):
        if S[i]=="A" and S[i+1]=="C":
            print("Yes")
            break
    else:print("No")
#%%submit!
resolve()

Submission status: Accepted

Solution code:
import itertools
import sys

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

if ok:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

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

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:
def resolve():
  s = input()
  if 'AC' in s:
    print('Yes')
  else:
    print('No')
  return

if __name__ == "__main__":
  resolve()

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:
import sys
input = sys.stdin.readline

s = input().rstrip()

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:
s = str(input())
if s.count('AC'):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import *

S = input()[:-1]

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 9)
MOD = 10 ** 9 + 7

s = str(input())

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

Submission status: Accepted

Solution code:
print('Yes' if input().count('AC') 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()
if S.count('AC') >= 1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s = input()
p = s[0]
for i in s[1:]:
  if p+i == 'AC':
    print('Yes')
    exit()
  p = i
print('No')

Submission status: Accepted

Solution code:

import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

Solution code:

import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    
    s=str(input())
    ans='No'
    for i in range(len(s)-1):
        if s[i:i+2]=='AC':
            ans='Yes'
    print(ans)
    
    
resolve()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    s=input()
    for i in range(len(s)-1):
        if s[i:i+2]=="AC":
            print("Yes")
            break
    else:print("No")

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
s=input()
yn=0
for i in range(len(s)-1):
    if s[i:i+2]=="AC":
        yn=1
        break
if yn==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 = list(str(input()))
a = 0

for i in range(len(s)-1):
    if s[i] == 'A' and s[i+1] == 'C':
        a += 1
    else:
        a += 0
if 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:
s = input()
flg = False
for i in range(1, len(s)):
  if s[i-1] == 'A' and s[i] == 'C':
    flg = True
    break
if flg:
  print('Yes')
else:
  print('No')

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:
import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

# A - Can you get AC?
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()
n=len(s)
p=s[0]
for i in range(1,n):
    if s[i]=='C' and p =='A':
        print('Yes')
        exit(0)
    p = s[i]

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()
c = 0

for i in range(len(s)):
  if s[i] == 'A':
    if s[i+1] == 'C':
      c += 1
      break

if c > 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
s=input()
ans=int()
for i in range(len(s)):
    if (s[i-1]=='A')&(s[i]=='C'):
        ans+=1
print('YNeos'[ans==0::2])

Submission status: Accepted

Solution code:
S = input()
print("YNeos"[not "AC" in S::2])

Submission status: Accepted

Solution code:
import re

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

s = read().rstrip().decode()
print('Yes' if 'AC' in s else 'No')

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    s = input().rstrip()
    if 'AC' in s:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

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:
s = input()
flag1 = "ng"
flag2 = "ng"
for i in s:
    if flag1 == "ok":
      if i == "C":
        flag2 = "ok"
        break
    if i == "A":
      flag1 = "ok"
    else:
      flag1 = "ng"

if flag2 == "ng":
  print("No")
else:
  print("Yes")

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:
s=input()
if "AC" in s:
    print("Yes")
else:print("No")

Submission status: Accepted

Solution code:
s = input() #sys.stdin.readlineは最後が改行

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:
print(["No","Yes"]["AC" in input()])

Submission status: Accepted

Solution code:
s = input()
y = 0
for i in range(len(s)-1):
    if s[i:i+2] == "AC":
        y = 1
if y == 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:
l = input()
for i in range(len(l)-1):
  if l[i:i+2] == "AC":
    print("Yes")
    break
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)-1):
    if s[i:i+2] == "AC":
        ans = "Yes"
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# CODE FESTIVAL 2017 予選 C: A – Can you get AC?
s = input()
print('Yes' if 'AC' in s else 'No')

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    s =input()
    if  "AC" in s:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = 1e10

#solve
def solve():
    s = S()
    if "AC" in s:
        print("Yes")
    else:
        print("No")
    return


#main
if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A
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:
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:
S = input()
f = False
for i in range(S.__len__()-1):
    f |= S[i:i+2] == "AC"

print("Yes" if f else "No")

Submission status: Accepted

Solution code:
S = input()


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = input()

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

S = sr()
bl = False
for x, y in zip(S, S[1:]):
    if x+y == 'AC':
        bl = True

print('Yes' if bl else 'No')
# 45

Submission status: Accepted

Solution code:
s = input()

if "AC" in s:
    ans = "Yes"
else:
    ans = "No"

print(ans)

Submission status: Accepted

Solution code:
# Problem A - Can you get AC?

# input process
S = input()

# initialization
is_ok = False

# count process
for i in range(len(S)-1):
    if S[i]=='A' and S[i+1]=='C':
        is_ok = True
        break

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

Submission status: Accepted

Solution code:
x=input()
x=list(x)
t=0
for i in range(len(x)-1):
	if x[i]=='A' and x[i+1]=='C':
		print('Yes')
		t=1
		break
if t==0:
	print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    s = input().rstrip()
    f = False
    for i in range(len(s)-1):
        if s[i] == "A" and s[i+1] == "C":
            f = True
    if f:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# import bisect
# from collections import Counter, defaultdict, deque
# import copy
# from heapq import heappush, heappop, heapify
# from fractions import gcd
# import itertools
# from operator import attrgetter, itemgetter
# import math

import sys

# import numpy as np

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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
	elif i == n - 2:
		print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
if s.count('AC') >= 1:
    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()
print("YNeos"[S.find("AC")<0::2])

Submission status: Accepted

Solution code:
S = input()
ans = False
for i in range(len(S)-1):
    if S[i] + S[i+1] == 'AC':
        ans = True

if ans:
    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:
#!/usr/bin/env python3

import re
print("Yes") if len(re.findall(r"AC", input())) > 0 else print("No")

Submission status: Accepted

Solution code:
def main() -> None:
    S = input()
    print("Yes" if "AC" in [S[i:i+2] for i in range(len(S)-1)] else "No")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
s = input()
for i in range(len(s)-1):
    if s[i:i+2] =="AC":
        print("Yes")
        exit(0)
print("No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
S = stdin.readline().rstrip()
if 'AC' in S:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = input()
for i in range(len(N)-1):
	if N[i] + N[i+1] == "AC":
		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:
s = input()

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

print("No")

Submission status: Accepted

Solution code:
if(input().count('AC')): 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")
        import sys
        sys.exit()
print("No")

Submission status: Accepted

Solution code:
import math
import decimal
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

class Library():
    @staticmethod
    def Swap(a,b):
        return [b,a]

    @staticmethod
    def myRound(a,dig=0): # 四捨五入
        p = 10 ** dig
        return (a * p * 2 + 1) // 2 / p

    @staticmethod
    def Roundup(a,dig=0): # 切り上げ
        if a < 0:
            return int(a)
        else:
            return int(a + 0.9)

    @staticmethod
    def Gcd(a,b): #最大公約数
        if (a<b):
            a,b = Library.Swap(a,b)
        if (b==0):
            return a
        else:
            return Library.Gcd(b,a%b)

    @staticmethod
    def Lcm(a,b): #最小公倍数
        return a//Library.Gcd(a,b)*b

    @staticmethod
    def Divisors(a): # 約数列挙
        divisors = []
        for i in range(1,int(a**0.5)+1):
            if a%i==0:
                divisors.append(i)
                if i!=a//i:
                    divisors.append(a//i)
        divisors.sort()
        return divisors

class Prime():
    # コンストラクタ
    # エラストテネスの篩
    def __init__(self,num):
        self.num = num
        self.sieve = [0] * (self.num + 1)
        self.sieve[0] = -1
        self.sieve[1] = -1
        for i in range(2,self.num + 1):
            if not self.sieve[i]:
                self.sieve[i] = i
                for j in range(i * i,self.num + 1,i):
                    if self.sieve[j]:
                        self.sieve[j] = i
    
    # 素数判定
    def isPrime(self,num = None):
        if num is None:
            num = self.num
        if self.sieve[num] == num:
            return True
        else:
            return False
    
    # 素数列挙
    def PrimeNum(self,num = None):
        if num is None:
            num = self.num
        prime = []
        for i in range(2,num):
            if self.sieve[i] == i:
                prime.append(i)
        return prime
    
    # 素因数分解
    def PrimeFact(self,num = None):
        if num is None:
            num = self.num
        fact = []
        while self.sieve[num] != num:
            fact.append(self.sieve[num])
            num //= self.sieve[num]
        fact.append(num)
        return fact

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

if __name__=='__main__':
    main()

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.find("AC") == -1:
    print("No")
else:
    print("Yes")

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()
    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()
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:
print(' YNeos'['AC'in input()::2])

Submission status: Accepted

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

S = input()

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

print('Yes' if ans else 'No')

Submission status: Accepted

Solution code:
import random
s=input()
ans="No"
for _ in range(1<<16):
  i=random.randrange(len(s)-1)
  if(s[i:i+2]=="AC"):
    ans="Yes"
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
 
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
#S = list(str(input()))
#N = int(input())
S = str(input())

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

Submission status: Accepted

Solution code:
S = input()
print('Yes' if  'AC' in S or S[0]+S[-1] == 'AC' else 'No' )

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import re


def main(s: str):
    if re.match(r'.*AC.*', s):
        print('Yes')
    else:
        print('No')


if __name__ == "__main__":
    s = input()

    main(s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
for i,j in zip(s[:-1],s[1:]):
  if i+j=="AC":
    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:
from sys import stdin

s = stdin.readline().rstrip()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
S = input()
for i in range(len(S)-1):
  if S[i]+S[i+1] == "AC":
    print("Yes")
    sys.exit()
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]=='A' and s[i+1]=='C':
		print('Yes')
		exit()
		
print('No')

Submission status: Accepted

Solution code:
S = input().strip()
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: Accepted

Solution code:
s=input()

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