criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#include<string>
#include<iostream>
#include<vector>
#include<cstdlib>
using namespace std;
 
template <class T> using V = vector<T>;
 
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
 
const long long INF = 1LL << 60;
 
using ll = long long;
using db = double;
using st = string;
using ch = char;
using bl = bool;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
using vbl = V<bl>;
 
 
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define rFOR(i,a,b) for(ll i=(a);i>(b);i--)
#define oFOR(i,a,b) for(ll i=(a);i<(b);i+=2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn,(a).en)
#define REV(a) reverse((a).bgn,(a).en)
#define M(a,b) max(a,b)
#define rM(a,b) min(a,b)
#define fi first
#define se second
#define sz size()
#define gcd(a,b) __gcd(a,b)
#define co(a) cout<<a<<endl;
#define ci(a) cin>>a;
 
 
ll sum(ll n) {
  ll m=0;
  FOR(i,0,20){
    m+=n%10;
    n/=10;
    if(n==0){
      break;
    }
  }
  return m;
}
 
 
const int MAX = 510000;
const int MOD = 1000000007;
 
long long fac[MAX], finv[MAX], inv[MAX];
 
void Comuse() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}
 
 
#define comuse Comuse()
 
ll combi(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
 
 
 
 
ll lcm(ll a,ll b){
  ll n;
  n=a/gcd(a,b)*b;
  return n;
}
 
 
/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/
 
 
signed main() {
  vch A(7);
  st s="keyence";
  FOR(i,0,7){
    A[i]=s[i];
  }
  ci(s)
  ll now=0;
  fl b=false;
  FOR(i,0,s.sz){
    if(A[now]==s[i]){
      now++;
    }
    else if(b){
      co("NO")
        break;
    }
    else{
      b=true;
    }
  }
  if(!b){
    co("YES")
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:122:3: error: 'fl' was not declared in this scope; did you mean 'll'?
  122 |   fl b=false;
      |   ^~
      |   ll
a.cc:127:13: error: 'b' was not declared in this scope
  127 |     else if(b){
      |             ^
a.cc:135:7: error: 'b' was not declared in this scope
  135 |   if(!b){
      |       ^
Language: C++

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

int main(){
	string a = "keyence" ;
  	string s ;
  	cin >> s ;
  	int i = 0 ;
  	int j = 0 ;
  	int k = 0 ;
  	bool ok = false ;
  	for(int b = 0 ; b <(int) s.size() ; b++){
    	if(s[b] == a[j])
          j++ ;
      	else
          break ;
    }
  	for(int b = 0 ; b < (int) s.size() ; b++){
    	if(s[s.size()-1 - i] == a[6-k])
          	k++ ;
    }
  	if(j+k == 7)
      cout << "YES\n" ;
  	else
      cout << "NO\n" ;
}


Compiler output:
a.cc:1:2: error: stray '\' in program
    1 | v\#include<bits/stdc++.h>
      |  ^
a.cc:1:3: error: stray '#' in program
    1 | v\#include<bits/stdc++.h>
      |   ^
a.cc:1:1: error: 'v' does not name a type
    1 | v\#include<bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
    5 |         string a = "keyence" ;
      |         ^~~~~~
a.cc:6:15: error: expected ';' before 's'
    6 |         string s ;
      |               ^~
      |               ;
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> s ;
      |         ^~~
a.cc:7:16: error: 's' was not declared in this scope
    7 |         cin >> s ;
      |                ^
a.cc:13:20: error: 'a' was not declared in this scope
   13 |         if(s[b] == a[j])
      |                    ^
a.cc:19:33: error: 'a' was not declared in this scope
   19 |         if(s[s.size()-1 - i] == a[6-k])
      |                                 ^
a.cc:23:7: error: 'cout' was not declared in this scope
   23 |       cout << "YES\n" ;
      |       ^~~~
a.cc:25:7: error: 'cout' was not declared in this scope
   25 |       cout << "NO\n" ;
      |       ^~~~
Language: C++

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

#define rep(i,n) for(ll i=0;i<n;i++)
#define ll long long

int main(){
    string s;
    cin>>s;
    int n=s.size();
    if(s=="keyence"){
        cout<<"YES"<<endl;
        return 0;
    }
    int a=1;
    else if(n>7){
    rep(i,8){
        s.erase(i,i+n-7);
        if(s=="keyence"){
        cout<<"YES"<<endl;
        a=0;
        break;
        }
    }
    }
    if(a) cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'else' without a previous 'if'
   16 |     else if(n>7){
      |     ^~~~
Language: C++

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

int main(){
    string word={"keyence"};
    string S;
    cin>>S;
    
    int N = S.size();
    
    int i,j,k=0;
    int count=0;
    
    for(i=0;i<N;i++){
        if(S[i]==word[k]){
            while(S[i]==word[k]){
                i++;
                k++;
            }
            
            if(k==8){
                cout<<"YES"<<endl;
                return 0;
            }
            
            for(;i<N;i++){
                if(S[i]==word[k]){
                    if(word.substr(k,N-k+1)==S.substr(i,N-k+1)){
                        cout<<"YES"<<endl;
                        return 0;
                    }
                }            
            }

        }
    }

    cout<<"NO"<<endl;

    
}

Compiler output:
a.cc:1:13: error: stray '#' in program
    1 | keyofscience#include<bits/stdc++.h>
      |             ^
a.cc:1:1: error: 'keyofscience' does not name a type
    1 | keyofscience#include<bits/stdc++.h>
      | ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     string word={"keyence"};
      |     ^~~~~~
a.cc:6:11: error: expected ';' before 'S'
    6 |     string S;
      |           ^~
      |           ;
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin>>S;
      |     ^~~
a.cc:7:10: error: 'S' was not declared in this scope
    7 |     cin>>S;
      |          ^
a.cc:15:18: error: 'word' was not declared in this scope
   15 |         if(S[i]==word[k]){
      |                  ^~~~
a.cc:22:17: error: 'cout' was not declared in this scope; did you mean 'count'?
   22 |                 cout<<"YES"<<endl;
      |                 ^~~~
      |                 count
a.cc:22:30: error: 'endl' was not declared in this scope
   22 |                 cout<<"YES"<<endl;
      |                              ^~~~
a.cc:29:25: error: 'cout' was not declared in this scope; did you mean 'count'?
   29 |                         cout<<"YES"<<endl;
      |                         ^~~~
      |                         count
a.cc:29:38: error: 'endl' was not declared in this scope
   29 |                         cout<<"YES"<<endl;
      |                                      ^~~~
a.cc:38:5: error: 'cout' was not declared in this scope; did you mean 'count'?
   38 |     cout<<"NO"<<endl;
      |     ^~~~
      |     count
a.cc:38:17: error: 'endl' was not declared in this scope
   38 |     cout<<"NO"<<endl;
      |                 ^~~~
Language: Java

import java.util.*;
 
public class Main {
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		String K = "keyence";
		String S = sc.nextString();
        boolean fl = false;
        int l = S.length();
      	for(int i=6;0<=i;i--){
        	if(S.substring(0,i)== K.substring(0,i)){
        		if(S.substring(l-(6-i))==K.substring(6-i)){
                	System.out.println("YES");
                  	return;
                }
            }
        
        }
      	if(!fl){
          System.out.println("NO");
        }
     } 
}  


Compiler output:
Main.java:7: error: cannot find symbol
		String S = sc.nextString();
		             ^
  symbol:   method nextString()
  location: variable sc of type Scanner
1 error
Language: Java

import java.util.*;
 
public class Main {
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		String K = "keyence";
		String S = sc.nextInt();
        boolean fl = false;
        int l = S.length();
      	for(i=6;0<=i;i--){
        	if(S.substring(0,i)== K.substring(0,i)){
        		if(S.substring(l-(6-i))==K.substring(6-i)){
                	System.out.println("YES");
                  	return;
                }
            }
        
        }
      	if(!fl){
          System.out.println("NO");
        }
     } 
}  

Compiler output:
Main.java:7: error: incompatible types: int cannot be converted to String
		String S = sc.nextInt();
		                     ^
Main.java:10: error: cannot find symbol
      	for(i=6;0<=i;i--){
      	    ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
      	for(i=6;0<=i;i--){
      	           ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
      	for(i=6;0<=i;i--){
      	             ^
  symbol:   variable i
  location: class Main
Main.java:11: error: cannot find symbol
        	if(S.substring(0,i)== K.substring(0,i)){
        	                 ^
  symbol:   variable i
  location: class Main
Main.java:11: error: cannot find symbol
        	if(S.substring(0,i)== K.substring(0,i)){
        	                                    ^
  symbol:   variable i
  location: class Main
Main.java:12: error: cannot find symbol
        		if(S.substring(l-(6-i))==K.substring(6-i)){
        		                    ^
  symbol:   variable i
  location: class Main
Main.java:12: error: cannot find symbol
        		if(S.substring(l-(6-i))==K.substring(6-i)){
        		                                       ^
  symbol:   variable i
  location: class Main
8 errors
Language: C++

#include <cstdio>

#include <algorithm>

using namespace std;

const int N = 110;

char s[N], t[] = "keyence";
int mp[N], ms[N];

int main() {
  scanf("%s", s);
  int n = strlen(s);
  int i = 0;
  while (i < 7 && s[i] == t[i])
    ++i;
  if (n < 7) {
    puts("NO");
    return 0;
  }
  if (strcmp(s + n - (7 - i), t + i) == 0)
    puts("YES");
  else
    puts("NO");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: 'strlen' was not declared in this scope
   14 |   int n = strlen(s);
      |           ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 | 
a.cc:22:7: error: 'strcmp' was not declared in this scope
   22 |   if (strcmp(s + n - (7 - i), t + i) == 0)
      |       ^~~~~~
a.cc:22:7: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C

int main() {
	char s[1000];
	char t[] = "keyence";
	int n = strlen(s);
	for (int i = 0; i <= 7; i++) {
		for (int j = 0; j < 7; j++) {
			if (((j < i) ? s[j] : s[n - 7 + j]) != t[j]) break;
		}
		if (j == 7) {
			puts("YES");
			return 0;
		}
	}
	puts("NO");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:17: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    4 |         int n = strlen(s);
      |                 ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen'
  +++ |+#include <string.h>
    1 | int main() {
main.c:4:17: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    4 |         int n = strlen(s);
      |                 ^~~~~~
main.c:4:17: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:9:21: error: 'j' undeclared (first use in this function)
    9 |                 if (j == 7) {
      |                     ^
main.c:9:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:25: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
   10 |                         puts("YES");
      |                         ^~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'puts'
  +++ |+#include <stdio.h>
    1 | int main() {
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
    string S;
    string comp="keyence";

    cin >> S;
    if(S[0]=='k'){
        for(int i=1;i<7;i++){
            if(comp[i]!=S[i]){
                int pos =S.find(&comp[i],i);
                if(pos<0){
                    cout<<"NO":
                }else{
                    cout<<"YES";
                }
            }
        }

    }else{
        int pos = S.find("keyence",1);
        if(pos<0){
            cout<<"NO";
        }else{
            cout<<"YES";
        }
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:31: error: expected ';' before ':' token
   16 |                     cout<<"NO":
      |                               ^
      |                               ;
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main(){
  string str;
  string key = "keyence";
  cink>>str;
  int len = str.length();
  if(str.substr(0,7)==key){
    cout<<"YES"<<endl;
    return 0;
  }else if(str.substr(len-7,7)==key){
    cout<<"YES"<<endl;
    return 0;
  }else{
    for(int i = 1;i < 7;i++){
        if(str.substr(0,i)+str.substr(len-7+i,7-i)==key){
            cout<<"YES"<<endl;
            return 0;
        }
    }
  }
  cout<<"NO"<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'cink' was not declared in this scope
    8 |   cink>>str;
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
	string S,K;
	int i,l,e;
	cin >> S;
	l = S.size();	
	K = "keyence";
	flg = 0;
	i = 0;
	while(S.at(i) == K.at(i)) {
		i++;
		if(i == 7) break;
	}
	while(i < 7) {
		if(S.at(l - 7 + i) == K.at(i)) {
			i++;
		else {
			break;
		}
	}
	if(i == 7) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'flg' was not declared in this scope
    9 |         flg = 0;
      |         ^~~
a.cc:18:17: error: expected '}' before 'else'
   18 |                 else {
      |                 ^~~~
a.cc:16:48: note: to match this '{'
   16 |                 if(S.at(l - 7 + i) == K.at(i)) {
      |                                                ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

string s;
char ck[]={'k','e','y','e','n','c','e'};
int cnt,c;

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cin>>s;
	for(int i=0;i<s.size();i++)
	{
		if(key==7&&!c)
		{
			cout<<"YES";
			return 0;
		}
		if(s[i]==ck[cnt])
			cnt++;
		else if(c)
		{
			cout<<"NO";
			return 0;
		}
		else
		{
			while(i<s.size()&&s[i]!=ck[cnt]) i++;
			c=1;cnt++;
		}
	}	
	if(cnt==7)
		cout<<"YES";
	else
		cout<<"NO";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:20: error: 'key' was not declared in this scope; did you mean 'key_t'?
   16 |                 if(key==7&&!c)
      |                    ^~~
      |                    key_t
Language: C++

#include<bits/stdc++.h>
using namespace std;int main(){string s,t="keyence";cin>>s;for(int i=0;i<=7;i++){string a=t.substr(0,i),b=t.substr(i,7-i);if(a==s.substr(0,i)&&b==s.substr(s.size()-7+i),7-i)){cout<<"YES";return 0;}}cout<<"NO";}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:174: error: expected primary-expression before ')' token
    2 | using namespace std;int main(){string s,t="keyence";cin>>s;for(int i=0;i<=7;i++){string a=t.substr(0,i),b=t.substr(i,7-i);if(a==s.substr(0,i)&&b==s.substr(s.size()-7+i),7-i)){cout<<"YES";return 0;}}cout<<"NO";}
      |                                                                                                                                                                              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
struct Fast {Fast(){std::cin.tie(0);ios::sync_with_stdio(false);}} fast;

/* define */
#define FOR(I,X,Y) for(long long (I)=(X);(I)<(Y);(I)++)
#define REP(I,X,Y) for(long long (I)=(Y)-1;(I)>=(X);(I)--)
#define ALL(X) (X).begin(),(X).end()
#define pb push_back
#define COUNT(V,X) upper_bound((V).begin(),(V).end(),X)-lower_bound((V).begin(),(V).end(),X)
#define debug(x) cerr<<#x<<':'<<x<<endl;
#define DEBUG(v) cerr<<#v<<':';for(auto xXx:v)cerr<<xXx<<' ';cerr<<endl;
#define Yes(X) if(X){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}
#define YES(X) if(X){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define ctoi(C) (C-'0')

/* alias */
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vii = vector<vector<int>>;
using vl = vector<long long>;
using vll = vector<vector<long long>>;
using pi = pair<int,int>;
using pl = pair<long long,long long>;
template<typename T> using PQ = priority_queue<T>;
template<typename T> using minPQ = priority_queue<T, vector<T>, greater<T>>;

/* const */
const long long dx[] = {1,0,-1,0};
const long long dy[] = {0,1,0,-1};
const long long dx8[] = {1,1,0,-1,-1,-1,0,1};
const long long dy8[] = {0,1,1,1,0,-1,-1,-1};
const long long dx9[] = {1,1,0,-1,-1,-1,0,1,0};
const int INF = 1000000007;
const long long LINF = 1000000000000000007;

/* func */
template <typename T> inline bool chmin(T& a, const T& b) {if (a > b) a = b; return a > b;}
template <typename T> inline bool chmax(T& a, const T& b) {if (a < b) a = b; return a < b;}

/* main */

signed main(){
    string S;
    cin >> S;
    if(S.substr(0,7) == "keyence" || S.substr(S.size-7,7) == "keyence"){
        YES(1);
        return 0;
    }
    FOR(i,0,7){
        string pre = S.substr(0,i);
        string back = S.substr(S.size()-7+i);
        debug(pre)
        debug(back)
        if(pre + back == "keyence"){
            YES(1);
            return 0;
        }
    }
    YES(0);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:49: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   47 |     if(S.substr(0,7) == "keyence" || S.substr(S.size-7,7) == "keyence"){
      |                                               ~~^~~~
      |                                                     ()
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  string a;
  cin>>a;
  size_t b=a.length();
  if(a.find("k")!=-1&&a.find("eyence")!=-1&&a.rfind("e")+1==b)
      cout<<"YES"<<endl;
  else if(a.find("ke")!=-1&&a.find("yence")!=-1&&a.rfind("e")+1==b)
      cout<<"YES"<<endl;
  else if(a.find("key")!=-1&&a.find("ence")!=-1&&a.rfind("e")+1==b)
      cout<<"YES"<<endl;
  else if(a.find("keye")!=-1&&a.find("nce")!=-1&&a.rfind("e")+1==b)
      cout<<"YES"<<endl;
  else if(a.find("keyen")!=-1&&a.find("ce")!=-1&&a.rfind("e")+1==b)
      cout<<"YES"<<endl;
  else if(a.find("keyenc")!=-1&&a.find("e")!=-1&&a.rfind("e")+1==b)
      cout<<"YES"<<endl;
  else if(a.find("keyence")!=-1)
      cout<<"YES"<<endl;
  else if(a.find("k")!=0&&a.find("keyence")=!-1&&a.rfind("e")+1!=b)
    cout<<"NO"<<endl;
  else
    cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: lvalue required as left operand of assignment
   22 |   else if(a.find("k")!=0&&a.find("keyence")=!-1&&a.rfind("e")+1!=b)
      |           ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  string a;
  cin>>a;
  size_t b=a.length();
  if(a.find("k")!=-1&&a.find("eyence")!=-1&&a.rfind("e")+1==b)
      cout<<"YES"<<endl;
  else if(a.find("ke")!=-1&&a.find("yence")!=-1&&a.rfind("e")+1==b)
      cout<<"YES"<<endl;
  else if(a.find("key")!=-1&&a.find("ence")!=-1&&a.rfind("e")+1==b)
      cout<<"YES"<<endl;
  else if(a.find("keye")!=-1&&a.find("nce")!=-1&&a.rfind("e")+1==b)
      cout<<"YES"<<endl;
  else if(a.find("keyen")!=-1&&a.find("ce")!=-1&&a.rfind("e")+1==b)
      cout<<"YES"<<endl;
  else if(a.find("keyenc")!=-1&&a.find("e")!=-1&&a.rfind("e")+1==b)
      cout<<"YES"<<endl;
  else if(a.find("keyence")!=-1)
      cout<<"YES"<<endl;
  else if(a.find("k")!=0&&&a.rfind("e")+1==b)
    cout<<"NO"<<endl;
  else
    cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:35: error: lvalue required as unary '&' operand
   22 |   else if(a.find("k")!=0&&&a.rfind("e")+1==b)
      |                            ~~~~~~~^~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  string a;
  cin>>a;
  size_t b=a.length();
  if(a.find("k")!=-1&&a.find("eyence")!=-1&&a.rfind("e")+1==b)
      cout<<"YES"<<endl;
  else if(a.find("ke")!=-1&&a.find("yence")!=-1&&a.rfind("e")+1==b)
      cout<<"YES"<<endl;
  else if(a.find("key")!=-1&&a.find("ence")!=-1&&a.rfind("e")+1==b)
      cout<<"YES"<<endl;
  else if(a.find("keye")!=-1&&a.find("nce")!=-1&&a.rfind("e")+1==b)
      cout<<"YES"<<endl;
  else if(a.find("keyen")!=-1&&a.find("ce")!=-1&&a.rfind("e")+1==b)
      cout<<"YES"<<endl;
  else if(a.find("keyenc")!=-1&&a.find("e")!=-1&&a.rfind("e")+1==b)
      cout<<"YES"<<endl;
  else if(a.find("keyence")!=-1)
      cout<<"YES"<<endl;
  else if(a.find("k")!=0&&&&a.rfind("e")+1==b)
    cout<<"NO"<<endl;
  else
    cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:30: error: expected ')' before '.' token
   22 |   else if(a.find("k")!=0&&&&a.rfind("e")+1==b)
      |          ~                   ^
      |                              )
a.cc:22:29: error: label 'a' used but not defined
   22 |   else if(a.find("k")!=0&&&&a.rfind("e")+1==b)
      |                             ^
Language: C++

#define LL long long
#define Max 100005
#define Mod 1e9+7
const LL mod=1e9+7;
const LL inf=0x3f3f3f3f;
using namespace std;
int main()
{
	char a[101],b[101]={0};
	scanf("%s",a);
	for(int i=0;a[i];i++)
	{
		if(a[i]>='A' && a[i]<='Z')
			a[i]=a[i]-'A'+'a';
		b[i]=a[i];
	}
		int n=strlen(a);
		for(int i=0;i<n;i++)
			for(int j=i+1;j<n;j++)
		{
			strcpy(a,b);
			strcpy(a+i,a+j);
			if(strcmp(a,"keyence")==0)
			{
				printf("YES\n");
				return 0;
			}
		}
	printf("NO\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'scanf' was not declared in this scope
   10 |         scanf("%s",a);
      |         ^~~~~
a.cc:17:23: error: 'strlen' was not declared in this scope
   17 |                 int n=strlen(a);
      |                       ^~~~~~
a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | #define LL long long
a.cc:21:25: error: 'strcpy' was not declared in this scope
   21 |                         strcpy(a,b);
      |                         ^~~~~~
a.cc:21:25: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:23:28: error: 'strcmp' was not declared in this scope
   23 |                         if(strcmp(a,"keyence")==0)
      |                            ^~~~~~
a.cc:23:28: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:25:33: error: 'printf' was not declared in this scope
   25 |                                 printf("YES\n");
      |                                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #define LL long long
a.cc:29:9: error: 'printf' was not declared in this scope
   29 |         printf("NO\n");
      |         ^~~~~~
a.cc:29:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: Java

import java.util.Scanner;

public class Keyence_String {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		boolean flag = false;
		
		for(int i=0; i<str.length(); i++) {
			for(int j=i; j<=str.length(); j++) {
				StringBuilder strs = new StringBuilder(str);
				if(strs.delete(i, j).toString().equals("keyence")) {
					flag = true;
					System.out.println("YES");
					return;
				}else {
					flag = false;
				}
			}
		}
		if(!flag) {
			System.out.println("NO");
		}
	}
}


Compiler output:
Main.java:3: error: class Keyence_String is public, should be declared in a file named Keyence_String.java
public class Keyence_String {
       ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define MD 1000000007
typedef long long int ll;
typedef pair<ll,ll> P;
template <typename T> std::string tostr(const T& t){std::ostringstream os; os<<t; return os.str();}
int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};

int main(){
    #include <bits/stdc++.h>
using namespace std;
#define MD 1000000007
typedef long long int ll;
typedef pair<ll,ll> P;
template <typename T> std::string tostr(const T& t){std::ostringstream os; os<<t; return os.str();}
int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
 
int main(){
    string s;
    cin>>s;
    int n=s.length();
    for(int i=0;i<n;i++){
        for(int j=i+1;j<n;j++){
            string tmp=s.substr(0,i);
            tmp+=s.substr(j);
            if(tmp=="keyence"){
                cout<<"YES"<<endl;
                return 0;
            }
        }
    }
    cout<<"NO"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:1: error: a template declaration cannot appear at block scope
   15 | template <typename T> std::string tostr(const T& t){std::ostringstream os; os<<t; return os.str();}
      | ^~~~~~~~
a.cc:16:21: error: expected primary-expression before ',' token
   16 | int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
      |                     ^
a.cc:16:37: error: cannot convert '<brace-enclosed initializer list>' to 'int' in assignment
   16 | int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
      |                                     ^
a.cc:18:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   18 | int main(){
      |         ^~
a.cc:18:9: note: remove parentheses to default-initialize a variable
   18 | int main(){
      |         ^~
      |         --
a.cc:18:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:18:11: error: a function-definition is not allowed here before '{' token
   18 | int main(){
      |           ^
a.cc:34:2: error: expected '}' at end of input
   34 | }
      |  ^
a.cc:9:11: note: to match this '{'
    9 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define MD 1000000007
typedef long long int ll;
typedef pair<ll,ll> P;
template <typename T> std::string tostr(const T& t){std::ostringstream os; os<<t; return os.str();}
int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};

int main(){
    #include <bits/stdc++.h>
using namespace std;
#define MD 1000000007
typedef long long int ll;
typedef pair<ll,ll> P;
template <typename T> std::string tostr(const T& t){std::ostringstream os; os<<t; return os.str();}
int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
 
int main(){
    string s;
    cin>>s;
    int n=s.length();
    for(int i=0;i<n;i++){
        for(int j=i+1;j<n;j++){
            string tmp=s.substr(0,i);
            tmp+=s.substr(j);
            if(tmp=="keyence"){
                cout<<"YES"<<endl;
                return 0;
            }
        }
    }
    cout<<"NO"<<endl;
    return 0;
}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:1: error: a template declaration cannot appear at block scope
   15 | template <typename T> std::string tostr(const T& t){std::ostringstream os; os<<t; return os.str();}
      | ^~~~~~~~
a.cc:16:21: error: expected primary-expression before ',' token
   16 | int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
      |                     ^
a.cc:16:37: error: cannot convert '<brace-enclosed initializer list>' to 'int' in assignment
   16 | int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
      |                                     ^
a.cc:18:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   18 | int main(){
      |         ^~
a.cc:18:9: note: remove parentheses to default-initialize a variable
   18 | int main(){
      |         ^~
      |         --
a.cc:18:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:18:11: error: a function-definition is not allowed here before '{' token
   18 | int main(){
      |           ^
Language: C++

 #include "bits/stdc++.h"

using namespace std;

#define sp(x) cout<<setprecision(x);
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define all(a) (a).begin(), (a).end()
#define inf 10000000
#define linf INT64_MAX*0.99
#define print(s) cout<<(s)<<endl

typedef pair<int, int> P;
typedef long long ll;
 
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    string s; cin>>s;
    string reals = s;
    int n = s.length()-1;
    print(n);
    bool flag = false;
    REP(i,8){
        if(s.substr(0,i)+s.substr(n+i-6),7-i)=="keyence") {
            flag=true; 
            break; 
        }
    }
    if(flag == true) print("YES");
    else if(flag == false) print("NO");
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:25:40: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   25 |         if(s.substr(0,i)+s.substr(n+i-6),7-i)=="keyence") {
      |                                        ^
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3696:5: note: declared here
 3696 |     operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
      |     ^~~~~~~~
a.cc:25:46: error: expected primary-expression before '==' token
   25 |         if(s.substr(0,i)+s.substr(n+i-6),7-i)=="keyence") {
      |                                              ^~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>
#include <queue>
#include <map>
#include <unordered_map>
#include <set>
#include <functional>
#include <iomanip>
#include <bitset>
using namespace std;

typedef long long ll;


int main() {
	string s; cin >> s;
	string ans = "keyence";
	if (s == ans) {
		cout << "YES" << endl;
		return 0;
	}
	int n = s.size();
	for (int i = 0; i < n; i++) {
		for (int j = 0; i + j < n; j++) {
			string t = s.substr(0, i) + s.substr(i + j + 1, n - i - j　-　1);
			//cout << t << endl;
			if (ans == t) {
				cout << "YES" << endl;
				return 0;
			}
		}
	}
	cout << "NO" << endl;
	return 0;
}


Compiler output:
a.cc:28:81: error: extended character 　 is not valid in an identifier
   28 |                         string t = s.substr(0, i) + s.substr(i + j + 1, n - i - j　-　1);
      |                                                                                 ^
a.cc:28:85: error: extended character 　 is not valid in an identifier
   28 |                         string t = s.substr(0, i) + s.substr(i + j + 1, n - i - j　-　1);
      |                                                                                     ^
a.cc: In function 'int main()':
a.cc:28:81: error: 'j\U00003000' was not declared in this scope
   28 |                         string t = s.substr(0, i) + s.substr(i + j + 1, n - i - j　-　1);
      |                                                                                 ^~~
a.cc:28:85: error: '\U000030001' was not declared in this scope
   28 |                         string t = s.substr(0, i) + s.substr(i + j + 1, n - i - j　-　1);
      |                                                                                     ^~~
Language: C++

#include <bits/stdc++.h>
#define pb push_back
#define S second
#define F first

using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
int cnt[10];
int32_t main(){
    string a;
    cin >> a;
    int a1 = 0,b1 = 0;
    string b = "keyence",c = "ecneyek";
    for (int i = 0;i < 7;i++){
        if (a[i] == b[i]) a1++;
        else break;
    }
    int n = a.length() - 1;
    for (int i = 0;i < 7;i++){
        if (c[i] == a[n - i]) b1++;
        else break;
    }
    if (a1 + b1 >= 7){ashlfyhaashlfyha
        cout << "YES"<< endl;
    }else cout << "NO" << endl;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:24:23: error: 'ashlfyhaashlfyha' was not declared in this scope
   24 |     if (a1 + b1 >= 7){ashlfyhaashlfyha
      |                       ^~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define pb push_back
#define S second
#define F first

using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
int cnt[10];
int32_t main(){
    string a;
    cin >> a;
    int a1 = 0,b1 = 0;
    string b = "keyence",c = "ecneyek";
    for (int i = 0;i < 7;i++){
        if (a[i] = b[i]) a1++;
        else break;
    }
    int n = a.length() - 1;
    for (int i = 0;i < 7;i++){
        if (c[i] = a[n - i]) b2++;
        else break;
    }
    if (a1 + b1 >= 7){
        cout << "YES"<< endl;
    }else cout << "NO" << endl;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:21:30: error: 'b2' was not declared in this scope; did you mean 'b'?
   21 |         if (c[i] = a[n - i]) b2++;
      |                              ^~
      |                              b
Language: C++

# twitterの回答を見て書いた
#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;
  cin >> S;

  vector<regex> R(8);
  R.at(0) = (".*keyence");
  R.at(1) = ("k.*eyence");
  R.at(2) = ("ke.*yence");
  R.at(3) = ("key.*ence");
  R.at(4) = ("keye.*nce");
  R.at(5) = ("keyen.*ce");
  R.at(6) = ("keyenc.*e");
  R.at(7) = ("keyence.*");

  bool answer = false;
  for(auto r : R) answer |= regex_match(S, r);
  cout << (answer ? "YES" : "NO") << endl;
}


Compiler output:
a.cc:1:3: error: invalid preprocessing directive #twitter\U0000306e\U000056de\U00007b54\U00003092\U0000898b\U00003066\U000066f8\U00003044\U0000305f
    1 | # twitterの回答を見て書いた
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007
int main(){
string s,t="keyence";
cin>>s;
int j=0;
bool f=false,ff=false;
for(int i=0;i<s.size();i++){
  if(j==8){
    if(f){
      cout<<"NO";
      return 0;
    }else{
      break;
    }
  }
  if(s[i]==t[j]){
    if(f) ff=true;
    j++;
  }else{
    if(!ff){
      f=true;
    }else{
      cout<<"NO";
      return 0;
    }
  }
  cout<<"YES";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:2: error: expected '}' at end of input
   31 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<string.h>
using namespace std;


int main(void)
{
    int i=0,j=0,count=0,int flag=0;
    string s,a("keyence");
    cin>>s;

    while(a[i]!='\0'&&s[j]!='\0' && count!=2){
        if(s[j]==a[i]){ i++; j++;}
        else {j++;count++;}
        if(count==1&&flag==0){
            while(a[i]!=s[j] &&s[j]!='\0'){j++;flag++;}
        }
    }
    if(s[j]=='\0')count++;
    if(i==7&&count<=1){cout<<"YES"<<endl;}else cout<<"NO"<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: expected unqualified-id before 'int'
    8 |     int i=0,j=0,count=0,int flag=0;
      |                         ^~~
a.cc:15:22: error: 'flag' was not declared in this scope
   15 |         if(count==1&&flag==0){
      |                      ^~~~
Language: Java

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int len = s.length();

        if (s.substring(0, 1).equals("k") || s.substring(len - 1, len).equals("e")) {
            if (s.contains("k") && s.contains("eyence")) {
                System.out.println("YES");
            } else if (s.contains("ke") && s.contains("yence")) {
                System.out.println("YES");
            } else if (s.contains("key") && s.contains("ence")) {
                System.out.println("YES");
            } else if (s.contains("keye") && s.contains("nce")) {
                System.out.println("YES");
            } else if (s.contains("keyen") && s.contains("ce")) {
                System.out.println("YES");
            } else if (s.contains("keyenc") && s.contains("e")) {
                System.out.println("YES");
            } else if (s.contains("keyence")) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        } else {
            System.out.println("NO");
        }
    }
}










# メモ

Compiler output:
Main.java:45: error: illegal character: '#'
# ??
^
Main.java:45: error: reached end of file while parsing
# ??
    ^
2 errors
Language: C++

#include <bits/stdc++.h>

using namespace std;

const int NUM[4] = { 1,9,7,4 };

int main() {
	string str = NULL;
	scanf("%s", str);

	for (int j = 0; j < 4; j++) {
		scanf("%s", &iNum[j]);
		for (int i = 0; i < 4; i++) {
			if (iNum[j] == NUM[i]) {
				total++;
			}
		}
	}

	if (total == 4) {
		printf("YES\n");
	}
	else {
		printf("NO\n");
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: 'iNum' was not declared in this scope
   12 |                 scanf("%s", &iNum[j]);
      |                              ^~~~
a.cc:15:33: error: 'total' was not declared in this scope
   15 |                                 total++;
      |                                 ^~~~~
a.cc:20:13: error: 'total' was not declared in this scope
   20 |         if (total == 4) {
      |             ^~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

const char keyence[7] = { 'k','e','y','e','n','c','e' };

int main() {
	char tmp[256] = { 0 };
	int iStr[7] = { 0 };

	fgets(tmp, sizeof(tmp), stdin);
	std::string str(tmp);

	if ((7 <= str.size()) && (str.size() <= 100)) {
		for (int i = 0; i < 7; i++) {
			iStr[i] = std::count(str.cbegin(), str.cend(), keyence[i]);
		}
	}

	if ((iStr[0] > 0) && (iStr[1] > 2) && (iStr[2] > 0) && (iStr[4] > 0) && (iStr[5] > 0)) {
		printf("YES\n");
	}
	else {
		printf("NO\n");
	}

	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:27:18: error: expected '}' at end of input
   27 |         return 0;
      |                  ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    string s;
    cin>>s;
    int l=s.size();
    int e=0;
    char c[110];
    bool k=false,y=false,n=false,c=false;
    for(int i=0;i<l;i++)c[i]='-';
    for(int i=0;i<l;i++){
        if(s[i]=='k'||k==false)k=true;
        else if(s[i]=='y'||y==false)y=true;
        else if(s[i]=='n'||n==false)n=true;
        else if(s[i]=='c'||c==false)c=true;
        else if(s[i]=='e'||e<4)e++;
        else c[i]=s[i];
    }
    int x=0;
    if(c[0]!='k')x++;
    for(int i=1;i<n;i++){
        if(c[i-1]=='-'||c[i]!='-')x++;
    }
    if(x>1)puts("NO");
    else puts("YES");
    return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:9:34: error: conflicting declaration 'bool c'
    9 |     bool k=false,y=false,n=false,c=false;
      |                                  ^
a.cc:8:10: note: previous declaration as 'char c [110]'
    8 |     char c[110];
      |          ^
a.cc:15:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |         else if(s[i]=='c'||c==false)c=true;
      |                            ~^~~~~~~
a.cc:15:38: error: incompatible types in assignment of 'bool' to 'char [110]'
   15 |         else if(s[i]=='c'||c==false)c=true;
      |                                     ~^~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

char S[100];
char seikai[8] = "keyence";

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    /* Sの取得 */
    cin.getline(S, 100);
    int length = strlen(S);
    
    /* 結果の出力 */
    int count = 0;
    int dame = 0;
    bool flag = true;
    bool result = true;
    for (int i = 0; i< length; i++) {
        if (S[i] == seikai[count]) {
            count++;
            flag = true;
        } else {
            if (flag) {
                dame++;
            }
            flag = false;
        }
        
        if (dame >= 2) {
            result = false;
        }
    }
    if (result) {
        cout << "YES" << endl;
    } else {
        cout << "NO" << endl;
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: 'strlen' was not declared in this scope
   15 |     int length = strlen(S);
      |                  ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include <iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<limits>
#include<string>
#include<vector>
#include<stack>
#include<queue>
using namespace std;

int main()
{
	char a[110];
	cin >> a;
	char d[10] = "keyence";
	int b=strlen(a)-7;
	for (int i = 0; i < 8; i++) {
		char c[10];
		for (int j = 0; j < 7;j++) {
			if (j < i) {
				c[j] = a[j];
			}
			else c[j] = a[j + b];
		}
		if (strstr(c, d) != NULL) {
			cout << "YES" << endl;
			return 0;
		}
	}
	cout << "NO" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:15: error: 'strlen' was not declared in this scope
   17 |         int b=strlen(a)-7;
      |               ^~~~~~
a.cc:10:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    9 | #include<queue>
  +++ |+#include <cstring>
   10 | using namespace std;
a.cc:26:21: error: 'strstr' was not declared in this scope
   26 |                 if (strstr(c, d) != NULL) {
      |                     ^~~~~~
a.cc:26:21: note: 'strstr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<stdio.h>

int main(){
    char s[100];
    char a[7]="keyence";
    scanf("%s",s);
    int i=0,j=0,count=0,flag=0;

    while(1){
    // printf("%d\n",count);
    // printf("match\n");
    // printf("%c %c\n",a[i],s[j]);

        if(a[i]=='\0'){
            printf("YES\n");
            return 0;
        }
            
        if(a[i]==s[j]){
            count++;
            if(count>=7){
                printf("YES\n");
                return 0;
            }
        }else{
            flag=1;
            while(a[i]!=s[j]){
                // printf("skip\n");
                // printf("%c %c\n",a[i],s[j]);
                j++;
                if(s[j]=='\0'){
                    printf("NO\n");
                    return 0;
                }
            }
        }
        i++;
        j++;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: initializer-string for 'char [7]' is too long [-fpermissive]
    5 |     char a[7]="keyence";
      |               ^~~~~~~~~
Language: C++

#include<stdio.h>

int main(){
    char s[100];
    char a[7]="keyence";
    scanf("%s",s);
    int i=0,j=0,count=0,flag=0;

    while(1){
    printf("%d\n",count);
    printf("match\n");
    printf("%c %c\n",a[i],s[j]);

        if(a[i]=='\0'){
            printf("YES\n");
            return 0;
        }
            
        if(a[i]==s[j]){
            count++;
            if(count>=7){
                printf("YES\n");
                return 0;
            }
        }else{
            flag=1;
            while(a[i]!=s[j]){
                printf("skip\n");
                printf("%c %c\n",a[i],s[j]);
                j++;
                if(s[j]=='\0'){
                    printf("NO\n");
                    return 0;
                }
            }
        }
        i++;
        j++;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: initializer-string for 'char [7]' is too long [-fpermissive]
    5 |     char a[7]="keyence";
      |               ^~~~~~~~~
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;

int main()
{	
	char S[101];
	char key[10];
	key[0]='k';
	key[1]='e';
	key[2]='y';
	key[3]='e';
	key[4]='n';
	key[5]='c';
	key[6]='e';
	gets(S);
	int keysoeji=0;
	int ikkai=0;
	int Ssoeji=0;
	int answer=1;
	while((answer==1)&&Ssoeji<strlen(S)){
		if(S[Ssoeji]==key[keysoeji])
		{
			if(Ssoeji!=keysoeji){ikkai=1;}
			keysoeji++;
			Ssoeji++;	
		}
		else
		{	
			if(ikkai==0)
			{	Ssoeji++;
			}
			else{
				answer=0;
			}
		}
	}
	if((answer==1)&&(keysoeji==7)){printf("YES");}
	else{printf("NO");}
			
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   17 |         gets(S);
      |         ^~~~
      |         getw
Language: C++

#include <stdio.h>
#include <string.h>

int  main(){
const char *KEY1[7] = "k","ke","key","keye","keyen","keyenc","keyence";
const char *KEY2[7] = "eyence","yence","ence","nce","ce","e","";

char s[100];
char *pt;
char *pt2;
char *pt3;

int i;
int num;



scanf("%s",s);


pt3 = s;
num =0;

while(1){
if(0 == strlen(pt3)) break;

if(0 == (pt = strstr(pt3,KEY1[num]))){
 printf("NO\n");
 return 0;
}

if(0 == (pt = strstr(pt3,KEY2[num]))){
 num++;
　if(num >=7){
printf("NO\n");
return 0;
}}else{
printf("YES\n");
return 0;
}
}

}


Compiler output:
a.cc:34:1: error: extended character 　 is not valid in an identifier
   34 | 　if(num >=7){
      | ^
a.cc: In function 'int main()':
a.cc:5:23: error: array must be initialized with a brace-enclosed initializer
    5 | const char *KEY1[7] = "k","ke","key","keye","keyen","keyenc","keyence";
      |                       ^~~
a.cc:5:27: error: expected unqualified-id before string constant
    5 | const char *KEY1[7] = "k","ke","key","keye","keyen","keyenc","keyence";
      |                           ^~~~
a.cc:6:23: error: array must be initialized with a brace-enclosed initializer
    6 | const char *KEY2[7] = "eyence","yence","ence","nce","ce","e","";
      |                       ^~~~~~~~
a.cc:6:32: error: expected unqualified-id before string constant
    6 | const char *KEY2[7] = "eyence","yence","ence","nce","ce","e","";
      |                                ^~~~~~~
a.cc:34:1: error: '\U00003000if' was not declared in this scope
   34 | 　if(num >=7){
      | ^~~~
Language: C++

#include<iostream>
#include<string.h>
using namespace std;


int main(void)
{
    int i=0,j=0,count=0;
    string s,a("keyence");
    cin>>s;

    while(i<7||s[j]!='\0'){
        if(s[j]==a[i]){ i++; j++}
        else {j++;count++;}
    }
    if(i==7){cout<<"YES"<<endl;}else cout<<"NO"<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:33: error: expected ';' before '}' token
   13 |         if(s[j]==a[i]){ i++; j++}
      |                                 ^
      |                                 ;