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
Exec Time 98 ms
Memory 256 KB

Judge Result

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