ZhenlongDai/ACPR huggingface dataset:
Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def myAnswer(S:list) -> str:
   for i in range(len(S)-1):
      for j in range(i+1,len(S)):
         if("".join(S[:i]+S[j:]) == "keyence"):
            return "YES"
   return "NO"

def modelAnswer():
   return
def main():
   S = list(input())
   print(myAnswer(S[:]))
if __name__ == '__main__':
   main()

Failing test case input:
keyence

Expected output:
YES

Actual output:
NO


Fixed submission (verdict: Accepted):
def myAnswer(S:str) -> str:
   if(S == "keyence"):return "YES"
   for i in range(len(S)-1):
      for j in range(i+1,len(S)):
         if(S[:i]+S[j:] == "keyence"):
            return "YES"
   return "NO"

def modelAnswer():
   return
def main():
   S = (input())
   print(myAnswer(S))
if __name__ == '__main__':
   main()

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
a = "keyence"
if s[:7] == a or a[-7:] == a:
  print("YES")
else:
  for i in range(7):
    if s[i] != a[i]:
      pos = i
      break
  if a[-7+i:] == s[-7+i:]:
    print("YES")
  else: print("NO")

Failing test case input:
snzs{mb{pf

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
s = input()
a = "keyence"
if s[:7] == a or s[-7:] == a:
    print("YES")
else:
    pos = 0
    for i in range(7):
        if s[i] != a[i]:
            pos = i
            break
    
    if a[-7 + pos :] == s[-7 + pos :]:
        print("YES")
    else:
        print("NO")

Problem: p03150
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s=input()
k="keyence"
for i in range(8):
    print(k[:i],k[i:])
    if k[:i] not in s or k[i:] not in s:
        continue
    else:
        if s.find(k[:i])<s.find(k[i:]):
            print("YES" )
            exit()
print("NO")





Failing test case input:
arhkzfha

Expected output:
NO


Actual output:
 keyence
k eyence
ke yence
key ence
keye nce
keyen ce
keyenc e
keyence 
NO


Fixed submission (verdict: Accepted):
s=input()
k="keyence"
if s.find(k,0,7)!=-1 or s.find(k,len(s)-7)!=-1:
    print("YES")  
    exit()
for i in range(1,7):
    a=s.find(k[:i],0,len(k[:i]))
    if a==0:
        b=s.find(k[i:],len(s)-len(k[i:]))
        if b!=-1:
            print("YES")
            exit()
print("NO")

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main() :
	S = input()

	remove_len = len(S)  - 7

	for i in range(len(S) - remove_len) :
		s = S[i:i+7]
		if (s == "keyence") :
			print("YES")
			return

	print("NO")


main()

Failing test case input:
keyofscience

Expected output:
YES

Actual output:
NO


Fixed submission (verdict: Accepted):
def main() :
	S = input()

	remove_len = len(S)  - 7

	for i in range(len(S) - remove_len) :
		
		s = S[0:i] + S[i+remove_len:]
		if (s == "keyence") :
			print("YES")
			return

	print("NO")


main()
Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input().rstrip()

if S == 'keyence': print('YES')
elif len(S) == 7: print('NO')
else:
	for length in range(len(S)-7):
		for i in range(len(S)-length):
			print(S[0:i] + S[i+length+1:])
			if S[0:i] + S[i+length+1:] == 'keyence':
				print('YES')
				exit(0)
	print('NO')

Failing test case input:
akhrzlaf

Expected output:
NO


Actual output:
khrzlaf
ahrzlaf
akrzlaf
akhzlaf
akhrlaf
akhrzaf
akhrzlf
akhrzla
NO


Fixed submission (verdict: Accepted):
S = input().rstrip()

if S == 'keyence': print('YES')
elif len(S) == 7: print('NO')
else:
	for length in range(len(S)-7):
		for i in range(len(S)-length):
			if S[0:i] + S[i+length+1:] == 'keyence':
				print('YES')
				exit(0)
	print('NO')

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = str(input())

flg = False

if S=="keyence":
    print("OK")
else:
    for i in range(len(S)+1):
        
        for j in range(i,len(S)+1):
            
            temp = S[0:i]+S[j:]
            
            if temp =="keyence":
                flg = True
                break
                
        if flg == True:
            break
        
    if flg == True:
        print("YES")
    else:
        print("NO")
            

Failing test case input:
keyence

Expected output:
YES

Actual output:
OK


Fixed submission (verdict: Accepted):
S = str(input())

flg = False

if S=="keyence":
    print("YES")
else:
    for i in range(len(S)+1):
        
        for j in range(i,len(S)+1):
            
            temp = S[0:i]+S[j:]
            
            if temp =="keyence":
                flg = True
                break
                
        if flg == True:
            break
        
    if flg == True:
        print("YES")
    else:
        print("NO")

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
target = "keyence"
for i in range(len(target) + 1):
    if target == s[:i] + s[len(s) - len(target) + i:]:
        print("YES")
    else:
        print("NO")

Failing test case input:
slzs|nbfp|

Expected output:
NO


Actual output:
NO
NO
NO
NO
NO
NO
NO
NO


Fixed submission (verdict: Accepted):
s = input()
target = "keyence"
ans = "NO"
for i in range(len(target) + 1):
    if target == s[:i] + s[len(s) - len(target) + i:]:
        ans = "YES"
        break
print(ans)
Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()
if S=='keyence' or S[0:7]=='keyence' or S[-7:]=='keyence':
    print('YES')
    exit()
else:
    pass

if S[0]=='k':
    if S[-6:]=='eyence':
        print('YES')
    else:
        pass
if S[:1]=='ke':
    if S[-5:]=='yence':
        print('YES')
    else:
        pass
if S[:2]=='key':
    if S[-4:]=='ence':
        print('YES')
    else:
        pass
if S[:3]=='keye':
    if S[-3:]=='nce':
        print('YES')
    else:
        pass
if S[:4]=='keyen':
    if S[-2:]=='ce':
        print('YES')
    else:
        pass
if S[:5]=='keyen':
    if S[-1]=='e':
        print('YES')
    else:
        pass
print('NO')

Failing test case input:
keyofscience

Expected output:
YES

Actual output:
NO


Fixed submission (verdict: Accepted):
S=input()
if S=='keyence' or S[0:7]=='keyence' or S[-7:]=='keyence':
    print('YES')
    exit()
else:
    pass

if S[0]=='k':
    if S[-6:]=='eyence':
        print('YES')
        exit()
    else:
        pass
if S[:2]=='ke':
    if S[-5:]=='yence':
        print('YES')
        exit()
    else:
        pass
if S[:3]=='key':
    if S[-4:]=='ence':
        print('YES')
        exit()
    else:
        pass
if S[:4]=='keye':
    if S[-3:]=='nce':
        print('YES')
        exit()
    else:
        pass
if S[:5]=='keyen':
    if S[-2:]=='ce':
        print('YES')
        exit()
    else:
        pass
if S[:6]=='keyenc':
    if S[-1]=='e':
        print('YES')
        exit()
    else:
        pass
print('NO')

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import re
L = input()
k1 = L.count("k")
e3 = L.count("e")
y1 = L.count("y")
n1 = L.count("n")
c1 = L.count("c")
if k1 >= 1 and e3 >= 3 and y1 >= 1 and n1 >= 1 and c1 >= 1:
    if re.match("k.*eyence", L) or re.match("ke.*yence", L) or re.match("key.*ence", L) or re.match("keye.*nce", L) or re.match("keyen.*ce", L) or re.match("keyenc.*e", L) or re.match("[keyence]+", L):
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Failing test case input:
eeyofscienck

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
import re
L = input()
k1 = L.count("k")
e3 = L.count("e")
y1 = L.count("y")
n1 = L.count("n")
c1 = L.count("c")
if k1 >= 1 and e3 >= 3 and y1 >= 1 and n1 >= 1 and c1 >= 1:
    if re.match("^k.*eyence$", L) or re.match("^ke.*yence$", L) or re.match("^key.*ence$", L) or re.match("^keye.*nce$", L) or re.match("^keyen.*ce$", L) or re.match("^keyenc.*e$", L) or re.match("^.*keyence$", L) or re.match("^keyence.*$", L):
        print("YES")
    else:
        print("NO")
else:
    print("NO")
Problem: p03150
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
ans_word = "keyence"

s = input()
flag = False

for i in range(len(s)-1):
    for j in range(i+1, len(s)):
        if s[:i] + s[j:] == ans_word:
            flag = True
            break
    if flag:
        break
if flag:
    print("YES")
else:
    print("NO")


Failing test case input:
keyence

Expected output:
YES

Actual output:
NO


Fixed submission (verdict: Accepted):
ans_word = "keyence"

s = input()
flag = False
if s == ans_word:
    flag = True
else:
    for i in range(len(s)-1):
        for j in range(i+1, len(s)):
            if s[:i] + s[j:] == ans_word:
                flag = True
                break
        if flag:
            break

if flag:
    print("YES")
else:
    print("NO")

Problem: p03150
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
ans_word = "keyence"

s = input()
flag = False

for i in range(len(s)-1):
    for j in range(len(s)-1):
        if s[:i] + s[j:] == ans_word:
            flag = True
            break
    if flag:
        break
if flag:
    print("YES")
else:
    print("No")


Failing test case input:
|pfbn}szls

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
ans_word = "keyence"

s = input()
flag = False
if s == ans_word:
    flag = True
else:
    for i in range(len(s)-1):
        for j in range(i+1, len(s)):
            if s[:i] + s[j:] == ans_word:
                flag = True
                break
        if flag:
            break

if flag:
    print("YES")
else:
    print("NO")

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

V = "keyence"

for i in range(len(S) - len(V) + 1):
    print(i, S[:i], S[i-len(V):])
    if S[:i] + S[i-len(V):] == V:
        print("YES")
        exit(0)
print("NO")


Failing test case input:
eeyofscienck

Expected output:
NO


Actual output:
0  scienck
1 e cienck
2 ee ienck
3 eey enck
4 eeyo nck
5 eeyof ck
NO


Fixed submission (verdict: Accepted):
S = input()

V = "keyence"
t = len(S) - len(V)

for i in range(len(S) - t + 1):
    if S[:i] + S[i+t:] == V:
        print("YES")
        exit(0)
print("NO")

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
for i in range(len(s)):
	for j in range(i):
		if s[:j]+s[i:]=="keyence":
			print("YES")
			exit()
print("NO")

Failing test case input:
keyence

Expected output:
YES

Actual output:
NO


Fixed submission (verdict: Accepted):
s=input()
for i in range(len(s)):
	for j in range(i+1):
		if s[:j]+s[i:]=="keyence":
			print("YES")
			exit()
print("NO")
Problem: p03150
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
import math
import itertools as it
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    s = S()
    cnt = 0
    tgt = "keyence"
    for i in range(len(tgt)):
        a,b = tgt[:i],tgt[i:]
        if a in s and b in s:
            print("Yes")
            exit()
    print("No")

Failing test case input:
lcygejriodfe

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
import sys
import math
import itertools as it
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    s = S()
    cnt = 0
    tgt = "keyence"
    for i in range(8):
        if s[:i] + s[len(s)-7+i:] == tgt:
            print("YES")
            exit()
    print("NO")

Problem: p03150
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()

if s == 'keyence':
    print('YES')
    exit()

for i in range(0,len(s)-1):
    for j in range(i+1,len(s)):
        print(s[:i]+s[j:])
        if s[:i]+s[j:] == 'keyence':
            print('YES')
            exit()
print('NO')

Failing test case input:
dcyenfn

Expected output:
NO


Actual output:
cyenfn
yenfn
enfn
nfn
fn
n
dyenfn
denfn
dnfn
dfn
dn
dcenfn
dcnfn
dcfn
dcn
dcynfn
dcyfn
dcyn
dcyefn
dcyen
dcyenn
NO


Fixed submission (verdict: Accepted):
s = input()

if s == 'keyence':
    print('YES')
    exit()

for i in range(0,len(s)-1):
    for j in range(i+1,len(s)):
        if s[:i]+s[j:] == 'keyence':
            print('YES')
            exit()
print('NO')
Problem: p03150
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s=input()

n=len(s)
ans="NO"

for i in range(n):
  for j in range(1,n+1):
    num=s[:i]+s[j:]
    print(num)
    if num == "keyence":
      ans="YES"
      
print(ans)

Failing test case input:
eeyofscienci

Expected output:
NO


Actual output:
eyofscienci
yofscienci
ofscienci
fscienci
scienci
cienci
ienci
enci
nci
ci
i

eeyofscienci
eyofscienci
eofscienci
efscienci
escienci
ecienci
eienci
eenci
enci
eci
ei
e
eeeyofscienci
eeyofscienci
eeofscienci
eefscienci
eescienci
eecienci
eeienci
eeenci
eenci
eeci
eei
ee
eeyeyofscienci
eeyyofscienci
eeyofscienci
eeyfscienci
eeyscienci
eeycienci
eeyienci
eeyenci
eeynci
eeyci
eeyi
eey
eeyoeyofscienci
eeyoyofscienci
eeyoofscienci
eeyofscienci
eeyoscienci
eeyocienci
eeyoienci
eeyoenci
eeyonci
eeyoci
eeyoi
eeyo
eeyofeyofscienci
eeyofyofscienci
eeyofofscienci
eeyoffscienci
eeyofscienci
eeyofcienci
eeyofienci
eeyofenci
eeyofnci
eeyofci
eeyofi
eeyof
eeyofseyofscienci
eeyofsyofscienci
eeyofsofscienci
eeyofsfscienci
eeyofsscienci
eeyofscienci
eeyofsienci
eeyofsenci
eeyofsnci
eeyofsci
eeyofsi
eeyofs
eeyofsceyofscienci
eeyofscyofscienci
eeyofscofscienci
eeyofscfscienci
eeyofscscienci
eeyofsccienci
eeyofscienci
eeyofscenci
eeyofscnci
eeyofscci
eeyofsci
eeyofsc
eeyofscieyofscienci
eeyofsciyofscienci
eeyofsciofscienci
eeyofscifscienci
eeyofsciscienci
eeyofscicienci
eeyofsciienci
eeyofscienci
eeyofscinci
eeyofscici
eeyofscii
eeyofsci
eeyofscieeyofscienci
eeyofscieyofscienci
eeyofscieofscienci
eeyofsciefscienci
eeyofsciescienci
eeyofsciecienci
eeyofscieienci
eeyofscieenci
eeyofscienci
eeyofscieci
eeyofsciei
eeyofscie
eeyofscieneyofscienci
eeyofscienyofscienci
eeyofscienofscienci
eeyofscienfscienci
eeyofscienscienci
eeyofsciencienci
eeyofscienienci
eeyofscienenci
eeyofsciennci
eeyofscienci
eeyofscieni
eeyofscien
eeyofscienceyofscienci
eeyofsciencyofscienci
eeyofsciencofscienci
eeyofsciencfscienci
eeyofsciencscienci
eeyofscienccienci
eeyofsciencienci
eeyofsciencenci
eeyofsciencnci
eeyofsciencci
eeyofscienci
eeyofscienc
NO


Fixed submission (verdict: Accepted):
s=input()

n=len(s)
ans="NO"

for i in range(n):
  for j in range(1,n+1):
    num=s[:i]+s[j:]
    if num == "keyence":
      ans="YES"
      
print(ans)

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

def solve(s):
  t = 'keyence'
  if t in s[0:7] or t in s[-7:]:
    return 'YES'

  p = 0
  for i in range(len(s)):
    if t[p] == s[i]:
      p = p + 1
    else:
      if t[p:] in s[-p:]:
        return 'YES'
      else:
        return 'NO'
  return 'NO'

print(solve(input()))

Failing test case input:
keyofscience

Expected output:
YES

Actual output:
NO


Fixed submission (verdict: Accepted):

def solve(s):
  t = 'keyence'
  if t in s[0:7] or t in s[-7:]:
    return 'YES'

  p = 0
  for i in range(len(s)):
    if t[p] == s[i]:
      p = p + 1
    else:
      if t[p:] in s[-7+p:]:
        return 'YES'
      else:
        return 'NO'
  return 'NO'

print(solve(input()))
Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()
T="keyence"
for i in range(len(S)-1):
    for j in range(i,len(S)-1):
        if S[:i]+S[j:]==T:
            print("YES")
            exit()
print("No")

Failing test case input:
mkfrazch

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
S=input()
T="keyence"
if S[:7]==T:
    print("YES")
    exit()
for i in range(len(S)-1):
    for j in range(i,len(S)):
        if S[:i]+S[j:]==T:
            print("YES")
            exit()
print("NO")

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

import sys

for i in range(0,len(S)-1):
    for j in range(i+1,len(S)):
        if S[:i] + S[j:] == 'keyence':
            print('Yes')
            sys.exit()
        
print('No')

Failing test case input:
arhkzjaf

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
S = input()

import sys

for i in range(0,len(S)):
    for j in range(i,len(S)):
        if S[:i] + S[j:] == 'keyence':
            print('YES')
            sys.exit()
        
print('NO')

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
word='keyence'
flag=0
for i in range(7):
    if s[:i]+s[:-1-(8-i)]==word:
        flag=1
print('YES' if flag else 'NO')

Failing test case input:
keyence

Expected output:
YES

Actual output:
NO


Fixed submission (verdict: Accepted):
s=input()
word='keyence'
flag=0
if s[:6]==word:
    flag=1
if s[-7:]==word:
    flag=1
for i in range(7):
    if s[:i]+s[-(7-i):]==word:
        flag=1
print('YES' if flag else 'NO')

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
ss = ['k','e','y','e','n','c','e']
p = 6
a = 0
b = 0
c = 0
for i in range(len(ss)):
    if s[i] == ss[i]:
        continue
    else:
        a = i
        break
else:
    print('YES')
    exit()



for j in range(len(s)-1,-1,-1):
    if p >= 0 :
        if (s[j] == ss[p]):
            print('ヌッ',c)
            p -= 1
            c += 1
        else:
            b = c
            break
else:
    print('YES')
    exit()

if a+b == 7:
    print('YES')
else:
    print('NO')

Failing test case input:
icnejcsfoyee

Expected output:
NO


Actual output:
ヌッ 0
NO


Fixed submission (verdict: Accepted):
s = list(input())
ss = ['k','e','y','e','n','c','e']
a = 0
b = 0
c = 0
for i in range(len(ss)):
    if s[i] == ss[i]:
        continue
    else:
        a = i
        break
else:
    print('YES')
    exit()


sss = ss[a:]
for i in range(len(sss)):
    if sss[len(sss)-i-1] == s[len(s)-i-1]:
        continue
    else:
        print('NO')
        break
else:
    print('YES')

Problem: p03150
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s=(input())
n=len(s)
l=n-7
for i in range(n-7+1):
    tmp=s[:i]+s[i+l:]
    print(tmp)
    if tmp=="keyence":
        print("YES")
        exit()
print("NO")


Failing test case input:
arhkzfhb

Expected output:
NO


Actual output:
rhkzfhb
ahkzfhb
NO


Fixed submission (verdict: Accepted):
s=input()
n=len(s)
for i in range(n):
    tmp=s[:i]+s[i+n-7:]
    if tmp=="keyence":
        print("YES")
        exit()
print("NO")
Problem: p03150
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):



S = input()
s_length = len(S)


is_same = False
for i in range(s_length):
    for j in range(i, s_length):
        
        tmp_str = S[:i+1] + S[j:]
        if tmp_str=="keyence":
            is_same = True
            break

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


Failing test case input:
mcgyejriodee

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):



S = input()
s_length = len(S)


is_same = False
for i in range(s_length):
    for j in range(i, s_length):
        
        tmp_str = S[:i+1] + S[j:]
        if tmp_str=="keyence":
            is_same = True
            break

if is_same:
    print("YES")
else:
    print("NO")

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
for i in range(len(S)-7):
    if S[:i]+S[len(S)-7+i:]=="keyence":     
        print("YES")     
        break
else:           
    print("NO")


Failing test case input:
keyence

Expected output:
YES

Actual output:
NO


Fixed submission (verdict: Accepted):
S = input()

for i in range(8):
    if S[:i]+S[-(7-i):]=="keyence":
        print("YES")
        break
else:
    print("NO")

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
input = sys.stdin.readline


def is_keyence_string():
	for i in range(1, len(key)):
		left = S[:i]
		right = S[i-len(key):]

		if S.startswith(left) and S.endswith(right):
			return True
	
	return False


S = input()
key = 'keyence'

if S.startswith(key):
	print('YES')
elif S.endswith(key):
	print('YES')
else:
	if is_keyence_string():
		print('YES')
	else:
		print('NO')


Failing test case input:
foecxme

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):

def is_keyence_string():
	for i in range(1, len(key)):
		left = key[:i]
		right = key[i-len(key):]
		
		if S.startswith(left) and S.endswith(right):
			return True
	
	return False


S = input().strip()
key = 'keyence'

if S.startswith(key):
	print('YES')
elif S.endswith(key):
	print('YES')
elif is_keyence_string():
	print('YES')
else:
	print('NO')

Problem: p03150
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

KEY = "keyence"

def main():
    s = input()

    for i in range(1, len(KEY)):
        r = KEY[0:i]
        l = KEY[i:]

        if s.startswith(r) and s.endswith(l):
            print("YES")
            return

    print("No")

main()


Failing test case input:
lcygejriodfe

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):

KEY = "keyence"

def main():
    s = input()

    if s.startswith(KEY) or s.endswith(KEY):
        print("YES")
        return

    for i in range(1, len(KEY)):
        st = KEY[0:i]
        ed = KEY[i:]

        if s.startswith(st) and s.endswith(ed):
            print("YES")
            return

    print("NO")

main()
Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def solve(S):
    l = len('keyence')
    diff = len(S) - l
    if diff < 0:
        return 'NO'
    for i in range(len(S) - diff+1):
        t = S[:i] + S[i+diff:]
        if t == 'keyence':
            return 'YES'
    return 'NO'

Failing test case input:
slzs}nbfp|

Expected output:
NO


Actual output:

Fixed submission (verdict: Accepted):


import sys


def solve(S):
    l = len('keyence')
    diff = len(S) - l
    if diff < 0:
        return 'NO'
    for i in range(len(S)):
        t = S[:i] + S[i+diff:]
        if t == 'keyence':
            return 'YES'
    return 'NO'


def main(args):
    S = input()
    ans = solve(S)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import copy

S = input()
ja = 0

sremove = ""
S_tmp = ""

for i in range(len(S)):
    for j in range(1,len(S)- i+1):
        S_tmp = S

        sremove = S_tmp[i:]
        sremove = sremove[:j]

        S_tmp = S_tmp.replace(sremove, "")

        if S_tmp == "keyence":
            ja = 1
            break

if ja == 0:
    print("NO")

else:
    print("YES")

Failing test case input:
keyence

Expected output:
YES

Actual output:
NO


Fixed submission (verdict: Accepted):
import copy

S = list(input())
ja = 0

sremove = ""
S_tmp = []

for i in range(len(S)):
    for j in range(i,len(S)+1):
        S_tmp = copy.deepcopy(S)

        del S_tmp[i:j]

        if "".join(S_tmp) == "keyence":
            ja = 1
            break

if ja == 1:
    print("YES")

else:
    print("NO")

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
input = sys.stdin.readline

def ok(s):
    for i in range(len(s)):
        for j in range(i, len(s)):
            print(s[:i] + s[j:])
            if s[:i] + s[j:] == "keyence":
                return True
    return False

def main():
    s = input().strip()
    print("YES" if ok(s) else "NO")

if __name__ == "__main__":
    main()

Failing test case input:
nfmcyed

Expected output:
NO


Actual output:
nfmcyed
fmcyed
mcyed
cyed
yed
ed
d
nfmcyed
nmcyed
ncyed
nyed
ned
nd
nfmcyed
nfcyed
nfyed
nfed
nfd
nfmcyed
nfmyed
nfmed
nfmd
nfmcyed
nfmced
nfmcd
nfmcyed
nfmcyd
nfmcyed
NO


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline

def ok(s):
    for i in range(len(s)+1):
        for j in range(i, len(s)+1):
            
            
            
            
            
            
            if s[:i] + s[j:] == "keyence":
                return True
    return False

def main():
    s = input().strip()
    print("YES" if ok(s) else "NO")

if __name__ == "__main__":
    main()
Problem: p03150
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()

key = "keyence"

t = -1

for i in range(7):
    if not S[i] == key[i]:
        t = max(0, t + i)
        break

if t == -1:
    t = 7

for i in range(1, 8):
    if not S[-i] == key[-i]:
        t = max(0, t + i - 1)
        break

if t >= 7:
    print("YES")
else:
    print("NO")



Failing test case input:
keyofscience

Expected output:
YES

Actual output:
NO


Fixed submission (verdict: Accepted):
S = input()

key = "keyence"

t = -1

for i in range(7):
    if not S[i] == key[i]:
        t = i
        break

if t == -1:
    t = 7

for i in range(1, 8):
    if not S[-i] == key[-i]:
        t += i - 1
        break

if t >= 7:
    print("YES")
else:
    print("NO")

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

S = input()
target = "keyence"
del_len = len(S) - len(target)

if S=="target":
    print("YES")
else:
    for i in range(len(S) - del_len+1):
        s = S[:i] + S[i + del_len:]
        print(s)
        if s==target:
            print("YES")
            sys.exit()
print("NO")

Failing test case input:
slps}n|fxb

Expected output:
NO


Actual output:
s}n|fxb
s}n|fxb
sln|fxb
slp|fxb
slpsfxb
slps}xb
slps}nb
slps}n|
NO


Fixed submission (verdict: Accepted):
import sys

S = input()
target = "keyence"
del_len = len(S) - len(target)

for i in range(len(S) - del_len+1):
    s = S[:i] + S[i + del_len:]
    if s==target:
        print("YES")
        sys.exit()
print("NO")

Problem: p03150
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
S=input()
sk="keyence"
N=len(S)
Nsk=len(sk)

k=0
ans="N0"
if N>=Nsk:
    for i in range(Nsk):
        temp=S[0:i]+S[N-Nsk+i:]
        if temp==sk:
            ans="YES"
    
print(ans)

Failing test case input:
lcygejriodfe

Expected output:
NO


Actual output:
N0


Fixed submission (verdict: Accepted):
S=input()
sk="keyence"
N=len(S)
Nsk=len(sk)

k=0
ans="NO"
if N>=Nsk:
    for i in range(Nsk):
        temp=S[0:i]+S[N-Nsk+i:]
        if temp==sk:
            ans="YES"
    
print(ans)
Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import itertools
s=str(input())
n='keyence'
k=''
w=list(itertools.combinations(range(len(s)+1), 2))
print(w)
for i,y in w:
    k=s[i:y]
    ss=s.replace(k,'',1)
    print(ss)
    if ss==n or k==n:
        print('YES')
        exit()
print('NO')

Failing test case input:
arhkzjbf

Expected output:
NO


Actual output:
[(0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (4, 5), (4, 6), (4, 7), (4, 8), (5, 6), (5, 7), (5, 8), (6, 7), (6, 8), (7, 8)]
rhkzjbf
hkzjbf
kzjbf
zjbf
jbf
bf
f

ahkzjbf
akzjbf
azjbf
ajbf
abf
af
a
arkzjbf
arzjbf
arjbf
arbf
arf
ar
arhzjbf
arhjbf
arhbf
arhf
arh
arhkjbf
arhkbf
arhkf
arhk
arhkzbf
arhkzf
arhkz
arhkzjf
arhkzj
arhkzjb
NO


Fixed submission (verdict: Accepted):

import itertools
s=str(input())
n='keyence'
k=''
w=list(itertools.combinations(range(len(s)+1), 2))
for i,y in w:
    k=s[i:y]
    ss=s.replace(k,'',1)
    
    if ss==n or k==n:
        print('YES')
        exit()
print('NO')

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()
l=len(S)
a=0
for i in range(l):
  for j in range(i+1,l):
    if S[:i]+S[j:]=="keyence":
      a=1
print(["NO","YES"][a])

Failing test case input:
keyence

Expected output:
YES

Actual output:
NO


Fixed submission (verdict: Accepted):
S=input()
l=len(S)
a=0
for i in range(l):
  for j in range(i,l):
    if S[:i]+S[j:]=="keyence":
      a=1
print(["NO","YES"][a])

Problem: p03150
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys



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


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    S = input()
    key = "keyence"
    if key in S:
        print("YES")
        return

    for i in range(1, 6):
        l = key[:i]
        r = key[i:]
        if S.find(l) and S.find(r):
            if S.find(l) + i <= S.find(r):
                print("Yes")
                return
    print("No")
    return


if __name__ == "__main__":
    main()


Failing test case input:
icnyjcsfoeee

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
import sys



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


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    S = input()
    key = "keyence"
    if key in S:
        print("YES")
        return

    for i in range(len(S) - 1):
        for j in range(i + 1, len(S)):
            if S[:i] + S[j:] == key:
                print("YES")
                return

    print("NO")
    return


if __name__ == "__main__":
    main()
Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import re
s = input()
keyence = 'keyence'
for i in range(8):
    fs, es = keyence[:i], keyence[i:]
    print(fs, es)
    fsis = [m.start() for m in re.finditer(fs, s)]
    esis = [m.start() for m in re.finditer(es, s)]
    for fsi in fsis:
        for esi in esis:
            if fsi + len(fs) <= esi:
                print('YES')
                exit()
print('NO')

Failing test case input:
hcmzrfka

Expected output:
NO


Actual output:
 keyence
k eyence
ke yence
key ence
keye nce
keyen ce
keyenc e
keyence 
NO


Fixed submission (verdict: Accepted):
import re
s = input()
keyence = 'keyence'
for i in range(7):
    fs, es = keyence[:i], keyence[i:]
    
    fsis = [m.start() for m in re.finditer(fs, s)]
    esis = [m.start() for m in re.finditer(es, s)]
    for fsi in fsis:
        for esi in esis:
            
            if fsi + len(fs) <= esi:
                if es == 'keyence' and (esi == 0 or esi + len(es) == len(s)):
                    print('YES')
                    exit()
                elif fsi == 0 and esi + len(es) == len(s):
                    print('YES')
                    exit()
print('NO')

Problem: p03150
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s=list(input())
for i in range(len(s)):
    for j in range(i, len(s)+1):
        if s[:i]+s[j:]=='keyence':
            print('YES')
            exit()
print('NO')

Failing test case input:
keyofscience

Expected output:
YES

Actual output:
NO


Fixed submission (verdict: Accepted):
s=input()
for i in range(len(s)):
    for j in range(i, len(s)+1):
        if s[:i]+s[j:]=='keyence':
            print('YES')
            exit()
print('NO')

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
key = "keyence"
ans = "No"
for i in range(len(S)):
    for j in range(i,len(S)):
        
        if S[:i] + S[j:] == key:
            ans = "Yes"
print(ans)

Failing test case input:
eeyofscienck

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
S = input()
key = "keyence"
ans = "NO"
for i in range(len(S)):
    for j in range(i,len(S)):
        
        if S[:i] + S[j:] == key:
            ans = "YES"
print(ans)
Problem: p03150
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

S = list(input())

result = 'NO'

for i in range(len(S)):
    Scpy = S.copy()
    for j in range(i,len(S)):
        Scond = Scpy[:i]+Scpy[j:]
        print(Scond)
        if (''.join(Scond)) == ('keyence'):
            result = 'YES'
            break
    else:
        continue
    break
print(result)

Failing test case input:
mkfrazch

Expected output:
NO


Actual output:
['m', 'k', 'f', 'r', 'a', 'z', 'c', 'h']
['k', 'f', 'r', 'a', 'z', 'c', 'h']
['f', 'r', 'a', 'z', 'c', 'h']
['r', 'a', 'z', 'c', 'h']
['a', 'z', 'c', 'h']
['z', 'c', 'h']
['c', 'h']
['h']
['m', 'k', 'f', 'r', 'a', 'z', 'c', 'h']
['m', 'f', 'r', 'a', 'z', 'c', 'h']
['m', 'r', 'a', 'z', 'c', 'h']
['m', 'a', 'z', 'c', 'h']
['m', 'z', 'c', 'h']
['m', 'c', 'h']
['m', 'h']
['m', 'k', 'f', 'r', 'a', 'z', 'c', 'h']
['m', 'k', 'r', 'a', 'z', 'c', 'h']
['m', 'k', 'a', 'z', 'c', 'h']
['m', 'k', 'z', 'c', 'h']
['m', 'k', 'c', 'h']
['m', 'k', 'h']
['m', 'k', 'f', 'r', 'a', 'z', 'c', 'h']
['m', 'k', 'f', 'a', 'z', 'c', 'h']
['m', 'k', 'f', 'z', 'c', 'h']
['m', 'k', 'f', 'c', 'h']
['m', 'k', 'f', 'h']
['m', 'k', 'f', 'r', 'a', 'z', 'c', 'h']
['m', 'k', 'f', 'r', 'z', 'c', 'h']
['m', 'k', 'f', 'r', 'c', 'h']
['m', 'k', 'f', 'r', 'h']
['m', 'k', 'f', 'r', 'a', 'z', 'c', 'h']
['m', 'k', 'f', 'r', 'a', 'c', 'h']
['m', 'k', 'f', 'r', 'a', 'h']
['m', 'k', 'f', 'r', 'a', 'z', 'c', 'h']
['m', 'k', 'f', 'r', 'a', 'z', 'h']
['m', 'k', 'f', 'r', 'a', 'z', 'c', 'h']
NO


Fixed submission (verdict: Accepted):

S = list(input())

result = 'NO'
for i in range(len(S)):
    Scpy = S.copy()
    for j in range(i,len(S)):
        Scond = Scpy[:i]+Scpy[j:]
        if (''.join(Scond)) == ('keyence'):
            result = 'YES'
            break
    else:
        continue
    break
print(result)

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    S = input()
    n = len(S)
    key = 'keyence'
    if S == key:
        print('YES')
        return
    for i, k in enumerate(key):
        if S[i] != k:
            rest = key[i:]
            for j in range(i, n):
                if S[j:] == rest:
                    print('YES')
                    return
    print('NO')
main()

Failing test case input:
icmyjcsfoeee

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
def main():
    S = input()
    n = len(S)
    key = 'keyence'
    if S == key:
        print('YES')
        return
    for i, k in enumerate(key):
        if S[i] != k:
            rest = key[i:]
            for j in range(i, n):
                
                if S[j:] == rest:
                    print('YES')
                    return
            prinｔ('NO')
            return
    print('NO')
main()
Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()

n=len(s)
flag=False
for i in range(n):
    for j in range(i,n):
        if (s[:i]+s[j:])=='keyence':
            flag=True
        print(s[:i]+s[j:])
print('Yes' if flag else 'No')


Failing test case input:
mcjydjsfodee

Expected output:
NO


Actual output:
mcjydjsfodee
cjydjsfodee
jydjsfodee
ydjsfodee
djsfodee
jsfodee
sfodee
fodee
odee
dee
ee
e
mcjydjsfodee
mjydjsfodee
mydjsfodee
mdjsfodee
mjsfodee
msfodee
mfodee
modee
mdee
mee
me
mcjydjsfodee
mcydjsfodee
mcdjsfodee
mcjsfodee
mcsfodee
mcfodee
mcodee
mcdee
mcee
mce
mcjydjsfodee
mcjdjsfodee
mcjjsfodee
mcjsfodee
mcjfodee
mcjodee
mcjdee
mcjee
mcje
mcjydjsfodee
mcjyjsfodee
mcjysfodee
mcjyfodee
mcjyodee
mcjydee
mcjyee
mcjye
mcjydjsfodee
mcjydsfodee
mcjydfodee
mcjydodee
mcjyddee
mcjydee
mcjyde
mcjydjsfodee
mcjydjfodee
mcjydjodee
mcjydjdee
mcjydjee
mcjydje
mcjydjsfodee
mcjydjsodee
mcjydjsdee
mcjydjsee
mcjydjse
mcjydjsfodee
mcjydjsfdee
mcjydjsfee
mcjydjsfe
mcjydjsfodee
mcjydjsfoee
mcjydjsfoe
mcjydjsfodee
mcjydjsfode
mcjydjsfodee
No


Fixed submission (verdict: Accepted):
s=input()

n=len(s)
flag=False
for i in range(n):
    for j in range(i,n):
        if (s[:i]+s[j:])=='keyence':
            flag=True
print('YES' if flag else 'NO')

Problem: p03150
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
S = input()
K = "keyence"
for i in range(len(K)):
  print(S[:i], S[(i-(len(K))):])
  if (K[:i] == S[:i]) and (K[(i-(len(K))):] == S[(i-(len(K))):]):
    print("YES")
    exit()
if K == S[:len(K)] or K == S[(-len(K)):]:
  print("YES")
  exit()
print("NO")


Failing test case input:
fblzrhk`

Expected output:
NO


Actual output:
 blzrhk`
f lzrhk`
fb zrhk`
fbl rhk`
fblz hk`
fblzr k`
fblzrh `
NO


Fixed submission (verdict: Accepted):
S = input()
K = "keyence"
for i in range(len(K)):
  if (K[:i] == S[:i]) and (K[(i-(len(K))):] == S[(i-(len(K))):]):
    print("YES")
    exit()
if K == S[:len(K)] or K == S[(-len(K)):]:
  print("YES")
  exit()
print("NO")

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

ans = "N0"
for i in range(len(S)):
    for j in range(i, len(S)):
        s = S[:i] + S[j:]
        if s == "keyence":
            ans = "YES"

print(ans)


Failing test case input:
arhkzjaf

Expected output:
NO


Actual output:
N0


Fixed submission (verdict: Accepted):
S = input()

ans = "NO"
for i in range(len(S)):
    for j in range(i, len(S)):
        s = S[:i] + S[j:]
        if s == "keyence":
            ans = "YES"

print(ans)

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()
for i in range(8):
    if S[:i]+S[len(S)-6+i:] == 'keyence':
        print('YES')
        exit()
print('NO')


Failing test case input:
keyofscience

Expected output:
YES

Actual output:
NO


Fixed submission (verdict: Accepted):
S=input()
for i in range(8):
    if S[:i]+S[len(S)-7+i:] == 'keyence':
        print('YES')
        exit()
print('NO')
Problem: p03150
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys



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


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    S = input()
    key = "keyence"
    if key in S:
        print("YES")
        return

    for i in range(1, 6):
        l = key[:i]
        r = key[i:]
        if S.find(l) and S.find(r):
            if S.find(l) + i <= S.find(r):
                print("YES")
                return
    print("NO")
    return


if __name__ == "__main__":
    main()


Failing test case input:
neyemce

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
import sys



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


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    S = input()
    key = "keyence"
    if key in S:
        print("YES")
        return

    for i in range(len(S) - 1):
        for j in range(i + 1, len(S)):
            if S[:i] + S[j:] == key:
                print("YES")
                return

    print("NO")
    return


if __name__ == "__main__":
    main()

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()
T="keyence"
if S[:7]==T:
    print("YES")
    exit()
for i in range(len(S)-1):
    for j in range(i,len(S)-1):
        if S[:i]+S[j:]==T:
            print("YES")
            exit()
print("No")

Failing test case input:
arhkyfha

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
S=input()
T="keyence"
if S[:7]==T:
    print("YES")
    exit()
for i in range(len(S)-1):
    for j in range(i,len(S)):
        if S[:i]+S[j:]==T:
            print("YES")
            exit()
print("NO")

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import fnmatch
S=[]
S.append(input())
if S == fnmatch.filter(S, "*keyence") or S == fnmatch.filter(S, "k*eyence") or S == fnmatch.filter(S, "ke*yence") or S == fnmatch.filter(S, "key*ence") or S == fnmatch.filter(S, "keye*nce") or S == fnmatch.filter(S, "keyen*ce") or S == fnmatch.filter(S, "keyenc*e") or S == fnmatch.filter(S, "keyence*"):
  print("Yes")
else:
  print("No")

Failing test case input:
eeyofscienck

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
import fnmatch
S=[]
S.append(input())
if S == fnmatch.filter(S, "*keyence") or S == fnmatch.filter(S, "k*eyence") or S == fnmatch.filter(S, "ke*yence") or S == fnmatch.filter(S, "key*ence") or S == fnmatch.filter(S, "keye*nce") or S == fnmatch.filter(S, "keyen*ce") or S == fnmatch.filter(S, "keyenc*e") or S == fnmatch.filter(S, "keyence*"):
  print("YES")
else:
  print("NO")
Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



import re












S = input()

if S[:7] == "keyence" or S[-7:]=="keyence":
    print("YES")
    exit()
else:
    ans = "No"
    for i in range(1,7):
        front = "keyence"[:i]
        back = "keyence"[i:]
        if S[:i] == front and S[-len(back):]==back:
            print("YES")
            exit()
    print(ans)







Failing test case input:
arhkzbjf

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):



import re












S = input()

if S[:7] == "keyence" or S[-7:]=="keyence":
    print("YES")
    exit()
else:
    ans = "NO"
    for i in range(1,7):
        front = "keyence"[:i]
        back = "keyence"[i:]
        if S[:i] == front and S[-len(back):]==back:
            print("YES")
            exit()
    print(ans)

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()

flag = False
n = len(s)
for i in range(n):
    for j in range(i,n):
        print(s[:i] +s[j:])
        if 'keyence' == s[:i] +s[j:]:
            flag = True

if flag:
    print('YES')
else:
    print('NO')

Failing test case input:
icnejcsfoyee

Expected output:
NO


Actual output:
icnejcsfoyee
cnejcsfoyee
nejcsfoyee
ejcsfoyee
jcsfoyee
csfoyee
sfoyee
foyee
oyee
yee
ee
e
icnejcsfoyee
inejcsfoyee
iejcsfoyee
ijcsfoyee
icsfoyee
isfoyee
ifoyee
ioyee
iyee
iee
ie
icnejcsfoyee
icejcsfoyee
icjcsfoyee
iccsfoyee
icsfoyee
icfoyee
icoyee
icyee
icee
ice
icnejcsfoyee
icnjcsfoyee
icncsfoyee
icnsfoyee
icnfoyee
icnoyee
icnyee
icnee
icne
icnejcsfoyee
icnecsfoyee
icnesfoyee
icnefoyee
icneoyee
icneyee
icneee
icnee
icnejcsfoyee
icnejsfoyee
icnejfoyee
icnejoyee
icnejyee
icnejee
icneje
icnejcsfoyee
icnejcfoyee
icnejcoyee
icnejcyee
icnejcee
icnejce
icnejcsfoyee
icnejcsoyee
icnejcsyee
icnejcsee
icnejcse
icnejcsfoyee
icnejcsfyee
icnejcsfee
icnejcsfe
icnejcsfoyee
icnejcsfoee
icnejcsfoe
icnejcsfoyee
icnejcsfoye
icnejcsfoyee
NO


Fixed submission (verdict: Accepted):
s = input()

flag = False
n = len(s)
for i in range(n):
    for j in range(i,n):
        if 'keyence' == s[:i] +s[j:]:
            flag = True

if flag:
    print('YES')
else:
    print('NO')

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
key = "keyence"
for i in range(len(key)+1):
  if key == S[:i] + S[len(S)-len(key)+i:]:
    print("Yes")
    break
else:
  print("No")


Failing test case input:
slzs{nbfp|

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
S = input()
key = "keyence"
for i in range(len(key)+1):
  if key == S[:i] + S[len(S)-len(key)+i:]:
    print("YES")
    break
else:
  print("NO")
Problem: p03150
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s=input()
k='keyence'
if k in s:
    exit(print('YES'))

for i in range(len(k)):
    print(s[:i], s[len(k)-i:])
    if s[:i]+s[len(s)-len(k)+i:] == k:
        exit(print('YES'))
print('NO')


Failing test case input:
lcygejriodfe

Expected output:
NO


Actual output:
 iodfe
l riodfe
lc jriodfe
lcy ejriodfe
lcyg gejriodfe
lcyge ygejriodfe
lcygej cygejriodfe
NO


Fixed submission (verdict: Accepted):
s=input()
k='keyence'
if k in s:
    exit(print('YES'))

for i in range(len(k)):
    
    if s[:i]+s[len(s)-len(k)+i:] == k:
        exit(print('YES'))
print('NO')

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()
flag=0
for i in range(len(S)):
    for j in range(i+1,len(S)):
        if S[0:i]+S[j:] == 'keyence':
            flag=1
if flag==1:
    print("YES")
else:
    print("NO")

Failing test case input:
keyence

Expected output:
YES

Actual output:
NO


Fixed submission (verdict: Accepted):
S=input()
if S == "keyence":
  print("YES")
else:

  flag=0
  for i in range(len(S)):
      for j in range(i+1,len(S)):
          if S[0:i]+S[j:] == 'keyence':
              flag=1
  if flag==1:
      print("YES")
  else:
      print("NO")

Problem: p03150
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s=input()
k="keyence"
t=""
for i in range(7):
  if k[i]!=s[i]:
    t+=k[:i]
    break
for j in range(7):
  if k[-j-1]!=s[-j-1]:
    t+=k[-j:]
    break
print("YES" if t==k else "NO")

Failing test case input:
eeyofscienck

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
s=input()
k="keyence"
t=""
for i in range(7):
  if k[i]!=s[i]:
    t+=k[:i]
    break
else:
  print("YES")
  exit()
print("YES" if t+s[i-7:]==k else "NO")

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
Key_str = 7

S = str(input())
count =0

if len(S)<Key_str:
    print("No")

else:
    del_str = len(S)-Key_str
    
    for i in range(len(S)-del_str):
        try_str = S[:i] + S[i+del_str:]
        if try_str == 'keyence':
            print("Yes")
            count+=1
            break
    if count==0:
        print("No")
        

            
            
            
    

Failing test case input:
ecleyen

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
Key_str = 7

S = str(input())
count =0

if len(S)<Key_str:
    print("No")

else:
    del_str = len(S)-Key_str
    
    for i in range(len(S)-del_str):
        try_str = S[:i] + S[i+del_str:]
        if try_str == 'keyence':
            print("YES")
            count+=1
            break
    if count==0:
        print("NO")

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

s = input()

for i in range(len(s)):
    if s[:i] + s[i + len(s)-7:] == "keyence":
        print("YES")
        break
    else:
        print("NO")


Failing test case input:
{pfbn{szls

Expected output:
NO


Actual output:
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO


Fixed submission (verdict: Accepted):
s = input()

for i in range(len(s)):
    if s[:i] + s[i+len(s)-7:] == 'keyence':
        print('YES')
        break
else:
    print('NO')
Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import exit
import math
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

s=input()

key = "keyence"

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

Failing test case input:
fbmzrhk`

Expected output:
NO


Actual output:
bmzrhk`
fmzrhk`
fbzrhk`
fbmrhk`
fbmzhk`
fbmzrk`
fbmzrh`
fbmzrhk
No


Fixed submission (verdict: Accepted):
from sys import exit
import math
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

s=input()

key = "keyence"

for i in range(len(s)):
    j = i + len(s) -7
    if s[:i] + s[j:] == key:
        print("YES")
        exit()
print("NO")

Problem: p03150
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
S = input()


ans = True
for i in range(len(S)):
    for j in range(i, len(S)):
        moji = S[:i] + S[j:]
        if moji == 'keyence':
            ans = True
            break

if ans:
    print('YES')
else:
    print('NO')


Failing test case input:
eeeofsjdyicm

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
S = input()


ans = False
for i in range(len(S)):
    for j in range(i, len(S)):
        moji = S[:i] + S[j:]
        if moji == 'keyence':
            ans = True
            break

if ans:
    print('YES')
else:
    print('NO')

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = str(input())



for i in range(len(A)):
  for j in range(len(A)):
    b =A[:i]+A[len(A)-j:len(A)]
    if b == "keyence":
      print("YES")
      exit()
    elif i==len(A):
      print("NO")
      exit()
    else:
      continue


Failing test case input:
ahfykhra

Expected output:
NO


Actual output:

Fixed submission (verdict: Accepted):
A = str(input())

for i in range(len(A)):
  for j in range(len(A)):
    b =A[:i]+A[len(A)-j:len(A)]
    if b == "keyence":
      print("YES")
      exit()
    else:
      continue
print("NO")

Problem: p03150
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

ans = "N0"
for i in range(len(S)):
    for j in range(i + 1, len(S)):
        s = S[:i] + S[j:]
        if s == "keyence":
            ans = "YES"

print(ans)


Failing test case input:
neyelce

Expected output:
NO


Actual output:
N0


Fixed submission (verdict: Accepted):
S = input()

ans = "NO"
for i in range(len(S)):
    for j in range(i, len(S)):
        s = S[:i] + S[j:]
        if s == "keyence":
            ans = "YES"

print(ans)