Submission #3998773


Source Code Expand

Copy
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
#define MOD 1000000007
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3f
using namespace std;
typedef long long ll;
typedef pair<int,int>P;

int main(){
	string s;cin>>s;
	rep(i,s.size()){
		for(int j=i;j<s.size();j++){
			string t;
			for(int k=0;k<i;k++)t+=s[k];
			for(int k=j;k<s.size();k++)t+=s[k];
			if(t=="keyence"){
				puts("YES");return 0;
			}
		}
	}
	puts("NO");
}

Submission Info

Submission Time
Task B - KEYENCE String
User autumn_eel
Language C++14 (GCC 5.4.1)
Score 200
Code Size 468 Byte
Status
Exec Time 5 ms
Memory 256 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 s1.txt, s2.txt, s3.txt, s4.txt
All 200 / 200 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, s1.txt, s2.txt, s3.txt, s4.txt
Case Name Status Exec Time Memory
01.txt 1 ms 256 KB
02.txt 2 ms 256 KB
03.txt 1 ms 256 KB
04.txt 1 ms 256 KB
05.txt 1 ms 256 KB
06.txt 1 ms 256 KB
07.txt 2 ms 256 KB
08.txt 1 ms 256 KB
09.txt 1 ms 256 KB
10.txt 1 ms 256 KB
11.txt 5 ms 256 KB
12.txt 2 ms 256 KB
13.txt 1 ms 256 KB
14.txt 1 ms 256 KB
s1.txt 1 ms 256 KB
s2.txt 1 ms 256 KB
s3.txt 1 ms 256 KB
s4.txt 1 ms 256 KB