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

#define debug_interval ','
#define dump_interval ' '
#define debug_toggle 1

//{
#pragma GCC optimize ("O3","unroll-loops")
#pragma GCC target ("avx")
#include<bits/stdc++.h>
using namespace std;
#define hi cerr<<"hi"<<endl;
#define int long long
#define INT_MAX LLONG_MAX
#define rep(i,n) for(int i=0;i<(n);i++)
#define rep1(i,n) for(int i=1;i<=(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define fi first
#define se second
#define mp make_pair
#define rev reverse
#define dans dump(ans)
#define MOD 1000000007
#define amp(v,n) (v).count(n)?v[n]++:v[n]=1
#define sysp system("pause")
#define PI acos(-1)
#define ins insert

//{
inline int toInt(string s){int v;istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
template<class...A> inline void dump(){cout<<endl;}
template<class...A> inline void dump_rest() {cout<<endl;}
template<class T, class...A> inline void dump_rest(const T& first, const A&... rest){cout<<dump_interval<<first;dump_rest(rest...);}
template<class T,class...A> inline void dump(const T&first,const A&...rest){cout<<first;dump_rest(rest...);}
template<class...A> inline void debug(){cerr<<endl;}
template<class...A> inline void debug_rest() {cerr<<endl;}
template<class T, class...A> inline void debug_rest(const T& first, const A&... rest){cerr<<debug_interval<<first;debug_rest(rest...);}
template<class T,class...A> inline void debug(const T&first,const A&...rest){if(debug_toggle)cerr<<first,debug_rest(rest...);}
//}

typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;

template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}
template<int m>class mint{private:int i;public:mint() : i(0){}mint(int i): i((i%m+m)%m){}mint operator+(const mint& o){return o.i+i;}mint operator*(const mint& o){return o.i*i;}mint operator-(){return -i;}operator int() {return i;}};

//}

int n,m,k,h,w,ans,dx[]={0,1,0,-1},dy[]={-1,0,1,0};
string s;

main(){
	int a[10]={};
	rep(i,4){
		cin>>n;
		a[n]++;
	}
	if(a[1]&&a[7]&&a[9]&&a[4])dump(YES);
	else dump(NO);
}


Compiler output:
a.cc:12:9: warning: "INT_MAX" redefined
   12 | #define INT_MAX LLONG_MAX
      |         ^~~~~~~
In file included from /usr/include/c++/14/climits:42,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:38,
                 from a.cc:8:
/usr/lib/gcc/x86_64-linux-gnu/14/include/limits.h:120:9: note: this is the location of the previous definition
  120 | #define INT_MAX __INT_MAX__
      |         ^~~~~~~
a.cc:55:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   55 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:61:40: error: 'YES' was not declared in this scope
   61 |         if(a[1]&&a[7]&&a[9]&&a[4])dump(YES);
      |                                        ^~~
a.cc:62:19: error: 'NO' was not declared in this scope
   62 |         else dump(NO);
      |                   ^~
Language: C++

if set(map(int, input().split())) == {1, 9, 7, 4}:
    print("YES")
else:
    print("NO")

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'if'
    1 | if set(map(int, input().split())) == {1, 9, 7, 4}:
      | ^~
a.cc:1:50: error: expected unqualified-id before ':' token
    1 | if set(map(int, input().split())) == {1, 9, 7, 4}:
      |                                                  ^
Language: C++

N_list = list(map(int, input().split()))
flag = False
if '1' in N_list:
    if '9' in N_list:
        if '7' in N_list:
            if '4' in N_list:
                flag=True
if flag:
    print('YES')
else:
    print('NO')

Compiler output:
a.cc:9:11: warning: multi-character character constant [-Wmultichar]
    9 |     print('YES')
      |           ^~~~~
a.cc:11:11: warning: multi-character character constant [-Wmultichar]
   11 |     print('NO')
      |           ^~~~
a.cc:1:1: error: 'N_list' does not name a type
    1 | N_list = list(map(int, input().split()))
      | ^~~~~~
Language: C++

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

int main() {
    string s;
    cin >> s;
    
    string k = "keyence";
    int ki = 0, f = 0;
    for (int i = 0; i < s.size(); i++) {
        if (f == 0) {
            if (s[i] == k[ki]) {
                if (ki == 6) f = 3, break;
                else ki++;
            }
            else f = 1;
        }
        else if (f == 1) {
            if (s[i] == k[ki]){
                if (ki == 6)
                    if (i == (s.size()-1)) f = 3, break;
                    else break;
                else f = 2, ki++;
            }
        }
        else if (f == 2) {
            if (s[i] == k[ki]){
                if (ki == 6)
                    if (i == (s.size()-1)) f = 3, break;
                    else break;
                else ki++;
            }
            else break;
        }
    }
    if (f == 3) cout << "YES" << endl;
    else cout << "NO" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:37: error: expected primary-expression before 'break'
   13 |                 if (ki == 6) f = 3, break;
      |                                     ^~~~~
a.cc:21:51: error: expected primary-expression before 'break'
   21 |                     if (i == (s.size()-1)) f = 3, break;
      |                                                   ^~~~~
a.cc:29:51: error: expected primary-expression before 'break'
   29 |                     if (i == (s.size()-1)) f = 3, break;
      |                                                   ^~~~~
Language: C++

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

int main() {
    string s;
    cin >> s;
    
    string k = "keyence";
    int ki = 0, f = 0;
    for (int i = 0; i < s.size(); i++) {
        if (f == 0) {
            if (s[i] == k[ki]) {
                if (ki = =6) f = 3;
                else ki++;
            }
            else f = 1;
        }
        else if (f == 1) {
            if (s[i] == k[ki]){
                if (ki==6 && i==s.size()-1) f = 3;
                else f = 2, ki++;
            }
        }
        else if (f == 2) {
            if (s[i] == k[ki]) {
                if (ki==6 && i==s.size()-1) f = 3;
                else ki++;
            }
            else break;
        }
    }
    if (f == 3) cout << "YES" << endl;
    else cout << "NO" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:26: error: expected primary-expression before '=' token
   13 |                 if (ki = =6) f = 3;
      |                          ^
Language: C++

def main():
    S = input()
    N = len(S)
    for i in range(N):
        for j in range(i, N+1):
            ans = []
            for k in range(N):
                if i <= k and k < j:
                    continue
                ans.append(S[k])
            if "".join(ans) == "keyence":
                print("YES")
                return
    print("NO")


if __name__ == '__main__':
    main()


Compiler output:
a.cc:17:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   17 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def main():
      | ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  bool K=false;
  bool M=false;
  cin>>S;
  for(int X=0;X<S.size();X++){
    for(int Y=X;Y<S.size();Y++){
      string L="1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111";
      int G=0;
      for(int Z=0;Z<S.size();Z++){
        if(Z>=X && Z<=Y){
          continue;
        }
        else{
          L.at(G)=S.at(Z);
          G++;
        }
      }
      if((L.at(0)=='k'&&L.at(1)=='e'&&L.at(2)=='y'&&L.at(3)=='e'&&L.at(4)=='n'&&L.at(5)=='c'&&L.at(6)=='e'&&L.at(7)=='1')){
        K=true;
        M=true;
        break;
      }
    }
    if(M==true){
      break;
    }
  }
  if(K==true){
    cout<<"YES"<<endl;
  }
  else if(S==keyence){
    cout<<"YES"<<endl;
  }
  else{
    cout<<"NO"<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:14: error: 'keyence' was not declared in this scope
   35 |   else if(S==keyence){
      |              ^~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;

int main(){
  string s;
  cin>>s;
  string keyenece="keyence";
  if(s==key){
    cout<<"YES"<<endl;
    return 0;
  }
  for(int i=0;i<s.size();i++){
    for(int j=i;j<s.size();j++){
      string S=" ";
      for(int K=0;k<s.size();++k){
        if(i<=k && k<=j) continue;
        else S.push_back(s[k]);
      }
      if(S==keyenece){
        cout<<"YES"<<endl;
        return 0;
      }
    }
  }
  cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'key' was not declared in this scope; did you mean 'key_t'?
    9 |   if(s==key){
      |         ^~~
      |         key_t
a.cc:16:19: error: 'k' was not declared in this scope
   16 |       for(int K=0;k<s.size();++k){
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  bool K=false;
  bool M=false;
  cin>>S;
  for(int X=0;X<S.size();X++){
    for(int Y=X;Y<s.size();Y++){
      string L="aaaaaaa";
      int Y=0;
      for(int Z=0;Z<S.size();Z++){
        if(Z>=X && Z<=Y){
          continue;
        }
        else{
          L.at(Y)=S.at(Z);
        }
      }
      if(S.at(0)=='k'&&S.at(1)=='e'&&S.at(2)=='y'&&S.at(3)=='e'&&S.at(1)=='n'&&S.at(2)=='c'&&S.at(3)=='e'){
        K=true;
        M=true;
        break;
      }
    }
    if(M==true){
      break;
    }
  }
  if(K==true){
    cout<<"YES"<<endl;
  }
  else{
    cout<<"NO"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 's' was not declared in this scope
   10 |     for(int Y=X;Y<s.size();Y++){
      |                   ^
a.cc:12:11: error: redeclaration of 'int Y'
   12 |       int Y=0;
      |           ^
a.cc:10:13: note: 'int Y' previously declared here
   10 |     for(int Y=X;Y<s.size();Y++){
      |             ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    string s;
    cin >> s;
    string t = "keyence";
    int a = 0, b = 0;
    for (int i = 0; i < t.size(); i++) if (s[i] == t[i]) a++, else break; reverse(s.begin(), s.end()); reverse(t.begin(), t.end());
    for (int i = 0; i < t.size(); i++) if (s[i] == t[i]) b++, else break; reverse(s.begin(), s.end()); reverse(t.begin(), t.end());
    if (a + b >= 7) cout << "YES";
    else cout << "NO";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:63: error: expected primary-expression before 'else'
   16 |     for (int i = 0; i < t.size(); i++) if (s[i] == t[i]) a++, else break; reverse(s.begin(), s.end()); reverse(t.begin(), t.end());
      |                                                               ^~~~
a.cc:17:63: error: expected primary-expression before 'else'
   17 |     for (int i = 0; i < t.size(); i++) if (s[i] == t[i]) b++, else break; reverse(s.begin(), s.end()); reverse(t.begin(), t.end());
      |                                                               ^~~~
Language: Java

import java.util.*;

class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
}

class Solver {
    private String MATCH = "keyence";

    public void run() {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int N = MATCH.length();

        for (int i = 0; i < N; i++) {
            String pre = MATCH.substring(0, i);
            String suf = MATCH.substring(i, N);

            if (S.startsWith(pre) && S.endsWith(suf)) {
                System.out.println("Yes");
                return;
            }
        }

        System.out.println("No");
        return;
    }

}
oz

Compiler output:
Main.java:32: error: reached end of file while parsing
oz
^
1 error
Language: C++

#include <bits/stdc++.h>

#define rep(i, n) for(int i=0; i < n; i++)
#define REP(i, n, m) for(int i=n; i < m; i++)
#define reps(i, n) for(int i=1; i <= n; i++)
#define ALL(v) v.begin(), v.end()
#define rALL(v) v.rbegin(), v.rend()
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)

using namespace std;
using ll=long long;

const ll INF = 1LL << 60;

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;}

int div_ct(int n) {
  int c = 0;
  int k;
  for ( k = 1; k <= n; k++ ) { 
    if ( n % k == 0 ) { c++; } 
  }
  return c;
}

int main() {
  string s;cin>>s;
  int n=s.size();
  if(s=="keyence"){cout<<"YES";return 0;}
  reps(i,n)rep(j,n){
    if(i>j)continue;s

    string t=s.substr(0,i);
    string u=s.substr(j,n-j+1);
    if(t+u=="keyence"){cout<<"YES";return 0;}
  }
  cout<<"NO";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:22: error: expected ';' before 'string'
   33 |     if(i>j)continue;s
      |                      ^
      |                      ;
   34 | 
   35 |     string t=s.substr(0,i);
      |     ~~~~~~            
a.cc:37:8: error: 't' was not declared in this scope
   37 |     if(t+u=="keyence"){cout<<"YES";return 0;}
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
  string S;
  cin >> S;
    if(S.substr(S.size()-7,7)=="keyence") cout << "YES" << endl;
    else if(S.substr(0,7)=="keyence") cout << "YES" << endl;
    else if(S.substr(0,1)=="k" && S.substr(S.size()-6,6)=="eyence") cout << "YES" << endl;
    else if(S.substr(0,2)=="ke" && S.substr(S.size()-5,5)=="yence") cout << "YES" << endl;
    else if(S.substr(0,3)=="key" && S.substr(S.size()-4,4)=="ence") cout << "YES" << endl;
    else if(S.substr(0,4)=="keye" && S.substr(S.size()-3,3)=="nce") cout << "YES" << endl;
    else if(S.substr(0,5)=="keyen" && S.substr(S.size()-2,2)=="ce") cout << "YES" << endl;
    else if(S.substr(0,6)=="keyenc" && S.substr(S.size()-1,1)=="e") cout << "YES" << endl;
    else cout << "NO" << endl;
  }
}

Compiler output:
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include <iostream>
using namespace std; 
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main() {
	int cnt=0;
	string s;
	getline(cin,s);
	for(int i=0;i<s.size()-2;i++){
		if(s[i]=="k"&&s[i+1]=="e"&&s[i+2]=="y"){
			cout<<"Yes";
			cnt++;
			break;
		}
	}
	if(cnt==0)cout<<"No";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |                 if(s[i]=="k"&&s[i+1]=="e"&&s[i+2]=="y"){
a.cc:10:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |                 if(s[i]=="k"&&s[i+1]=="e"&&s[i+2]=="y"){
a.cc:10:50: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |                 if(s[i]=="k"&&s[i+1]=="e"&&s[i+2]=="y"){
Language: C++

#include <bits/stdc++.h>
//#include <boost/range/algorithm/find_if.hpp>
#define rep(i, n) for(int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;

const int MOD = 1000000007;
const int INF = 999999999;

/*int main(){
    string S;
    cin >> S;
    int L, R;
    if(S == "keyence"){cout << "YES";}else{
        bool flag = true;
        /*if(S[0] == 'k' || S[0] == 'e' || S[0] == 'y' || S[0] == 'n' || S[0] == 'c'){
            flag = true;
        }else{
            flag = false;
        }*/
        
/*        rep(i, S.size){
            if(flag == true){
                if(S[0] == 'k' || S[0] == 'e' || S[0] == 'y' || S[0] == 'n' || S[0] == 'c'){
            
                }else{
                    flag = false;
                    L = i;
                }
            }else{
                if(S[0] == 'k' || S[0] == 'e' || S[0] == 'y' || S[0] == 'n' || S[0] == 'c'){
                    flag = true;
                    R = i;
                }else{
                    
                }
            }
        }
    }
    cout << L << " " << R << endl;
return 0;}
/**
 * g++ code.cpp
 * ./a.out
 * shift + ctrl + i
**/ 

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

import sys
s = input()
l = len(s)
k = 'keyence' # len(k)==7
if l < 7:
    print('NO')
    sys.exit()
diff = l - 7
flag = False
for i,kk in enumerate(k):
    #print(s[:i+1],k[:i+1],s[i+diff+1:],k[i+1:])
    if s[:i+1] == k[:i+1] and s[i+diff+1:] == k[i+1:]:
        flag = True
if flag:
    print('YES')
else:
    print('NO')

Compiler output:
a.cc:4:5: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
    4 | k = 'keyence' # len(k)==7
      |     ^~~~~~~~~
a.cc:4:15: error: stray '#' in program
    4 | k = 'keyence' # len(k)==7
      |               ^
a.cc:6:11: warning: multi-character character constant [-Wmultichar]
    6 |     print('NO')
      |           ^~~~
a.cc:11:6: error: invalid preprocessing directive #print
   11 |     #print(s[:i+1],k[:i+1],s[i+diff+1:],k[i+1:])
      |      ^~~~~
a.cc:15:11: warning: multi-character character constant [-Wmultichar]
   15 |     print('YES')
      |           ^~~~~
a.cc:17:11: warning: multi-character character constant [-Wmultichar]
   17 |     print('NO')
      |           ^~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <regex>
#define REP(i,n) for(int i = 0; i < n; i++)
#define FOR(i,j,n) for(int i = j; i < n; i++)
#define RFOR(i,j,n) for(int i = j-1; i >= n; i--)
#define PREC(n) fixed << setprecision(n)
#define print_array(v) REP(__k, v.size()) { cout << v[__k]; if(__k != v.size()-1) cout << " "; else cout << endl; } value
#define YesorNo(a) printf(a?"Yes\n":"No\n")
#define _LIBCPP_DEBUG 0
using namespace std;
int64_t MOD = 1000000007;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  for(int i = 0; i <= 7; ++i){
    string t = s.substr(0, i) + s.substr(n-7+i, 7-i);
    if(t == "keyence"){
    cout << "YES" << endl;
    return 0;
    }
  }
    cout << "NO" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:66:42: error: 'n' was not declared in this scope
   66 |     string t = s.substr(0, i) + s.substr(n-7+i, 7-i);
      |                                          ^
Language: C++

import sys
input = sys.stdin.readline

def ok(s):
    for i in range(len(s)):
        for j in range(i, len(s)):
            print(s[:i] + s[j:])
            if s[:i] + s[j:] == "keyence":
                return True
    return False

def main():
    s = input().strip()
    print("YES" if ok(s) else "NO")

if __name__ == "__main__":
    main()

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

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

using ll=long long;
const ll MOD=1000000007;

int main() {
  string s,k="keyence";
  cin >> s;
  int t=s.size();
  int a=0;
  int i=0;
    while(i<7){
      if(s[i]==k[i]){
        i++;
      }
      else
      break;
    }
    whilr(i<7){
      if(s[t-1-i]==k[6-i]){
        i++;
      }
      else
      break;
    }
    if(i==7){
      a=1;
    }
    if(a==1){
      cout << "YES" << endl;
    }
    else
      cout << "NO" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'whilr' was not declared in this scope
   20 |     whilr(i<7){
      |     ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main () {
  string S, key = "keyence";
  cin >> S;
  for(int i = 0; i < S.size(); i++){
    for(int j = i + 1; j < S.size(); j++){
      if((S.substr(0, i) + S.substr(j, S.size()) == key){
        cout << "YES" << endl;
        return 0;
      }
    }
  }
  cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:57: error: expected ')' before '{' token
    8 |       if((S.substr(0, i) + S.substr(j, S.size()) == key){
      |         ~                                               ^
      |                                                         )
a.cc:12:5: error: expected primary-expression before '}' token
   12 |     }
      |     ^
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <functional>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef vector<vector<pair<ll, ll>>> vvpll;
#define rep(i, n) for(ll i = 0; i < n; i++)
#define exrep(i, a, b) for(ll i = a; i <= b; i++)
#define out(x) cout << x << endl
#define exout(x) printf("%.10f\n", x)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define pb push_back
#define re0 return 0
const ll mod = 1000000007;
const ll INF = 1e16;
const ll MAX_N = 100010;

int main() {
    string x = "keyence";

    string s;
    cin >> s;

    if(s == x) {
        out("YES");
        re0;
    }

    ll n = s.size();

    rep(l, n) {
        exrep(r, l+1 n) {
            string mae = s.substr(0, l);
            string ushiro = s.substr(r, n-r);
            if(mae + ushiro == x) {
                out("YES");
                re0;
            }
        }
    }

    out("NO");
    re0;
}

Compiler output:
a.cc:45:23: error: macro "exrep" requires 3 arguments, but only 2 given
   45 |         exrep(r, l+1 n) {
      |                       ^
a.cc:18:9: note: macro "exrep" defined here
   18 | #define exrep(i, a, b) for(ll i = a; i <= b; i++)
      |         ^~~~~
a.cc: In function 'int main()':
a.cc:45:9: error: 'exrep' was not declared in this scope
   45 |         exrep(r, l+1 n) {
      |         ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rrep(i,n) for(int (i)=((n)-1);(i)>=0;(i)--)
#define itn int
#define all(x) (x).begin(),(x).end()
#define F first
#define S second
const long long INF = 1LL << 60;
const int MOD = 1000000007;
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; }
//https://www.creativ.xyz/dump-cpp-652/
#define repi(itr, ds) for (auto itr = ds.begin(); itr != ds.end(); itr++)
 
// vector
template <typename T>
istream &operator>>(istream &is, vector<T> &vec) {
    for (T &x : vec) is >> x;
    return is;
}
// pair
template <typename T, typename U>
ostream &operator<<(ostream &os, pair<T, U> &pair_var) {
    os << "(" << pair_var.first << ", " << pair_var.second << ")";
    return os;
}
// vector
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &vec) {
    os << "{";
    for (int i = 0; i < vec.size(); i++) {
        os << vec[i] << (i + 1 == vec.size() ? "" : ", ");
    }
    os << "}";
    return os;
}
// map
template <typename T, typename U>
ostream &operator<<(ostream &os, map<T, U> &map_var) {
    os << "{";
    repi(itr, map_var) {
        os << *itr;
        itr++;
        if (itr != map_var.end()) os << ", ";
        itr--;
    }
    os << "}";
    return os;
}
// set
template <typename T>
ostream &operator<<(ostream &os, set<T> &set_var) {
    os << "{";
    repi(itr, set_var) {
        os << *itr;
        itr++;
        if (itr != set_var.end()) os << ", ";
        itr--;
    }
    os << "}";
    return os;
}
 
#define DUMPOUT cerr
 
void dump_func() {
    DUMPOUT << endl;
}
template <class Head, class... Tail>
void dump_func(Head &&head, Tail &&... tail) {
    DUMPOUT << head;
    if (sizeof...(Tail) > 0) {
        DUMPOUT << ", ";
    }
    dump_func(std::move(tail)...);
}

#ifdef DEBUG_
#define DEB
#define dump(...)                                                              \
    DUMPOUT << "  " << string(#__VA_ARGS__) << ": "                            \
            << "[" << to_string(__LINE__) << ":" << __FUNCTION__ << "]"        \
            << endl                                                            \
            << "    ",                                                         \
        dump_func(__VA_ARGS__)
#else
#define DEB if (false)
#define dump(...)
#endif

signed main(void) { cin.tie(0); ios::sync_with_stdio(false);
    string s; cin>>s;
    string t = "keyence";
    int now = 0;
    rep(i,n){
        if(t[now] == s[i]){
            now++;
            if(now == t.size()) {cout<<"YES"<<endl; return 0;}
        }
    }
    cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:97:11: error: 'n' was not declared in this scope
   97 |     rep(i,n){
      |           ^
a.cc:4:37: note: in definition of macro 'rep'
    4 | #define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
      |                                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++)
#define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++)
#define MOD 1000000007
#define int long long
#define ALL(a) (a).begin(),(a).end()
#define vi vector<int>
#define vii vector<vi>
#define pii pair<int,int>
#define priq priority_queue<int>
#define disup(A,key) distance(A.begin(),upper_bound(ALL(A),(int)(key)))
#define dislow(A,key) distance(A.begin(),lower_bound(ALL(A),(int)(key)))
#define tii tuple<int,int,int>
signed main(){
  string S; cin>>S;
  string ans="NO";
  rep(i,0,S.size()){
    rep(j,i,S.size()){
      string X;
      X+=substr(0,i+1);
      X+=substr(j,S.size()-j);
      if(X=="keyence"){
        ans="YES";
        break;
      }
    }
  }
  cout<<ans<<endl;
  }



Compiler output:
a.cc: In function 'int main()':
a.cc:21:10: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   21 |       X+=substr(0,i+1);
      |          ^~~~~~
      |          strstr
Language: Java

java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        String S = scan.next();
        HashMap<Character, List<Integer>> map = new HashMap<>();
        char[] data = S.toCharArray();
        for (int i = 0; i < S.length(); i++) {
            if (!map.containsKey(data[i])) {
                map.put(data[i], new LinkedList<>());
            }
            List<Integer> list = map.get(data[i]);
            list.add(i);
        }
        char[] keyence = {'k','e','y','e','n','c','e'};
        long current = -1;
        for (char x : keyence) {
            if (!map.containsKey(x)) {
                System.out.println("NO");
                return;
            }
            List<Integer> list = map.get(x);
            if (list.size() == 0) {
                System.out.println("NO");
                return;
            }
            boolean found = false;
            long next = -1;
            while (!list.isEmpty()) {
                next = list.remove(0);
                if (current < next) {
                    found = true;
                    current = next;
                    break;
                }
            }
            if (!found) {
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    }
}


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
java.io.BufferedReader;
^
Main.java:2: error: class, interface, enum, or record expected
import java.io.InputStreamReader;
^
Main.java:3: error: class, interface, enum, or record expected
import java.util.*;
^
3 errors
Language: C++

#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define EPS (1e-9)
#define INF (1e17)
#define PI (acos(-1))
//const double PI = acos(-1);
//const double EPS = 1e-15;
//long long INF=(long long)1E17;
#define i_7 (long long)(1e9+7)
//#define i_7 998'244'353
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
using namespace std;

bool prime_(int n){
  if(n==1){
    return false;
  }else if(n==2){
    return true;
  }else{
    for(int i=2;i<=sqrt(n);i++){
      if(n%i==0){
        return false;
      }
    }
    return true;
  }
}

long long gcd_(long long a, long long b){
  if(a<b){
    swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd_(b,a%b);
  }
}
 
long long lcm_(long long x, long long y){
  return (x/gcd_(x,y))*y;
}


int main(){
  
  string s;
  cin>>s;
  l = s.size();
  string res = "NO";
  REP(i,8){
    string temp = s.substr(0,i) + s.substr(l-(7-i), 7-i);
    if(temp == "keyence"){
      res = "YES";
      break;
    }
  }
  cout<<res<<endl;
  return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:56:3: error: 'l' was not declared in this scope
   56 |   l = s.size();
      |   ^
Language: C++

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

    int N = S.length();

    string A = "keyence";
    int ans = 0;

    for(int i = 0; i < 7; i++){
        int j = 0;
        for (j < N;){
            if (S[j] == A[i]){
                ans++;
                j++;
                break;
            }
            j++;
        }
    }

    if (ans == 7){
        cout << "YES" << endl;
    }
    else {
        cout << "NO" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: error: expected primary-expression before ')' token
   15 |         for (j < N;){
      |                    ^
a.cc:15:20: error: expected ';' before ')' token
   15 |         for (j < N;){
      |                    ^
      |                    ;
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<cstdio>
#include<cmath>
#include<numeric>
#include<queue>
#include<stack>
#include<cstring>
#include<limits>
#include<functional>
#include<unordered_set>
#define rep(i,a) for(int i=(int)0;i<(int)a;++i)
#define pb push_back
#define eb emplace_back
using ll=long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = 1LL << 50;

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;
}
using namespace std;

void solve(){
	string s;
    cin>>s;
    int n=s.size();
    rep(i,n){//iは始点、jは終点,kは回数
        for(int j=i;j<n;++j){
            strign str="";
            rep(k,j-i+1)str.pb(s[i+k]);
            if(str==s){
                cout<<"YES\n";
                return;
            }
        }
    }
    cout<<"NO\n";
}

signed main(){
	std::ios::sync_with_stdio(false);
    std::cin.tie(0);
	solve();
	return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:45:13: error: 'strign' was not declared in this scope; did you mean 'strspn'?
   45 |             strign str="";
      |             ^~~~~~
      |             strspn
a.cc:46:25: error: 'str' was not declared in this scope; did you mean 'std'?
   46 |             rep(k,j-i+1)str.pb(s[i+k]);
      |                         ^~~
      |                         std
a.cc:47:16: error: 'str' was not declared in this scope; did you mean 'std'?
   47 |             if(str==s){
      |                ^~~
      |                std
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  cin >> S;
  
  size_t len = S.size();
  for(size_t i = 0; i < len; i++){
    for(size_t j = i; j < len; j++){
      string b = S.substr(0,i);
      string e = S.substr(j);
      if(b + e == "keyence"){
        cout << "YES" << endl;
        return 1;
      }
    }
  }
  cout << "NO" << endl;
  return 0
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:11: error: expected ';' before '}' token
   20 |   return 0
      |           ^
      |           ;
   21 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
string main() {
  string S;
  cin >> S;
  
  string K = "keyence";
  auto Sb = S.begin();
  auto Kb = K.begin();
  int i = 0;
  for(; i < 7; i++){
    if(*Sb != *Kb)break;
    ++Sb;
    ++Kb;
  }
  
  auto Se = S.end();
  auto Ke = K.end();
  int j = 0;
  for(; j < 7; j++){
    if(*Se != *Ke)break;
    --Se;
    --Ke;
  }
  
  if(i + j >= 7){
    return "YES";
  }else{
   	return "NO";
  }
}

cout << main() << endl;


Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | string main() {
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:28:12: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   28 |     return "YES";
      |            ^~~~~
      |            |
      |            const char*
a.cc:30:16: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   30 |         return "NO";
      |                ^~~~
      |                |
      |                const char*
a.cc: At global scope:
a.cc:34:1: error: 'cout' does not name a type
   34 | cout << main() << endl;
      | ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
auto main() {
  string S;
  cin >> S;
  
  string K = 'keyence';
  auto Sb = S.begin();
  auto Kb = K.begin();
  int i = 0;
  for(; i < 7; i++){
    if(*Sb != *Kb)break;
    ++Sb;
    ++Kb;
  }
  
  auto Se = S.end();
  auto Ke = K.end();
  int j = 0;
  for(; j < 7; j++){
    if(*Se != *Ke)break;
    --Se;
    --Ke;
  }
  
  if(i + j >= 7){
    cout << "YES" << endl;
  }else{
   	cout << "NO" << endl; 
  }
}


Compiler output:
a.cc:8:14: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
    8 |   string K = 'keyence';
      |              ^~~~~~~~~
a.cc:4:1: error: '::main' must return 'int'
    4 | auto main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:8:14: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string K = 'keyence';
      |              ^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  cin >> S;
  
  string KEY = 'keyence';
  auto Sb = S.begin();
  auto Kb = K.begin();
  int i = 0;
  for(; i < 7; i++){
    if(*Sb != *Kb)break;
    ++Sb;
    ++Kb;
  }
  
  auto Se = S.end();
  auto Ke = K.end();
  int j = 0;
  for(; j < 7; j++){
    if(*Se != *Ke)break;
    --Se;
    --Ke;
  }
  
  if(i + j >= 7){
    cout << "YES" << endl;
  }else{
   	cout << "NO" << endl; 
  }
}

Compiler output:
a.cc:8:16: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
    8 |   string KEY = 'keyence';
      |                ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:16: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
a.cc:10:13: error: 'K' was not declared in this scope; did you mean 'Kb'?
   10 |   auto Kb = K.begin();
      |             ^
      |             Kb
Language: C++

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

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

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

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

int main() {
    int a,flag=0,b=0;
    string s;
    char k[]="keyence";
    cin>>s;
    a=s.size();
    for(int i=0;i<a;i++){
        if(b>7)
             break;
        if(s[i]!=k[b]){
            flag++;
            while(true){
                if(s[i]==k[b]){
                    break;
                }
                if(a==i){
                    flag++;
                    break;
                }
                i++;
            }
        }
        b++;
    }

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

#include <bits/stdc++.h>
using namespace std;
int main(void){
  int N;
  cin >> N;
  int q_one = 0;
  int q_two = 0;
  int q_four = 0;
  for(int i=0; i<N; i++){
    int tmp;
    cin >> tmp;
    tmp %= 4;
    if(tmp == 0) q_four++;
    else if(tmp == 2) q_two++;
    else q_one++;
  }
  q_two %= 2;
  bool tf = false;
  if(q_two == 1){
    if(q_four > =q_one-1) tf = true;
  }else{
    if(q_four >= q_one) tf = true;
  }
  if(tf) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:17: error: expected primary-expression before '=' token
   20 |     if(q_four > =q_one-1) tf = true;
      |                 ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define ALL(v) (v).begin(), (v).end()

using namespace std;
using ll = long long;

int main()
{
  string S; cin >> S;
  if (S.size() == 7 && S == "keyence") {
    cout << "YES" << endl;
    return 0;
  }

  int trimn = S.size() - 7;
  for (int i = 0; i < trimn; ++i) {
    string ss = S;
    ss.erase(i, trimn);
    if (ss == "keyence") {
      cout << "YES" << endl;
      return 0;
    }
  

  cout << "NO" << endl;
}

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

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

#define int long long

signed main() {
    string s;
    cin >> s;
    int l = s.length();
    const string k = "keyence";
    int ki = 0;
    int si = 0;
    int cnt = 0;
    while(si < l && s[si] == k[ki] && ki < 7) si++, ki++;
    while(si < l && s[si] != k[ki]) si++;
    while(si < l && s[si] == k[ki] && ki < 7) si++, ki++;
    cout << (s[i] == l && ki == 7 ? "YES" : "NO" )<< endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: 'i' was not declared in this scope; did you mean 'si'?
   17 |     cout << (s[i] == l && ki == 7 ? "YES" : "NO" )<< endl;
      |                ^
      |                si
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod = (int)1e9 + 7;
const int INF = (int)100100100;

int main() {
    //ll N; cin >> N;
    //ll N,M; cin >> N >> M;
    string S; cin >> S;
    //ll H,W; cin >> H >> W;
  bool ans=false;
  for(int i=0;i<S.length();i++){
    for(int j=i;j<S.length();j++){
      string T=S.erase(S.begin()+i,S.begin()+j);
      if(T=="keyence")ans=true;
    }
  }
  
  if(ans)  cout << "YES" << endl;
  else cout << "NO";
}

/*



 */


Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: conversion from 'std::__cxx11::basic_string<char>::iterator' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   15 |       string T=S.erase(S.begin()+i,S.begin()+j);
      |                ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){

  string s;
  cin >> s;
  string key = "keyence";
  int count = 0;
  int rest = 0;
  for(int i = 0; i < s.size() ; i++){
  	if(count > 1){
    	for(int j = rest; j < 7; j++){
        	if(i < s.size() && key.at(j) != s.at(i)){
              count += 1;
              rest = j;
              break;
            }
          i++;
        }
    }
  }
  string s;
  s = (rest == 6)? "YES": "NO";
  cout << s<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:10: error: redeclaration of 'std::string s'
   22 |   string s;
      |          ^
a.cc:5:10: note: 'std::string s' previously declared here
    5 |   string s;
      |          ^
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";
  st t;
  ci(t);
  ll a=t.sz;
  bl b=false;
  
  if(t.substr(0,7)==s) b=true;
  else if(t.substr(a-7,7)==s) b=true;
  else{
    FOR(i,1,7){
      if(s.substr(0,i)==t.substr(0,i)&&s.substr(i,7-i)==t.substr(a-7+i,7-i)){
        b=true;
      }
    }
    if(b){
      co("YES")
    }
    else{
      co("NO")
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:136:4: error: expected '}' at end of input
  136 |   }
      |    ^
a.cc:114:15: note: to match this '{'
  114 | signed main() {
      |               ^
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";
  st t;
  ci(t);
  bl b=false;
  
  if(t.substr(0,7)==s) b=true;
  else if(t.substr(t.sz-7,7)==s) b=true;
  else{
    FOR(i,1,7){
      if(s.substr(0,i)==t.substr(0,i)&&s.substr(i,7-i)==t.substr(n-i,7-i)){
        b=true;
      }
    }
    if(b){
      co("YES")
    }
    else{
      co("NO")
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:125:66: error: 'n' was not declared in this scope
  125 |       if(s.substr(0,i)==t.substr(0,i)&&s.substr(i,7-i)==t.substr(n-i,7-i)){
      |                                                                  ^
a.cc:135:4: error: expected '}' at end of input
  135 |   }
      |    ^
a.cc:114:15: note: to match this '{'
  114 | signed main() {
      |               ^