Submission #6939848


Source Code Expand

Copy
#include<bits/stdc++.h>
using namespace std;

int main(){
  string s="keyence",t;
  cin>>t;
  for(int i=0;i<(int)t.size();i++){
    if(s[i]!=t[i]&&i<(int)s.size()){
      while(s[i]!=t[i]){
        i++;
      }
      if(s.substr(i)!=t.substr(i)){
        cout<<"NO"<<endl;
        return 0;
      }else{
        cout<<"YES"<<endl;
        return 0;
      }
    }
  }
  cout<<"YES"<<endl;
  return 0;
}

Submission Info

Submission Time
Task B - KEYENCE String
User liszt
Language C++14 (GCC 5.4.1)
Score 0
Code Size 423 Byte
Status

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 s1.txt, s2.txt, s3.txt, s4.txt
All 0 / 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
02.txt
03.txt 1 ms 256 KB
04.txt
05.txt 1 ms 256 KB
06.txt
07.txt
08.txt 1 ms 256 KB
09.txt
10.txt
11.txt
12.txt
13.txt
14.txt
s1.txt
s2.txt 1 ms 256 KB
s3.txt
s4.txt 1 ms 256 KB