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

#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <functional>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cassert>



 
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:31:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   31 |         gets(S);
      |         ^~~~
      |         getw
Language: Java

import java.util.*;
import java.util.Arrays;

public class Main {// Main
    public static void main(String[] args){

        Scanner sc =   new Scanner(System.in);
        String S = sc.next();

         if (S.startsWith("k")) {
             if(S.endWith("eyence")){
                System.out.println("YES");
                
             }
        } else
         if (S.startsWith("ke")) {
             if(S.endWith("yence")){
                System.out.println("YES");
             }
        } else
         if (S.startsWith("key")) {
             if(S.endWith("ence")){
                System.out.println("YES");
             }
        } else
         if (S.startsWith("keye")) {
             if(S.endWith("nce")){
                System.out.println("YES");
             }
        } else
         if (S.startsWith("keyen")) {
             if(S.endWith("ce")){
                System.out.println("YES");
             }
        } else
         if (S.startsWith("keyenc")) {
             if(S.endWith("e")){
                System.out.println("YES");
             }
        } else
         if (S.startsWith("keyence")) {
             
                System.out.println("YES");
             
        } else 
        if ( S.endWith("keyence")) {
                System.out.println("YES");
        } else if(true==true){
            System.out.println("NO");
        }
    }    
}

Compiler output:
Main.java:11: error: cannot find symbol
             if(S.endWith("eyence")){
                 ^
  symbol:   method endWith(String)
  location: variable S of type String
Main.java:17: error: cannot find symbol
             if(S.endWith("yence")){
                 ^
  symbol:   method endWith(String)
  location: variable S of type String
Main.java:22: error: cannot find symbol
             if(S.endWith("ence")){
                 ^
  symbol:   method endWith(String)
  location: variable S of type String
Main.java:27: error: cannot find symbol
             if(S.endWith("nce")){
                 ^
  symbol:   method endWith(String)
  location: variable S of type String
Main.java:32: error: cannot find symbol
             if(S.endWith("ce")){
                 ^
  symbol:   method endWith(String)
  location: variable S of type String
Main.java:37: error: cannot find symbol
             if(S.endWith("e")){
                 ^
  symbol:   method endWith(String)
  location: variable S of type String
Main.java:46: error: cannot find symbol
        if ( S.endWith("keyence")) {
              ^
  symbol:   method endWith(String)
  location: variable S of type String
7 errors
Language: C++

#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <functional>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cassert>

#define SIZE 100005
 
using namespace std;
typedef long long int ll;
typedef pair <int,int> P;
 
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:34:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   34 |         gets(S);
      |         ^~~~
      |         getw
Language: C++

#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <functional>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cassert>
#include <cstdlib>

#define SIZE 100005
 
using namespace std;
typedef long long int ll;
typedef pair <int,int> P;
 
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:35:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   35 |         gets(S);
      |         ^~~~
      |         getw
Language: C++

#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <functional>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cassert>
#include <iostream>
#include <cstdlib>

#define SIZE 100005
 
using namespace std;
typedef long long int ll;
typedef pair <int,int> P;
 
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:36:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   36 |         gets(S);
      |         ^~~~
      |         getw
Language: Java

import java.util.*;
import java.util.Arrays;

public class Main {// Main
    public static void main(String[] args){

        Scanner sc =   new Scanner(System.in);
        String S = sc.nextString();

         if (S.startsWith("k")) {
             if(S.endWith("eyence")){
                System.out.println("YES");
                
             }
        } else
         if (S.startsWith("ke")) {
             if(S.endWith("yence")){
                System.out.println("YES");
             }
        } else
         if (S.startsWith("key")) {
             if(S.endWith("ence")){
                System.out.println("YES");
             }
        } else
         if (S.startsWith("keye")) {
             if(S.endWith("nce")){
                System.out.println("YES");
             }
        } else
         if (S.startsWith("keyen")) {
             if(S.endWith("ce")){
                System.out.println("YES");
             }
        } else
         if (S.startsWith("keyenc")) {
             if(S.endWith("e")){
                System.out.println("YES");
             }
        } else
         if (S.startsWith("keyence")) {
             
                System.out.println("YES");
             
        } else 
        if ( S.endWith("keyence")) {
                System.out.println("YES");
        } else if(true==true){
            System.out.println("NO");
        }
    }    
}

Compiler output:
Main.java:8: error: cannot find symbol
        String S = sc.nextString();
                     ^
  symbol:   method nextString()
  location: variable sc of type Scanner
Main.java:11: error: cannot find symbol
             if(S.endWith("eyence")){
                 ^
  symbol:   method endWith(String)
  location: variable S of type String
Main.java:17: error: cannot find symbol
             if(S.endWith("yence")){
                 ^
  symbol:   method endWith(String)
  location: variable S of type String
Main.java:22: error: cannot find symbol
             if(S.endWith("ence")){
                 ^
  symbol:   method endWith(String)
  location: variable S of type String
Main.java:27: error: cannot find symbol
             if(S.endWith("nce")){
                 ^
  symbol:   method endWith(String)
  location: variable S of type String
Main.java:32: error: cannot find symbol
             if(S.endWith("ce")){
                 ^
  symbol:   method endWith(String)
  location: variable S of type String
Main.java:37: error: cannot find symbol
             if(S.endWith("e")){
                 ^
  symbol:   method endWith(String)
  location: variable S of type String
Main.java:46: error: cannot find symbol
        if ( S.endWith("keyence")) {
              ^
  symbol:   method endWith(String)
  location: variable S of type String
8 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
char s[105];
char pd[15]={'k','e','y','e','n','c','e'};
int a,b,c,x,y;
int main()
{
	gets(s);
	a=strlen(s);a--;
	if(s[0]==pd[0]&&s[a]!=pd[6])
	{
		for(int i=0;i<=6;i++)
		{
			if(s[i]!=pd[i])
			{
				cout<<"NO";
				return 0;
			}
		}
		cout<<"YES";
	}
	else if(s[0]!=pd[0]&&s[a]==pd[6])
	{
		for(int i=0;i<=6;i++)
		{
			if(s[a-i]!=pd[6-i])
			{
				cout<<"NO";
				return 0;
			}
		}
		cout<<"YES";
	}
	else if(s[0]==pd[0]&&s[a]==pd[6])
	{
		for(int i=0;i<=15;i++)
		{
			if(s[x]==pd[x])
			{
				x++;
			}
			if(x+y==6)
			{
				cout<<"YES";
				return 0;
			}
			if(s[a-y]==pd[6-y])
			{
				y++;
			}
			if(x+y==6)
			{
				cout<<"YES";
				return 0;
			}
		}
		cout<<"NO";
	}
	else
	{
		cout<<"NO";
	}
	return 0;
}

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

import java.util.*;
import java.util.Arrays;

public class Main {// Main
    public static void main(String[] args){

        Scanner sc =   new Scanner(System.in);
        String S = sc.nextString();

         if (S.startsWith("k")) {
             if(S.endWith("eyence")){
                System.out.println("YES");
                
             }
        } else
         if (S.startsWith("ke")) {
             if(S.endWith("yence")){
                System.out.println("YES");
             }
        } else
         if (S.startsWith("key")) {
             if(S.endWith("ence")){
                System.out.println("YES");
             }
        } else
         if (S.startsWith("keye")) {
             if(S.endWith("nce")){
                System.out.println("YES");
             }
        } else
         if (S.startsWith("keyen")) {
             if(S.endWith("ce")){
                System.out.println("YES");
             }
        } else
         if (S.startsWith("keyenc")) {
             if(S.endWith("e")){
                System.out.println("YES");
             }
        } else
         if (S.startsWith("keyence")) {
             
                System.out.println("YES");
             }
        } else
         if (S.endWith("keyence")) {
                System.out.println("YES");
        } else if(1){
            System.out.println("NO");
        }

         

            
            





    }    
}

Compiler output:
Main.java:45: error: illegal start of type
        } else
          ^
Main.java:46: error: <identifier> expected
         if (S.endWith("keyence")) {
                      ^
Main.java:46: error: illegal start of type
         if (S.endWith("keyence")) {
                       ^
Main.java:48: error: illegal start of type
        } else if(1){
          ^
Main.java:62: error: class, interface, enum, or record expected
}
^
5 errors
Language: C++

a = input()
k="keyence"
ti = 0
x =[0]*(len(a))
r = 0
for i in range(len(a)):
    if ti==7:
        r+=1
        break
    elif a[i] == k[ti]:
        ti +=1
        x[i]=1
        if i!=0 and  x[i-1]!=1:r+=1     
if ti == 7 and r < 2:
    print(r,"YES")
else:
    print(r,"NO")

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a = input()
      | ^
Language: C++

#include <stdio.h>
#include <stdlib.h>

int main() {
	char S[100];
	int i;
	int a, b, c, d, e, f, g;
	a = 0;
	b = 0;
	c = 0;
	d = 0;
	f = 0;
	g = 0;
	gets_s(S);


	for (i = 0; i < 100; i++) {
		if (S[i] == 'k') {
			a = i;
			break;
		}
	}
	if (S[a] != 'k') {
		printf("NO");
		return 0;
	}
	for (i = a; i < 100; i++) {
		if (S[i] == 'e') {
			b = i;
			break;
		}
	}
	if (S[b] != 'e') {
		printf("NO");
		return 0;
	}
	for (i = b; i < 100; i++) {
		if (S[i] == 'y') {
			c = i;
			break;
		}
	}
	if (S[c] != 'y') {
		printf("NO");
		return 0;
	}
	for (i = c; i < 100; i++) {
		if (S[i] == 'e') {
			d = i;
			break;
		}
	}
	if (S[d] != 'e') {
		printf("NO");
		return 0;
	}
	for (i = d; i < 100; i++) {
		if (S[i] == 'n') {
			e = i;
			break;
		}
	}
	if (S[e] != 'n') {
		printf("NO");
		return 0;
	}
	for (i = e; i < 100; i++) {
		if (S[i] == 'c') {
			f = i;
			break;
		}
	}
	if (S[f] != 'c') {
		printf("NO");
		return 0;
	}
	for (i = f; i < 100; i++) {
		if (S[i] == 'e') {
			g = i;
			break;
		}
	}
	if (S[g] != 'e') {
		printf("NO");
		return 0;
	}
	if (S[g] == 'e') {
		printf("YES");
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'gets_s' was not declared in this scope
   14 |         gets_s(S);
      |         ^~~~~~
Language: C++

s = input()

length = len(s)
flag = False
for k in range(length - 7):
    for l in range(length):
        r = l + k - 1
        if(s[0:l-1]+s[r+1:length] == "keyence"):
            flag = True

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



Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
   string s,ss;
   cin>>ss;

    if(ss.size()<=7)
    {
        if(ss="keyence") cout<<"YES\n";
        else cout<<"NO";
        return 0;
    }
   for(int i=0;i<ss.size()-6;i++)
   {
       s=ss;
       s.erase(i,s.size()-7);

       if(s=="keyence")
       {
           cout<<"YES\n";
            return 0;
       }
   }

   cout<<"NO\n";
   return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: could not convert 'ss.std::__cxx11::basic_string<char>::operator=(((const char*)"keyence"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   10 |         if(ss="keyence") cout<<"YES\n";
      |            ~~^~~~~~~~~~
      |              |
      |              std::__cxx11::basic_string<char>
Language: C++

import java.util.Scanner;

class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();

        StringBuilder sub;
        for(int q=0; q<str.length(); q++){
            for(int r=q; r<=str.length(); r++){
                sub = new StringBuilder(str);
                sub.delete(q, r);
                if(sub.toString().equals("keyence")){
                    System.out.println("YES");
                    return;
                }
            }
        }
        System.out.println("NO");
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:11: error: expected ':' before 'static'
    4 |     public static void main(String args[]){
      |           ^~~~~~~
      |           :
a.cc:4:29: error: 'String' has not been declared
    4 |     public static void main(String args[]){
      |                             ^~~~~~
a.cc:21:2: error: expected ';' after class definition
   21 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:9: error: 'Scanner' was not declared in this scope
    5 |         Scanner sc = new Scanner(System.in);
      |         ^~~~~~~
a.cc:6:9: error: 'String' was not declared in this scope
    6 |         String str = sc.nextLine();
      |         ^~~~~~
a.cc:8:9: error: 'StringBuilder' was not declared in this scope
    8 |         StringBuilder sub;
      |         ^~~~~~~~~~~~~
a.cc:9:24: error: 'str' was not declared in this scope; did you mean 'std'?
    9 |         for(int q=0; q<str.length(); q++){
      |                        ^~~
      |                        std
a.cc:11:17: error: 'sub' was not declared in this scope
   11 |                 sub = new StringBuilder(str);
      |                 ^~~
a.cc:11:27: error: expected type-specifier before 'StringBuilder'
   11 |                 sub = new StringBuilder(str);
      |                           ^~~~~~~~~~~~~
a.cc:12:21: error: expected unqualified-id before 'delete'
   12 |                 sub.delete(q, r);
      |                     ^~~~~~
a.cc:14:21: error: 'System' was not declared in this scope
   14 |                     System.out.println("YES");
      |                     ^~~~~~
a.cc:19:9: error: 'System' was not declared in this scope
   19 |         System.out.println("NO");
      |         ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
  const string match = "keyence";
  string input;
  int k = 0;
  cin >> input;

  if (input == match) {
    cout << "YES" << endl;
    return 0;
  }

  for (int i = 0;i <= match.size(); i++) {
    const string f = match.substr(0, i);
    const string l = match.substr(i, match.size());
    string d = input;

	//cout << f << ":" << l << "--" << flush;
    
    int r = d.find(f);
    if (r != string::npos) {
    //	cout << "hitf" << endl;
    	d.erase(d.begin(), d.begin()+r);
    //	cout << d << endl;
    	k++;
	}
    r = d.find(l);
    if (r != string::npos) {
    //	cout << "hitl" << endl;
    	if (k == 1) {
    		cout << "YES" << endl;
    	}
    	k = 0;
    	}
    }
  }
    cout << "NO" << endl;
  return 0;
}


Compiler output:
a.cc:39:5: error: 'cout' does not name a type
   39 |     cout << "NO" << endl;
      |     ^~~~
a.cc:40:3: error: expected unqualified-id before 'return'
   40 |   return 0;
      |   ^~~~~~
a.cc:41:1: error: expected declaration before '}' token
   41 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  const string match = "keyence";
  string input;
  int k = 0
  cin >> input;

  if (input == match) {
    cout << "YES" << endl;
    return 0;
  }

  for (int i = 0;i <= match.size(); i++) {
    const string f = match.substr(0, i);
    const string l = match.substr(i, match.size());
    string d = input;

	//cout << f << ":" << l << "--" << flush;
    
    int r = d.find(f);
    if (r != string::npos) {
    //	cout << "hitf" << endl;
    	d.erase(d.begin(), d.begin()+r);
    //	cout << d << endl;
    	k++;
	}
    r = d.find(l);
    if (r != string::npos) {
    //	cout << "hitl" << endl;
    	if (k == 1) {
    		cout << "YES" << endl;
    	}
    	k = 0;
    	}
    }
  }
    cout << "NO" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'cin'
    8 |   cin >> input;
      |   ^~~
a.cc: At global scope:
a.cc:39:5: error: 'cout' does not name a type
   39 |     cout << "NO" << endl;
      |     ^~~~
a.cc:40:3: error: expected unqualified-id before 'return'
   40 |   return 0;
      |   ^~~~~~
a.cc:41:1: error: expected declaration before '}' token
   41 | }
      | ^
Language: C

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

int main()
{   int i=0,j,flag[7]={0};
    char s[101];
    scanf("%s",s);
    int l=strlen(s);
        if(s[0]=='k'&&s[1]=='e'&&s[2]=='y'&&s[3]=='e'&&s[4]=='n'&&s[5]=='c'){
            for(j=6;j<l;j++){
                if(s[l-1]=='e'){
                    printf("YES");
                    return 0;
                }
            }
        }else if(s[i]=='k'&&s[i+1]=='e'&&s[i+2]=='y'&&s[i+3]=='e'&&s[i+4]=='n'){
                    if(s[l-2]=='c'&&s[l-1]=='e'){
                        printf("YES");
                        return 0;
                    }
                }
            }else if(s[i]=='k'&&s[i+1]=='e'&&s[i+2]=='y'&&s[i+3]=='e'){
                for(j=i+4;j<l-2;j++){
                    if(s[l-3]=='n'&&s[l-2]=='c'&&s[l-1]=='e'){
                        printf("YES");
                        return 0;
                    }
                }
            }else if(s[i]=='k'&&s[i+1]=='e'&&s[i+2]=='y'){
                for(j=i+3;j<l-3;j++){
                    if(s[l-4]=='e'&&s[l-3]=='n'&&s[l-2]=='c'&&s[l-1]=='e'){
                        printf("YES");
                        return 0;
                    }
                }
            }else if(s[i]=='k'&&s[i+1]=='e'){
                for(j=i+2;j<l-4;j++){
                    if(s[l-5]=='y'&&s[l-4]=='e'&&s[l-3]=='n'&&s[l-2]=='c'&&s[l-1]=='e'){
                        printf("YES");
                        return 0;
                    }
                }
            }else if(s[i]=='k'){
                for(j=i+1;j<l-5;j++){
                    if(s[l-6]=='e'&&s[l-5]=='y'&&s[l-4]=='e'&&s[l-3]=='n'&&s[l-2]=='c'&&s[l-1]=='e'){
                        printf("YES");
                        return 0;
                    }
                }
            }

    printf("NO");

    return 0;
}


Compiler output:
main.c:24:14: error: expected identifier or '(' before 'else'
   24 |             }else if(s[i]=='k'&&s[i+1]=='e'&&s[i+2]=='y'&&s[i+3]=='e'){
      |              ^~~~
main.c:31:14: error: expected identifier or '(' before 'else'
   31 |             }else if(s[i]=='k'&&s[i+1]=='e'&&s[i+2]=='y'){
      |              ^~~~
main.c:38:14: error: expected identifier or '(' before 'else'
   38 |             }else if(s[i]=='k'&&s[i+1]=='e'){
      |              ^~~~
main.c:45:14: error: expected identifier or '(' before 'else'
   45 |             }else if(s[i]=='k'){
      |              ^~~~
main.c:54:12: error: expected declaration specifiers or '...' before string constant
   54 |     printf("NO");
      |            ^~~~
main.c:56:5: error: expected identifier or '(' before 'return'
   56 |     return 0;
      |     ^~~~~~
main.c:57:1: error: expected identifier or '(' before '}' token
   57 | }
      | ^
Language: C

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

int main()
{
	char s[100];
	scanf("%s",s);
	int size = strlen(s);
	int betw = 0;
	int count = 0;
	int tmp;
	for (int i = 0; i < size; ++i)
	{
		if(count==0&&s[i]=='k'){
			count++;
			if(i-tmp >=2){
				betw++;
			}
			tmp = i;
		}else if(count==1&&s[i]=='e'){
			count++;
			if(i-tmp >= 2){
				betw++;
			}
			tmp = i;
		}else if(count==2&&s[i]=='y'){
			count++;
			if(i-tmp >= 2){
				betw++;
			}
			tmp =i;
		}else if(count==3&&s[i]=='e'){
			count++;
			if(i-tmp >= 2){
				betw++;
			}
			tmp = i;
		}else if(count==4&&s[i]=='n'){
			count++;
			if(i-tmp >= 2){
				betw++;
			}
			tmp = i;
		}else if(count==5&&s[i]=='c'){
			count++;
			if(i-tmp >= 2){
				betw++;
			}
			tmp = i;
		}else if(count==6&&s[i]=='e'){
			count++;
			if(i-tmp >= 2){
				betw++;
			}
			if((size-1) - i >=1){
				betw++;
			}
		}
	}
	if(count==7&&betw<=1){
		printf("YES");
	}else{
		printf("NO");
	}
	print("%d",betw);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:65:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   65 |         print("%d",betw);
      |         ^~~~~
      |         printf
Language: C++

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

int  main(){
const char *KEY = "keyence";
char s[100];
char *pt;
char *pt2;
char *pt3;

int i;
int num;

scanf("%s",s);

num = strlen(s);

pt3 = s;

while(1){
if(0 == strlen(pt3)) break;
if(0 == (pt = strstr(pt3,"keyence"))){
 printf("NO\n");
 return 0;
}

for(i=0;;i++){
if(*pt == KEY[i]){
 pt++;
}else{
 break;
}
}
if(i>=7){
printf("YES\n");
return 0;
}

if(0 == (pt2 = strstr(pt,&KEY[i]))){
 pt3 = pt2;
 contine;
// printf("NO\n");
// return 0;
}

for(;;i++){
if(*pt2 == KEY[i]){
 pt2++;
}else{
 break;
}
}
if(i>=7){
printf("YES\n");
return 0;
}
pt3 = pt2;

}
printf("NO\n");
return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:2: error: 'contine' was not declared in this scope
   41 |  contine;
      |  ^~~~~~~
Language: C

#include <stdio.h>
#include <stdlib.h>

int main() {
	char S[100];
	int i;
	int a, b, c, d, e, f, g;
	a = 0;
	b = 0;
	c = 0;
	d = 0;
	f = 0;
	g = 0;
	gets_s(S);


	for (i = 0; i < 100; i++) {
		if (S[i] == 'k') {
			a = i;
			break;
		}
	}
	if (S[a] != 'k') {
		printf("NO");
		return 0;
	}
	for (i = a; i < 100; i++) {
		if (S[i] == 'e') {
			b = i;
			break;
		}
	}
	if (S[b] != 'e') {
		printf("NO");
		return 0;
	}
	for (i = b; i < 100; i++) {
		if (S[i] == 'y') {
			c = i;
			break;
		}
	}
	if (S[c] != 'Y') {
		printf("NO");
		return 0;
	}
	for (i = c; i < 100; i++) {
		if (S[i] == 'e') {
			d = i;
			break;
		}
	}
	if (S[d] != 'e') {
		printf("NO");
		return 0;
	}
	for (i = d; i < 100; i++) {
		if (S[i] == 'n') {
			e = i;
			break;
		}
	}
	if (S[e] != 'n') {
		printf("NO");
		return 0;
	}
	for (i = e; i < 100; i++) {
		if (S[i] == 'c') {
			f = i;
			break;
		}
	}
	if (S[f] != 'c') {
		printf("NO");
		return 0;
	}
	for (i = f; i < 100; i++) {
		if (S[i] == 'e') {
			g = i;
			break;
		}
	}
	if (S[g] == 'e') {
		printf("YES");
	}
	if (S[g] != 'e') {
		printf("NO");
	}

}

Compiler output:
main.c: In function 'main':
main.c:14:9: error: implicit declaration of function 'gets_s' [-Wimplicit-function-declaration]
   14 |         gets_s(S);
      |         ^~~~~~
Language: C++

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

int main(void) {
  int index = 0, pretermit = 0, start;
  bool isPretermit = false;
  string S, ANS = "keyence";
  cin >> S;

  if (S.find(ANS) != string::npos) {
    cout << "YES" << endl;
    return 0;
  }

  for (int i = 0; i < S.length(); i++) {
    if (S[i] == ANS[index]) {
      isPretermit = false;
      if (index == 0)
        start = i;
      index++;
    } else if (index > 0) {
      if (!isPretermit) {
        isPretermit = true;
        pretermit++;
        if (pretermit == 2) {
          index = 0;
          pretermit = 0;
        }
      }
    }
    if (index == ANS.length()) {
      if (start == 0 || i == S.length() - 1) {
        cout << "YES" << endl;
        return 0;
      } else {
        index = 0;
        pretermit = 0;
      }
    }
  }

  else cout << "NO" << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:3: error: 'else' without a previous 'if'
   43 |   else cout << "NO" << endl;
      |   ^~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<functional>
#include<string>
using namespace std;
int main(){
  string a;
  cin>>a;
  char b=a[0],c=a[1],d=a[2];
  char e=a[a.size()-4],f=a[a.size()-3],g=a[a.size()-2],h=a[a.size()-1];
  if(b=='k' and c=='e' d=='y' and e=='e' and f=='n' and g=='c' and h=='e') 
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: expected ')' before 'd'
   11 |   if(b=='k' and c=='e' d=='y' and e=='e' and f=='n' and g=='c' and h=='e')
      |     ~                 ^~
      |                       )
Language: C++

#include<bits/stdc++.h>
using namespace std;
char s[705];
bool check()
{
	char c[7]={'k','e','y','e','n','c','e'};
	int ji=0;
	sort(c,c+7);
	sort(s,s+705);
	for(int i=0;i<705;i++)if(c[ji]==s[i])ji++;
	return ji==7;
}
int main()
{
	gets(s);
	cout<<(check()?"YES":"NO");
}

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

#include<iostream>
#include<algorithm>
#include<functional>
#include<string>
using namespace std;
int main(){
  string a;
  cin>>a;
  char b=a[0],c=a[1],d=a[2];
  char e=a[a.size()-4],f=a[a.size()-3],g=a[a.size()-2],h=a[a.size()-1];
  if(b=="k" and c=="e" d=="y" and e=="e" and f=="n" and g=="c" and h=="e") )
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   if(b=="k" and c=="e" d=="y" and e=="e" and f=="n" and g=="c" and h=="e") )
      |      ~^~~~~
a.cc:11:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   if(b=="k" and c=="e" d=="y" and e=="e" and f=="n" and g=="c" and h=="e") )
      |                 ~^~~~~
a.cc:11:23: error: expected ')' before 'd'
   11 |   if(b=="k" and c=="e" d=="y" and e=="e" and f=="n" and g=="c" and h=="e") )
      |     ~                 ^~
      |                       )
a.cc:11:76: error: expected primary-expression before ')' token
   11 |   if(b=="k" and c=="e" d=="y" and e=="e" and f=="n" and g=="c" and h=="e") )
      |                                                                            ^
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     while(a[i]=="\0"||j==7){
a.cc:15:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     if(a[i]=="\0"){cout<<"YES"<<endl;}else cout<<"NO"<<endl;
Language: C++

#include<iostream>
#include<algorithm>
#include<functional>
#include<string>
using namespace std;
string a[n];
int main(){
  string x;
  cin>>x;
  string b=a[0],c=a[1],d=a[2];
  int e=a[a.size()-4],f=a[a.size()-3],g=a[a.size()-2],h=a[a.size()-1];
  if(b=="k" and c=="e" d=="y" and e=="e" and f=="n" and g=="c" and h=="e") )
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
}


Compiler output:
a.cc:6:10: error: 'n' was not declared in this scope
    6 | string a[n];
      |          ^
a.cc: In function 'int main()':
a.cc:10:12: error: 'a' was not declared in this scope
   10 |   string b=a[0],c=a[1],d=a[2];
      |            ^
a.cc:12:17: error: 'c' was not declared in this scope
   12 |   if(b=="k" and c=="e" d=="y" and e=="e" and f=="n" and g=="c" and h=="e") )
      |                 ^
a.cc:12:23: error: expected ')' before 'd'
   12 |   if(b=="k" and c=="e" d=="y" and e=="e" and f=="n" and g=="c" and h=="e") )
      |     ~                 ^~
      |                       )
a.cc:12:76: error: expected primary-expression before ')' token
   12 |   if(b=="k" and c=="e" d=="y" and e=="e" and f=="n" and g=="c" and h=="e") )
      |                                                                            ^
Language: C++

#include<iostream>
#include<algorithm>
#include<functional>
#include<string>
using namespace std;
string a[100];
int main(){
  string x;
  cin>>x;
  string b=a[0],c=a[1],d=a[2];
  int e=a[a.size()-4],f=a[a.size()-3],g=a[a.size()-2],h=a[a.size()-1];
  if(b=="k" and c=="e" d=="y" and e=="e" and f=="n" and g=="c" and h=="e") )
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: request for member 'size' in 'a', which is of non-class type 'std::string [100]' {aka 'std::__cxx11::basic_string<char> [100]'}
   11 |   int e=a[a.size()-4],f=a[a.size()-3],g=a[a.size()-2],h=a[a.size()-1];
      |             ^~~~
a.cc:12:23: error: expected ')' before 'd'
   12 |   if(b=="k" and c=="e" d=="y" and e=="e" and f=="n" and g=="c" and h=="e") )
      |     ~                 ^~
      |                       )
a.cc:12:76: error: expected primary-expression before ')' token
   12 |   if(b=="k" and c=="e" d=="y" and e=="e" and f=="n" and g=="c" and h=="e") )
      |                                                                            ^
Language: C++

#include<iostream>
#include<algorithm>
#include<functional>
#include<string>
using namespace std;
string a[100];
int main(){
  string c;
  cin>>c;
  string b=a[0],c=a[1],d=a[2];
  int e=a[a.size()-4],f=a[a.size()-3],g=a[a.size()-2],h=a[a.size()-1];
  if(b=="k" and c=="e" d=="y" and e=="e" and f=="n" and g=="c" and h=="e") )
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: redeclaration of 'std::string c'
   10 |   string b=a[0],c=a[1],d=a[2];
      |                 ^
a.cc:8:10: note: 'std::string c' previously declared here
    8 |   string c;
      |          ^
a.cc:11:13: error: request for member 'size' in 'a', which is of non-class type 'std::string [100]' {aka 'std::__cxx11::basic_string<char> [100]'}
   11 |   int e=a[a.size()-4],f=a[a.size()-3],g=a[a.size()-2],h=a[a.size()-1];
      |             ^~~~
a.cc:12:23: error: expected ')' before 'd'
   12 |   if(b=="k" and c=="e" d=="y" and e=="e" and f=="n" and g=="c" and h=="e") )
      |     ~                 ^~
      |                       )
a.cc:12:76: error: expected primary-expression before ')' token
   12 |   if(b=="k" and c=="e" d=="y" and e=="e" and f=="n" and g=="c" and h=="e") )
      |                                                                            ^
Language: C++

#include <stdio.h>
#include <stdlib.h>

int main() {
	char S[100];
	int i;
	int a, b, c, d, e, f, g;
	a = 0;
	b = 0;
	c = 0;
	d = 0;
	f = 0;
	g = 0;
	get(S);


	for (i = 0; i < 100; i++) {
		if (S[i] == 'k') {
			a = i;
			break;
		}
	}
	for (i = a; i < 100; i++) {
		if (S[i] == 'e') {
			b = i;
			break;
		}
	}
	for (i = b; i < 100; i++) {
		if (S[i] == 'y') {
			c = i;
			break;
		}
	}
	for (i = c; i < 100; i++) {
		if (S[i] == 'e') {
			d = i;
			break;
		}
	}
	for (i = d; i < 100; i++) {
		if (S[i] == 'n') {
			e = i;
			break;
		}
	}
	for (i = e; i < 100; i++) {
		if (S[i] == 'c') {
			f = i;
			break;
		}
	}
	for (i = f; i < 100; i++) {
		if (S[i] == 'e') {
			g = i;
			break;
		}
	}
	if (S[g] == 'e') {
		printf("YES");
	}
	else {
		printf("NO");
	}

}

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

#include <stdio.h>
#include <stdlib.h>

int main() {
	char S[100];
	int i;
	int a, b, c, d, e, f, g;
	a = 0;
	b = 0;
	c = 0;
	d = 0;
	f = 0;
	g = 0;
	gets_s(S);


	for (i = 0; i < 100; i++) {
		if (S[i] == 'k') {
			a = i;
			break;
		}
	}
	for (i = a; i < 100; i++) {
		if (S[i] == 'e') {
			b = i;
			break;
		}
	}
	for (i = b; i < 100; i++) {
		if (S[i] == 'y') {
			c = i;
			break;
		}
	}
	for (i = c; i < 100; i++) {
		if (S[i] == 'e') {
			d = i;
			break;
		}
	}
	for (i = d; i < 100; i++) {
		if (S[i] == 'n') {
			e = i;
			break;
		}
	}
	for (i = e; i < 100; i++) {
		if (S[i] == 'c') {
			f = i;
			break;
		}
	}
	for (i = f; i < 100; i++) {
		if (S[i] == 'e') {
			g = i;
			break;
		}
	}
	if (S[g] == 'e') {
		printf("YES");
	}
	else {
		printf("NO");
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'gets_s' was not declared in this scope
   14 |         gets_s(S);
      |         ^~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<functional>
#include<string>
using namespace std;
int main(){
  string a;
  cin>>a;
  string b=a[0],c=a[1],d=a[2];
  int e=a[a.size()-4],f=a[a.size()-3],g=a[a.size()-2],h=a[a.size()-1];
  if(b=="k" and c=="e" d=="y" and e=="e" and f=="n" and g=="c" and h=="e") )
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    9 |   string b=a[0],c=a[1],d=a[2];
      |               ^
a.cc:9:22: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    9 |   string b=a[0],c=a[1],d=a[2];
      |                      ^
a.cc:9:29: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    9 |   string b=a[0],c=a[1],d=a[2];
      |                             ^
a.cc:11:23: error: expected ')' before 'd'
   11 |   if(b=="k" and c=="e" d=="y" and e=="e" and f=="n" and g=="c" and h=="e") )
      |     ~                 ^~
      |                       )
a.cc:11:76: error: expected primary-expression before ')' token
   11 |   if(b=="k" and c=="e" d=="y" and e=="e" and f=="n" and g=="c" and h=="e") )
      |                                                                            ^
Language: C++

#include<iostream>
#include<algorithm>
#include<functional>
#include<string>
using namespace std;
int main(){
  string a;
  cin>>a;
  string b=a.at(0)+a.at(1)+a.at(2);
  int d=a.size()-4,e=a.size()-3,f=a.size()-2,g=a.size()-1;
  string c=a[d]+a[e]+a[f]+a[g];
  if(b=="key" and c=="ence")
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    9 |   string b=a.at(0)+a.at(1)+a.at(2);
      |            ~~~~~~~~~~~~~~~^~~~~~~~
a.cc:11:26: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   11 |   string c=a[d]+a[e]+a[f]+a[g];
Language: C++

/*
オーダー
10**6	余裕を持って間に合う	
10**7	おそらく間に合う	余裕を持って間に合う
10**8	非常にシンプルな処理でない限り厳しい	おそらく間に合う
10**9		非常にシンプルな処理でない限り厳しい
logn	:OK
n		:10^7
nlogn	:10^6
n**2	:10^4
n**3	:300
2**n	:20
n!		:10



// 各桁の和を計算する関数
int findSumOfDigits(int n) {
  int sum = 0;
  while (n > 0) { // n が 0 になるまで
    sum += n % 10;
    n /= 10;
  }
  return sum;
}

sort(a, a + N, greater<int>());  // a[0:N] を大きい順にソート

int num[110] = {0};  // バケット
for (int i = 0; i < N; ++i) {
    num[d[i]]++;  // d[i] が 1 個増える
}

map<string, int> mp; // 連想配列 map<キー型, 値型> オブジェクト名
for (int i = 0; i < N; ++i) {
    auto itr = mp.find(s[i]);        // s[i] が設定されているか？
    if(itr != mp.end() ) {
         mp[s[i]] += 1;
    }
    else {
         mp[s[i]] += 1 ;
    }
}
stack<int> s;	//intをデータとするスタックを用意
s.push(1);		//{} -> {1}
printf("%d\n", s.top());	// 3
s.pop();

queue<int> que;	//intをデータとするキューを用意
que.push(1);		//{} -> {1}
printf("%d\n", que.front());	// 1
que.pop();
*/
#include <iostream>
#include <set>
#include <map>
#include <string>
#include <math.h>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <bitset>

using namespace std;

// #define for(i,a,b) for (int i=(a);i<(b);++i)
typedef long long ll;
typedef pair<ll,ll> P;
#define REP(i,n) for(long long i = 0; i < (long long)(n); i++)
#define pb push_back // vectorに要素追加
#define INF (ll)1e18
// int 
// // 各桁の和を計算する関数
// int findSumOfDigits(int n) {
//   int amari = 0;
//   int keta = 0;
//   while (n > 0) { // n が 0 になるまで
//     amari += n % 2;
//     if (keta%2==0)
//     n /= 10;
//   }
//   return sum;
// }
 
 

int main() {
	// 入力
	string S;
	cin>>S;
	
	// 解法
	ll ans = false;
	if (S.substr(0,7)=="keyence") ans = true;
	else if (S.substr(0,1)=="k" & S.substr(S.length()-6,6)=="eyence") ans = true;
	else if (S.substr(0,2)=="ke" & S.substr(S.length()-5,5)=="yence") ans = true;
	else if (S.substr(0,3)=="key" & S.substr(S.length()-4,4)=="ence") ans = true;
	else if (S.substr(0,4)=="keye" & S.substr(S.length()-3,3)=="nce") ans = true;
	else if (S.substr(0,5)=="keyen" & S.substr(S.length()-2,2)=="ce") ans = true;
	else if (S.substr(0,6)=="keyenc" & S.substr(S.length()-1,1)=="e") ans = true
	else if (S.substr(S.length()-7,7)=="keyence") ans = true;
	
	//出力
	if (ans) printf("YES\n");
	else printf("NO\n");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:101:85: error: expected ';' before 'else'
  101 |         else if (S.substr(0,6)=="keyenc" & S.substr(S.length()-1,1)=="e") ans = true
      |                                                                                     ^
      |                                                                                     ;
  102 |         else if (S.substr(S.length()-7,7)=="keyence") ans = true;
      |         ~~~~
Language: C++

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

string search(vector<char> ss) {
	for (int i(1); i < ss.size() - 1; ++i) {
		vector<char> ssd = ss;
		for (int j = i + 1; j < ssd.size() - 1; ++j) {
			ssd.erase(ssd.begin() + i, ssd.begin() + j);
			string str(ssd.begin(), ssd.end());
			if (str == "keyence") {
				return "YES";
			}
			ssd = ss;
		}
	}
	return "NO";
}

int main() {
	ios::sync_with_stdio(false);
	string s; cin >> s;
	if (s == "keyence") {
		cout << "YES";
		return 0;
	}
	vector<char> ss(s.begin(), s.end());
	
	cout << search(ss);
	return 0;
}

Compiler output:
a.cc:1:10: fatal error: stdc++.h: No such file or directory
    1 | #include <stdc++.h>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<algorithm>
#include<functional>
#include<string>
using namespace std;
int main(){
  string a;
  cin>>a;
  string b=a[0]+a[1]+a[2];
  int d=a.size()-4,e=a.size()-3,f=a.size()-2,g=a.size()-1;
  string c=a[d]+a[e]+a[f]+a[g];
  if(b=="key" and c=="ence")
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    9 |   string b=a[0]+a[1]+a[2];
a.cc:11:26: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   11 |   string c=a[d]+a[e]+a[f]+a[g];
Language: C++

#include<iostream>
#include<algorithm>
#include<functional>
#include<string>
using namespace std;
int main(){
  string a;
  string b=a[0]+a[1]+a[2];
  int d=a.size()-4,e=a.size()-3,f=a.size()-2,g=a.size()-1;
  string c=a[d]+a[e]+a[f]+a[g];
  cin>>a;
  if(b=="key" and c=="ence")
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string b=a[0]+a[1]+a[2];
a.cc:10:26: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   10 |   string c=a[d]+a[e]+a[f]+a[g];
Language: C++

#include <iostream>
using namespace std;
string s,t="keyence";
int i=0;
int main(void){
    cin>>s;
    for(auto x:s){
        if(x==t[i])i++;
    }
    if(i=>7)cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: expected primary-expression before '>' token
   10 |     if(i=>7)cout<<"YES"<<endl;
      |          ^
Language: C++

#include<iostream>
#include<algorithm>
#include<functional>
#include<string>
using namespace std;
int main(){
  string a;
  string b=a[0]+a[1]+a[2];
  string c=a[a.size()-4]+a[a.size()-3]+a[a.size()-2]+a[a.size()-1];
  cin>>a;
  if(b=="key" and c=="ence")
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string b=a[0]+a[1]+a[2];
a.cc:9:53: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    9 |   string c=a[a.size()-4]+a[a.size()-3]+a[a.size()-2]+a[a.size()-1];
Language: C++

#include<iostream>
using namespace std;

int main(void)
{
    char **k="keyence";
    char **s;
    cin>>**s;
    for(int i=0;**k=="\0";i++){
        if(**s==**k){*s++;*k++;}
    }
    cout<<"YES"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: cannot convert 'const char*' to 'char**' in initialization
    6 |     char **k="keyence";
      |              ^~~~~~~~~
      |              |
      |              const char*
a.cc:9:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     for(int i=0;**k=="\0";i++){
      |                 ~~~^~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(void)
{
    char **k="keyence"
    char **s;
    cin>>**s;
    for(int i=0;**k==\0;i++){
        if(**s==**k){*s++;*k++;}
    }
    cout<<"YES"<<endl;

Compiler output:
a.cc:9:22: error: stray '\' in program
    9 |     for(int i=0;**k==\0;i++){
      |                      ^
a.cc: In function 'int main()':
a.cc:6:14: error: cannot convert 'const char*' to 'char**' in initialization
    6 |     char **k="keyence"
      |              ^~~~~~~~~
      |              |
      |              const char*
a.cc:8:12: error: 's' was not declared in this scope
    8 |     cin>>**s;
      |            ^
a.cc:12:23: error: expected '}' at end of input
   12 |     cout<<"YES"<<endl;
      |                       ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C

#include <stdio.h>


int main(){
 int test,b,i,n,c,d,sum=0,k,y,e;
char a[10];
gets(a);

for(i=0;i<strlen(a);i++)
{
    if(a[i]=='k')
    {
        k++;
    }else{
    if(a[i]=='e')
    {
        e++;
    }else{
    if(a[i]=='y')
    {
        y++;
    }else{
    if(a[i]=='n')
    {
        n++;
    }
    else{(a[i]=='c')
    {
        c++;
    }
    }
    }
    }
    }
}
if(k>=1 && n>=1 && e>=3 && c>=1 &&  y>=1 )
{
    printf("YES");
}else{
    printf("No");
}
      return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:1: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    7 | gets(a);
      | ^~~~
      | fgets
main.c:9:11: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    9 | for(i=0;i<strlen(a);i++)
      |           ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:9:11: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    9 | for(i=0;i<strlen(a);i++)
      |           ^~~~~~
main.c:9:11: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:27:21: error: expected ';' before '{' token
   27 |     else{(a[i]=='c')
      |                     ^
      |                     ;
   28 |     {
      |     ~
Language: C++

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

int  main(){
const char *KEY = "keyence";
char s[100];
char *pt;
int i;

scanf("%s",s);

if(0 == (pt = strstr(s,"keyence"))){
 printf("NO\n");
 return 0;
}

for(i=0;;i++){
if(*pt == KEY[i]){
 pt++;
}else{
 break;
}
}

if(0 == (pt = strstr(pt,&KEY[i]))){
 printf("NO\n");
 return 0;
}

for(;;i++;){
if(*pt == KEY[i]){
 pt++;
}else{
 break;
}
}
if(i>=7){
printf("YES\n");
return 0;
}

printf("NO\n");
return 0;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:10: error: expected ')' before ';' token
   30 | for(;;i++;){
      |    ~     ^
      |          )
a.cc:30:11: error: expected primary-expression before ')' token
   30 | for(;;i++;){
      |           ^
Language: C++

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

int  main(){
const char *KEY = "keyence";
char s[100];
char *pt;
int i;

scanf("%s",s);

if(0 == (pt = strstr(s,"keyence"))){
 printf("NO\n");
 return 0;
}

for(i=0;;i++;){
if(*pt == KEY[i]){
 pt++;
}else{
 break;
}
}

if(0 == (pt = strstr(pt,&KEY[i]))){
 printf("NO\n");
 return 0;
}

for(;;i++;){
if(*pt == KEY[i]){
 pt++;
}else{
 break;
}
}
if(i>=7){
printf("YES\n");
return 0;
}

printf("NO\n");
return 0;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: expected ')' before ';' token
   17 | for(i=0;;i++;){
      |    ~        ^
      |             )
a.cc:17:14: error: expected primary-expression before ')' token
   17 | for(i=0;;i++;){
      |              ^
a.cc:30:10: error: expected ')' before ';' token
   30 | for(;;i++;){
      |    ~     ^
      |          )
a.cc:30:11: error: expected primary-expression before ')' token
   30 | for(;;i++;){
      |           ^