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

#include <bits/stdc++.h>
#define int long long int
using namespace std;
template<typename T,typename U> using P=pair<T,U>;
template<typename T> using V=vector<T>;
template<typename T>bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;}
template<typename T>bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;}

template<typename T>auto&operator<<(ostream&s,const vector<T>&v){s<<"[";bool a=1;for(auto e:v){s<<(a?"":" ")<<e;a=0;}s<<"]";return s;}
template<typename T,typename U>auto&operator<<(ostream&s,const pair<T,U>&p){s<<"("<<p.first<<","<<p.second<<")";return s;}
template<typename T>auto&operator<<(ostream&s,const set<T>&st){s<<"{";bool a=1;for(auto e:st){s<<(a?"":" ")<<e;a=0;}s<<"}";return s;}
template<typename T,typename U>auto&operator<<(ostream&s,const map<T,U>&m){s<<"{";bool a=1;for(auto e:m){s<<(a?"":" ")<<e.first<<":"<<e.second;a=0;}s<<"}";return s;}
#define DUMP(x) cout<<#x<<" = "<<(x)<<endl
#define COUT(x) cerr<<#x<<" = "; cout<<(x)<<endl

struct edge { int to, cost; };

const int INF = 1e18;
const int MOD = 1e9+7;

signed main()
{
   map<int,int> cnt;
   for (int i = 0; i < 4; i++) {
      int n; cin >> n;
      cnt[n]++;
   }

   if (n[1] * n[9] * n[7] * n[4]) {
      cout << "YES" << endl;
   } else {
      cout << "NO" << endl;
   }

   return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:8: error: 'n' was not declared in this scope; did you mean 'yn'?
   29 |    if (n[1] * n[9] * n[7] * n[4]) {
      |        ^
      |        yn
Language: C++

include<iostream>
#include<stdio.h>

using namespace std;

int a[15];
int main(){
    for(int i=0; i<4; i++) {
        int x;
        cin >> x;
        a[x]++;
    }
    cout << ( (a[1]&&a[9])&&(a[7]&&a[4]) ? "YES" : "NO") << endl;
    return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:10:9: error: 'cin' was not declared in this scope
   10 |         cin >> x;
      |         ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<stdio.h>
  +++ |+#include <iostream>
    3 | 
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout << ( (a[1]&&a[9])&&(a[7]&&a[4]) ? "YES" : "NO") << endl;
      |     ^~~~
a.cc:13:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:61: error: 'endl' was not declared in this scope
   13 |     cout << ( (a[1]&&a[9])&&(a[7]&&a[4]) ? "YES" : "NO") << endl;
      |                                                             ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<stdio.h>
  +++ |+#include <ostream>
    3 |
Language: C++

#include<iostreaM>
using namespace std;
#define N 4

int main(void){
    int n[N];
    int a=0,b=0,c=0,d=0;

    for(int i=0;i<N;i++){
        cin>>n[i];
        switch(n[i]){
            case 1:a+=1;break;
            case 9:b+=1;break;
            case 7:c+=1;break;
            case 4:d+=1;break;
        }
    }

    if(a==1&&b==1&&c==1&&d==1)
        cout<"YES"<<endl;
    else
        cout<<"NO"<<endl;

    return 0;
}


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

#include <iostream> 
#include <iomanip> 
#include <vector> 
#include <algorithm> 
#include <numeric> 
#include <functional> 
#include <cmath> 
#include <queue> 
#include <stack> 

#define Ford(a,b) for (int i=(a);i<(b);i++) 
#define For(n) Ford(0,n) 
typedef long long ll; 

using namespace std;

int main(){
  string str[4];
  int Chk = {0,0,0,0};
  For(4) {
    cin>>str[i];
    switch(str[i]){
      case "1":
        Chk[0]++;
        break;
      case "7":
        Chk[1]++;
        break;
      case "9":
        Chk[2]++;
        break;
      case "4":
        Chk[3]++;
        break;
      default:
      cout<<"NO"<<endl;
        return 0;
    }
  }
  For(4) {
    f(Chk[i]>=2) {
      cout<<"NO"<<endl;
      return 0;
    }
  }
  
  cout<<"YES"<ndl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:7: error: scalar object 'Chk' requires one element in initializer
   19 |   int Chk = {0,0,0,0};
      |       ^~~
a.cc:22:17: error: switch quantity not an integer
   22 |     switch(str[i]){
      |            ~~~~~^
a.cc:41:5: error: 'f' was not declared in this scope
   41 |     f(Chk[i]>=2) {
      |     ^
a.cc:47:15: error: 'ndl' was not declared in this scope
   47 |   cout<<"YES"<ndl;
      |               ^~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int N1, N2, N3, N4, count[4]={0,0,0,0}, counter=0;
  int N[4];
  cin  >> N1 >> N2 >> N3 >> N4;
  N[1] = N1;
  N[2] = N2;
  N[3] = N3;
  N[4] = N4;
  
  for(int i=0; i<4; i++)
  {
    if(N[i] = 1)
      count[1] += 1;
      break;
    if(N[i] = 7)
      count[2] += 1;
      break;
    if(N[i] = 9)
      count[3] += 1;
      break;
    if(N[i] = 4)
      count[4] += 1;
      break;
    
    if(count[i] == 1)
      counter++;
  }
  if(counter == 4)
    cout << yes;
  else
    cout << no;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:13: error: 'yes' was not declared in this scope
   32 |     cout << yes;
      |             ^~~
a.cc:34:13: error: 'no' was not declared in this scope
   34 |     cout << no;
      |             ^~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int N1, N2, N3, N4, count[4]={0,0,0,0}, count=0;
  int N[4];
  cin  >> N1 >> N2 >> N3 >> N4;
  N[1] = N1;
  N[2] = N2;
  N[3] = N3;
  N[4] = N4;
  
  for(int i=0; i<4; i++)
  {
    if(N[i] = 1)
      count[1] += 1;
      break;
    if(N[i] = 7)
      count[2] += 1;
      break;
    if(N[i] = 9)
      count[3] += 1;
      break;
    if(N[i] = 4)
      count[4] += 1;
      break;
    
    if(count[i] == 1)
      count++;
  }
  if(count == 4)
    cout << yes;
  else
    cout << no;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:43: error: conflicting declaration 'int count'
    5 |   int N1, N2, N3, N4, count[4]={0,0,0,0}, count=0;
      |                                           ^~~~~
a.cc:5:23: note: previous declaration as 'int count [4]'
    5 |   int N1, N2, N3, N4, count[4]={0,0,0,0}, count=0;
      |                       ^~~~~
a.cc:29:7: error: lvalue required as increment operand
   29 |       count++;
      |       ^~~~~
a.cc:31:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   31 |   if(count == 4)
      |      ~~~~~~^~~~
a.cc:32:13: error: 'yes' was not declared in this scope
   32 |     cout << yes;
      |             ^~~
a.cc:34:13: error: 'no' was not declared in this scope
   34 |     cout << no;
      |             ^~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int N1, N2, N3, N4;
  int N[4];
  cin N1 >> N2 >> N3 >> N4;
  N[1] = N1;
  N[2] = N2;
  N[3] = N3;
  N[4] = N4;
  
  for(int i=0; i<4; i++)
  {
    if(N[i] = 1)
      break;
    if(N[i] = 7)
      break;
    if(N[i] = 9)
      break;
    if(N[i] = 4)
      break;
    cout << N[i];
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected ';' before 'N1'
    7 |   cin N1 >> N2 >> N3 >> N4;
      |      ^~~
      |      ;
Language: C++

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

int main() {
	vector<int> N(4);
	rep(i,4)
	cin>>N[i];
	sort(all(N));
	string ans="NO";
	if(N[0]==1&&N[1]==4&&N[2]==7&&N[3]==9)ans="YES";
	cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'all' was not declared in this scope; did you mean 'std::filesystem::perms::all'?
    9 |         sort(all(N));
      |              ^~~
      |              std::filesystem::perms::all
In file included from /usr/include/c++/14/filesystem:51,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200,
                 from a.cc:1:
/usr/include/c++/14/bits/fs_fwd.h:158:7: note: 'std::filesystem::perms::all' declared here
  158 |       all               =  0777,
      |       ^~~
Language: C++

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

int main(){
	int a,b,c,d;
  	cin>>a>>b>>c>>d;
  	
  	if(a+b+c+d==21 && a*b*c*d==252){
		cout<<"YES"<<endl;
    }else{
      	cout<<"NO"<<endl;
    }
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespce'
    2 | using namespce std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin>>a>>b>>c>>d;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |                 cout<<"YES"<<endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |                 cout<<"YES"<<endl;
      |                              ^~~~
      |                              std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:11:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |         cout<<"NO"<<endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |         cout<<"NO"<<endl;
      |                     ^~~~
      |                     std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

bool vis[10];

int main()
{
  int x;
  for(int i=0;i<n;i++)
    cin>>x,vis[x]  true;
  
  if(vis[1] && vis[4] && vis[7] && vis[9])
    cout<<"YES\n";
  else
    cout<<"NO\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'n' was not declared in this scope
    9 |   for(int i=0;i<n;i++)
      |                 ^
a.cc:10:18: error: expected ';' before 'true'
   10 |     cin>>x,vis[x]  true;
      |                  ^ ~~~~
      |                  ;
Language: C++

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

bool vis[10];

int main()
{
  int x;
  for(int i=0;i<n;i++)
    cin>>x,vis[x]  true;
  
  if(vis[1] && vis[4] && vis[7] && vis[9])
    cout<<"YES\n";
  else
    cout<<"NO\n";
}


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespcae'
    2 | using namespcae std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:17: error: 'n' was not declared in this scope
    9 |   for(int i=0;i<n;i++)
      |                 ^
a.cc:10:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 |     cin>>x,vis[x]  true;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |     cout<<"YES\n";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |     cout<<"NO\n";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

bool vis[10];

int main()
{
  int x;
  for(int i=0;i<n;i++)
    cin>>x,vis[x]  true;
  
  if(vis[1] && vis[4] && vis[7] && vis[9])
    cout<<"YES\n";
  else
    cout<<"NO\n";
}

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

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
using ll = long long;

int main(){
        int nums[5]={1,9,7,4},n;
        bool flags[5];
        for(int i=0;i<4;i++){
                cin >> n;
                for(int j=0;j<4;j++){
                        if(n==nums[j])  flags[j]=true;
                }
        }
        for(int i=0;i<4;i++){
                if(flags[j]!=true){
                        cout << "NO";
                        return 0;
                }
        }
        cout << "YES";
        return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:26: error: 'j' was not declared in this scope
   17 |                 if(flags[j]!=true){
      |                          ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int a[4],c=0,d=0,e=0,f=0;
    cin>>a[0];
    cin>>a[1];
    cin>>a[2];
    cin>>a[3];
    for(int i=0;i<4;++i)
    {
        if(a[i]==1)
            c++;
        else if(a[i]==9)
            d++;
        else if(a[i]==7)
            e++;
        else if(a[i]==4)
            f++;
    }
    if(c=1 && d=1 && e=1 && f=1)
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:26: error: lvalue required as left operand of assignment
   21 |     if(c=1 && d=1 && e=1 && f=1)
      |                        ~~^~~~
Language: C++

#include<bits/dtc++.h>
using namespace  std;
int main()
{
	int a[4];
	cin>>a[1]>>a[2]>>a[3]>>a[4];
	sort(a,a+4);
	if(!a[1]==1)
	{
		cout<<"NO"<<endl;
		return 0;
	}
	if(!a[2]==4)
	{
		cout<<"NO"<<endl;
		return 0;
	}
	if(!a[3]==7)
	{
		cout<<"NO"<<endl;
		return 0;
	}
	if(!a[9]==9)
	{
		cout<<"NO"<<endl;
		return 0;
	}
	cout<<"YES"<<endl
    return 0;
}

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

#include <cstdio>

using namespace std;

int a[4];

int main() {
  for (int i = 0; i < 4; ++i)
    scanf("%d", &a[i]);
  sort(a, a + 4);
  puts(a[0] == 1 && a[1] == 4 && a[2] == 7 && a[4] == 9 ? "YES" : "NO");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   10 |   sort(a, a + 4);
      |   ^~~~
      |   short
Language: C++

#include<bits/stdc++.h>
 
using namespace std;
 
int main()
{
  	int n1,n2,n3,n4;
  	cin>>n1>>n2>>n3>>n4;
  	vector<int>v;
  	v.push_back(n1);v.push_back(n2);v.push_back(n3);v.push_back(n4);
  	sort(v.begin(),v.end());
   if(v[0]==1&&v[1]==4&&v[2]=7&&v[3]==9)
     cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: lvalue required as left operand of assignment
   12 |    if(v[0]==1&&v[1]==4&&v[2]=7&&v[3]==9)
Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Keyence
{
    class Beginning
    {
        static void Main(string[] args)
        {
            int[] n = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int count = 0;
            int m = n[0] * 1000 + n[1] * 100 + n[2] * 10 + n[3];
            for (int i = 0; i < 4; i++)
            {
                if (n[i] == 1) { count++; }
                if (n[i] == 9) { count++; }
                if (n[i] == 7) { count++; }
                if (n[i] == 4) { count++; }
            }
            Console.WriteLine(count == 4 ? "YES" : "NO");
        }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Threading.Tasks;
      |       ^~~~~~
a.cc:11:26: error: 'string' has not been declared
   11 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:11:35: error: expected ',' or '...' before 'args'
   11 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:25:6: error: expected ';' after class definition
   25 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void Keyence::Beginning::Main(int*)':
a.cc:13:16: error: structured binding declaration cannot have type 'int'
   13 |             int[] n = Console.ReadLine().Split().Select(int.Parse).ToArray();
      |                ^~
a.cc:13:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:13:16: error: empty structured binding declaration
a.cc:13:19: error: expected initializer before 'n'
   13 |             int[] n = Console.ReadLine().Split().Select(int.Parse).ToArray();
      |                   ^
a.cc:15:21: error: 'n' was not declared in this scope
   15 |             int m = n[0] * 1000 + n[1] * 100 + n[2] * 10 + n[3];
      |                     ^
a.cc:23:13: error: 'Console' was not declared in this scope
   23 |             Console.WriteLine(count == 4 ? "YES" : "NO");
      |             ^~~~~~~
Language: C++

#include <iostream>

int main(){
  int N;
  int num[10];
  for(int i =0;i<10;i++){
    num[i]=0;
  }
  for(int i = 0;i<4;i++){
    cin>>N;
    num[N]++;
  }
  if(num[1]==1&&num[9]==1&&num[7]==1&&num[4]==1){
    cout<<"YES"<<endl;
  }else{
    cout<<"NO"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 |     cin>>N;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:14:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |     cout<<"YES"<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |     cout<<"YES"<<endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:16:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |     cout<<"NO"<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |     cout<<"NO"<<endl;
      |                 ^~~~
      |                 std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int ar[6];
int ck[]={1,9,7,4};

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	for(int i=0;i<4;i++)
		cin>>ar[i];
	for(int i=0;i<4;i++)
	{
		for(int j=0;j<4;j++)
		{
			if(ck[i]==ar[j])
				break;
			if(j==3)
			{
				cout<<"NO";
				return;
			}
		}
	}
	cout<<"YES";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:33: error: return-statement with no value, in function returning 'int' [-fpermissive]
   23 |                                 return;
      |                                 ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
	vector <char> N(4);
	vector <int> C(4);
	int i,j=0;
	cin >> N.at(0) >> N.at(1) >> N.at(2) >> N.at(3);
	for(i = 0;i < 4;i++) {
		C(i) = 0;
		if(N.at(i) == '1') C.at(0) = 1;
		if(N.at(i) == '9') C.at(1) = 1;
		if(N.at(i) == '7') C.at(2) = 1;
		if(N.at(i) == '4') C.at(3) = 1;
	}
	if(C.at(0)==1 && C.at(1)==1 && C.at(2)==1 && C.at(3)==1) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: no match for call to '(std::vector<int>) (int&)'
    9 |                 C(i) = 0;
      |                 ~^~~
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		
		int N1 = sc.nextInt();
        int N2 = sc.nextInt();
        int N3 = sc.nextInt();
        int N4 = sc.nextInt();
        ArrayList<int> a = new ArrayList<int>();
        a.add(1);
        a.add(7);
        a.add(9);
        a.add(4);
        
        if(a.indexOf(N1) != -1){
        	a.remove(a.indexOf(N1));
            if(a.indexOf(N2) != -1){
        		a.remove(a.indexOf(N2));
                if(a.indexOf(N3) != -1){
        			a.remove(a.indexOf(N3));
                    if(a.indexOf(N4) != -1){
        				System.out.println("YES");
                    }
                }
            }
        }else{
        	System.out.println("NO");        
        }
     } 
}  
        
        


Compiler output:
Main.java:11: error: unexpected type
        ArrayList<int> a = new ArrayList<int>();
                  ^
  required: reference
  found:    int
Main.java:11: error: unexpected type
        ArrayList<int> a = new ArrayList<int>();
                                         ^
  required: reference
  found:    int
2 errors
Language: Java

import java.util.*

public class Main {
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		
		int N1 = sc.nextInt();
        int N2 = sc.nextInt();
        int N3 = sc.nextInt();
        int N4 = sc.nextInt();
        ArrayList<int> a = new ArrayList<int>();
        a.add(1);
        a.add(7);
        a.add(9);
        a.add(4);
        
        if(a.indexOf(N1) != -1){
        	a.remove(a.indexOf(N1));
            if(a.indexOf(N2) != -1){
        		a.remove(a.indexOf(N2));
                if(a.indexOf(N3) != -1){
        			a.remove(a.indexOf(N3));
                    if(a.indexOf(N4) != -1){
        				System.out.println("YES");
                    }
                }
            }
        }else{
        	System.out.println("NO");        
        }
     } 
}  
        
        

Compiler output:
Main.java:1: error: ';' expected
import java.util.*
                  ^
1 error
Language: C++

#include <iostream>
using namespace std;
int main(){
  int A[4];
  cin >> A[0] >> A[1] >> A[2] >> A[3];
  sort(A,A+4);
  int D[4] = {1,4,7,9};
  int count = 0;
  for(int i = 0; i < 4; i++){
    if(A[i] != D[i]) {
      count = count + 1;
    }
  }

  if(count == 0){
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    6 |   sort(A,A+4);
      |   ^~~~
      |   short
Language: Java

import java.util.*;
public class Main
 public static void main (String[] args){

	 	Scanner sc = new Scanner(System.in);
	 	
	 	// 整数の入力
	 	String str = sc.next();

	 	String out = "NO";
	 	for (int i =0; i< 8; i++){
	 		String strTry = str.substring(0,i)+str.substring(i+str.length()-7);
	 		System.out.println(strTry);
	 		if (strTry.equals("keyence")){
	 			out = "YES";
	 			break;
	 		}
	 	}

Compiler output:
Main.java:2: error: '{' expected
public class Main
                 ^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
 public static void main (String[] args){
               ^
  (use --enable-preview to enable unnamed classes)
Main.java:18: error: reached end of file while parsing
	 	}
	 	 ^
3 errors
Language: Java

import java.util.*;
public class KeyenceChallenge {
 public static void main (String[] args){

	 	Scanner sc = new Scanner(System.in);
	 	
	 	// 整数の入力
	 	int a = sc.nextInt();
	 	int b = sc.nextInt();
	 	int c = sc.nextInt();
	 	int d = sc.nextInt();

	 	int[] numbs = {a,b,c,d};
	 	String strBl;
	 	if(Arrays.asList(numbs).contains(1) &&
	 			Arrays.asList(numbs).contains(9) &&
	 			Arrays.asList(numbs).contains(7)&&
	 			Arrays.asList(numbs).contains(4)){
	 		strBl = "YES";
	 	} else{
	 		strBl = "NO";
	 	}
	 	// 出力
	 	
	 	System.out.println(strBl);

	 
	 
 }
	
}


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

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int a[4];
	for(int i=0 ; i<4 ; i++){
		cin>>a[i];
	}
	sort(a,a+4);
	if(a[0]==1 && a[1]==4 && a[2]==7 && a[3]==9)cout<<"YES";
	else cout<<"NO";
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   10 |         sort(a,a+4);
      |         ^~~~
      |         short
Language: C++

#include <iostream>
using namespace std;
#include <vector>
int main(){
  int a,b,c,d;
  cin >> a >> b >> c >> d;
  vector<int> v = {a, b,c,d};
  sort(begin(v), end(v));
  if(v == {1,4,7,9})  {
    cout << "YES" << endl;
  }
  else {
    cout << "NO" << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    8 |   sort(begin(v), end(v));
      |   ^~~~
      |   short
a.cc:9:11: error: expected primary-expression before '{' token
    9 |   if(v == {1,4,7,9})  {
      |           ^
a.cc:9:10: error: expected ')' before '{' token
    9 |   if(v == {1,4,7,9})  {
      |     ~    ^~
      |          )
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a,b,c,d;
  cin >> a >> b >> c >> d;
  vector<int> v = {a, b,c,d};
  sort(begin(v), end(v));
  if(v == {1,4,7,9})  {
    cout << "YES" << endl;
  }
  else {
    cout << "NO" << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> v = {a, b,c,d};
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> v = {a, b,c,d};
      |          ^~~
a.cc:8:14: error: 'v' was not declared in this scope
    8 |   sort(begin(v), end(v));
      |              ^
a.cc:8:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    8 |   sort(begin(v), end(v));
      |   ^~~~
      |   short
a.cc:9:11: error: expected primary-expression before '{' token
    9 |   if(v == {1,4,7,9})  {
      |           ^
a.cc:9:10: error: expected ')' before '{' token
    9 |   if(v == {1,4,7,9})  {
      |     ~    ^~
      |          )
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,c,d;
  cin >> a >> b >> c >> d;
  if(a+b+c+d===21 && a*b*c*d==252){cout << "YES" << endl;}
  else{cout << "NO" << endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected primary-expression before '=' token
    7 |   if(a+b+c+d===21 && a*b*c*d==252){cout << "YES" << endl;}
      |               ^
Language: C++

#include<stdio.h>
int main()
{
  int a,b,c,d;
  scanf("%d %d %d %d",&a,&b,&c,&d);
  if((a==1 || a==7 ||  a===9 || a==4) && ( b==1 || b==7 || b==9 || b==4) && (c==1 || c==7 || c==9 || c==4) && (d==1 || d==7 || d==9 || d==4) )
    printf("YES\n");
  else
    printf("NO\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:27: error: expected primary-expression before '=' token
    6 |   if((a==1 || a==7 ||  a===9 || a==4) && ( b==1 || b==7 || b==9 || b==4) && (c==1 || c==7 || c==9 || c==4) && (d==1 || d==7 || d==9 || d==4) )
      |                           ^
Language: C++

#include<iostream>
using namespace std;
int main () {
  int d[4];
  cin >> d[0] >> d[1] >> d[2] >> d[3];
  int a[] = {1, 9, 7, 4};
  int can = 0;
  for (int i = 0; i < 4; i ++) {
    for (int j = 0; j < 4; j ++) {
      if (d[i] = a[j]) {
        can ++;
        a[j] = 10;
      }
    }
  }
  if (c == 4) cout << "YES" << endl;
  else cout << "NO" << endl;
}
        

Compiler output:
a.cc: In function 'int main()':
a.cc:16:7: error: 'c' was not declared in this scope
   16 |   if (c == 4) cout << "YES" << endl;
      |       ^
Language: C

#inlude <stdio.h>

int main(){
  int i,n,fl=0,ng=0;
  
  for(i=0;i<4 && ng==0;i++){
  scanf("%d",&n);
    switch(n){
      case 1:
        fl += 1000;
        break;
      case 9:
        fl += 100;
        break;      
      case 7:
        fl += 10;
        break;      
      case 4:
        fl += 1;
        break;
      default:
        ng = 1;
        break;
    }
  }
  
  if(fl == 1111){
    printf("YES\n");
  }
  else{
    printf("NO\n");
  }
  
  return 0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #inlude; did you mean #include?
    1 | #inlude <stdio.h>
      |  ^~~~~~
      |  include
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 |   scanf("%d",&n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #inlude <stdio.h>
main.c:7:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 |   scanf("%d",&n);
      |   ^~~~~
main.c:7:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:28:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   28 |     printf("YES\n");
      |     ^~~~~~
main.c:28:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:28:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:28:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:31:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   31 |     printf("NO\n");
      |     ^~~~~~
main.c:31:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>

int main(void){
  int numbers[4] = {}; 
  int flag1 = 0;
  int flag9 = 0;
  int flag7 = 0;
  int flag4 = 0;
  for(i = 0; i < 4; i++){
  scanf("%d",numbers[i]);
  if(numbers[i]==1){
    flag1++;
  	}
  if(numbers[i]==9){
    flag9++;
  	}
  if(numbers[i]==7){
    flag7++;
  	}
  if(numbers[i]==4){
    flag4++;
  	}  
  }
  if(flag1+flag9+flag7+flag4 == 4){
    printf("YES");
  }
  else
    printf("NO");
}

Compiler output:
main.c: In function 'main':
main.c:9:7: error: 'i' undeclared (first use in this function)
    9 |   for(i = 0; i < 4; i++){
      |       ^
main.c:9:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void){
  int numbers[4] = {}; 
  int i = 0;
  int flag1 = 0;
  int flag9 = 0;
  int flag7 = 0;
  int flag4 = 0;
  for(i = 0; i < 4; i++){
  scanf("%d",numbers[i])
  if(numbers[i]==1){
    flag1++;
  	}
  if(numbers[i]==9){
    flag9++;
  	}
  if(numbers[i]==7){
    flag7++;
  	}
  if(numbers[i]==4){
    flag4++;
  	}  
  }
  if(flag1+flag9+flag7+flag4 == 4){
    printf("YES");
  }
  else
    printf("NO");
}

Compiler output:
main.c: In function 'main':
main.c:11:25: error: expected ';' before 'if'
   11 |   scanf("%d",numbers[i])
      |                         ^
      |                         ;
   12 |   if(numbers[i]==1){
      |   ~~
Language: C

#include<stdio.h>

int main(void){
  int numbers[4] = {}; 
  int flag1 = 0;
  int flag9 = 0;
  int flag7 = 0;
  int flag4 = 0;
  for(i = 0; i < 4; i++){
  scanf("%d",numbers[i])
  if(numbers[i]==1){
    flag1++;
  	}
  if(numbers[i]==9){
    flag9++;
  	}
  if(numbers[i]==7){
    flag7++;
  	}
  if(numbers[i]==4){
    flag4++;
  	}  
  }
  if(flag1+flag9+flag7+flag4 == 4){
    printf("YES");
  }
  else
    printf("NO");
}

Compiler output:
main.c: In function 'main':
main.c:9:7: error: 'i' undeclared (first use in this function)
    9 |   for(i = 0; i < 4; i++){
      |       ^
main.c:9:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:25: error: expected ';' before 'if'
   10 |   scanf("%d",numbers[i])
      |                         ^
      |                         ;
   11 |   if(numbers[i]==1){
      |   ~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a[5];
  for(i=0;i<4;i++)
    cin>>a[i];
  sort(a,a+4);
  if(a[0]==1 && a[1]==9 && a[2]==7 && a[3]==4)
    cout<<"YES";
  else
    cout<<"NO";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'i' was not declared in this scope
    6 |   for(i=0;i<4;i++)
      |       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	ll ar[4],i,j;
  	for(i=0;i<4;i++){
    	cin>>ar[i];
    }
  	sort(ar,ar+4);
  	if(ar[0]==1&&ar[1]==4&&ar[2]==7&&ar[3]==9){
    	cout<<"YES";
    }
  	else cout<<"NO";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'll' was not declared in this scope
    4 |         ll ar[4],i,j;
      |         ^~
a.cc:5:13: error: 'i' was not declared in this scope
    5 |         for(i=0;i<4;i++){
      |             ^
a.cc:6:14: error: 'ar' was not declared in this scope
    6 |         cin>>ar[i];
      |              ^~
a.cc:8:14: error: 'ar' was not declared in this scope
    8 |         sort(ar,ar+4);
      |              ^~
Language: C++

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

int main() {
    int arr[4];
    int req[4];
    req = [1, 9 ,7 ,4];

    for int(i = 0; i < 4; i++) {
        cin >> arr[i];
    }

    int ans = 0;
    for(int i = 0; i < 4; i++) {
        q = req[i];
        for(int j = 0; j < 4; j++) {
            if(arr[i] == q) {
                ans += 1;
            }
        }
    }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected identifier before numeric constant
    7 |     req = [1, 9 ,7 ,4];
      |            ^
a.cc:7:13: error: expected ']' before ',' token
    7 |     req = [1, 9 ,7 ,4];
      |             ^
      |             ]
a.cc: In lambda function:
a.cc:7:13: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:7:9: error: incompatible types in assignment of 'main()::<lambda()>' to 'int [4]'
    7 |     req = [1, 9 ,7 ,4];
      |     ~~~~^~~~
a.cc:9:9: error: expected '(' before 'int'
    9 |     for int(i = 0; i < 4; i++) {
      |         ^~~
      |         (
a.cc:9:13: error: 'i' was not declared in this scope
    9 |     for int(i = 0; i < 4; i++) {
      |             ^
a.cc:15:9: error: 'q' was not declared in this scope
   15 |         q = req[i];
      |         ^
Language: C++

#include "stdafx.h"
#include<iostream>
using namespace std;


int _tmain(int argc, _TCHAR* argv[])
{
	int ab,l,a[4],cnt;
	cnt = 0;
	ab = 0;
	for (int i = 0;i<4;i++){
		cin >> l;
		a[i] = l;
		//cout << a[i];
	}
	int search[4] = {1,9,7,4};
	for (int i = 0; i < 4; i++){
		for(int j = 0; j < 4; j++){
			if (a[i] == search[j])
				cnt++;
		}
	}
	if (cnt == 4){
		cout << "YES";
	}
	else{
		cout << "NO";
	}
	return 0;
}

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

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
	<FileVersion major="1" minor="6" />
	<Project>
		<Option title="1974" />
		<Option pch_mode="2" />
		<Option compiler="gcc" />
		<Build>
			<Target title="Debug">
				<Option output="bin/Debug/1974" prefix_auto="1" extension_auto="1" />
				<Option object_output="obj/Debug/" />
				<Option type="1" />
				<Option compiler="gcc" />
				<Compiler>
					<Add option="-g" />
				</Compiler>
			</Target>
			<Target title="Release">
				<Option output="bin/Release/1974" prefix_auto="1" extension_auto="1" />
				<Option object_output="obj/Release/" />
				<Option type="1" />
				<Option compiler="gcc" />
				<Compiler>
					<Add option="-O2" />
				</Compiler>
				<Linker>
					<Add option="-s" />
				</Linker>
			</Target>
		</Build>
		<Compiler>
			<Add option="-Wall" />
			<Add option="-fexceptions" />
		</Compiler>
		<Unit filename="main.cpp" />
		<Extensions>
			<code_completion />
			<envvars />
			<debugger />
			<lib_finder disable_auto="1" />
		</Extensions>
	</Project>
</CodeBlocks_project_file>


Compiler output:
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
      | ^
Language: C++

a,b,c,d=map(int,input().split())
if(a*b*c*d==252)and(a+b+c+d==21):
  print('YES')
else:
  print('NO')

Compiler output:
a.cc:3:9: warning: multi-character character constant [-Wmultichar]
    3 |   print('YES')
      |         ^~~~~
a.cc:5:9: warning: multi-character character constant [-Wmultichar]
    5 |   print('NO')
      |         ^~~~
a.cc:1:1: error: 'a' does not name a type
    1 | a,b,c,d=map(int,input().split())
      | ^
Language: Java

import java.util.Scanner;

public class Beginning {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in,"UTF-8");
		int n[] = {1,9,7,4};

		String[] inp = new String[4];

		for(int i=0;i<4;i++) {
			inp[i] = sc.next();
		}

		int cont=0;

		for(int i=0;i<4;i++) {
			for(int j=0;j<4;j++) {
				if(n[i] == Integer.parseInt(inp[j])) cont++;
			}
		}

		if(cont == 4) {
			System.out.print("YES");

		}
		else if (cont != 4)
		{
			System.out.print("NO");
		}
		sc.close();
	}

}

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

#include<cstdio>
#include <stdio.h>
#include <iostream>
#include <vector>

using namespace std;

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

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

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

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

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:40: error: 'count' is not a member of 'std'; did you mean 'cout'?
   18 |                         iStr[i] = std::count(str.cbegin(), str.cend(), keyence[i]);
      |                                        ^~~~~
      |                                        cout
Language: C

#include<stdio.h>

int main(void){

	int n[4],i;

	for(i=0;i<=3;i++){
		scanf("%d",&n[i]);
	}

	if((n[0])==1||4||7||9)&&(n[1]==1||4||7||9)&&(n[2]==1||4||7||9)&&(n[3]==1||4||7||9)){
	
		printf("YES\n");
	}else{
	
		printf("NO\n");
	}

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:33: error: expected identifier before '(' token
   11 |         if((n[0])==1||4||7||9)&&(n[1]==1||4||7||9)&&(n[2]==1||4||7||9)&&(n[3]==1||4||7||9)){
      |                                 ^
main.c:11:91: error: expected statement before ')' token
   11 |         if((n[0])==1||4||7||9)&&(n[1]==1||4||7||9)&&(n[2]==1||4||7||9)&&(n[3]==1||4||7||9)){
      |                                                                                           ^
main.c:14:10: error: 'else' without a previous 'if'
   14 |         }else{
      |          ^~~~
Language: C

#include <stdio.h>
int main(void){
int a, b, c, d, flag = 0;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
scanf("%d",&d);
if(a==1||a==4||a==7||a==9){
    if((b==1||b==4||b==7||b==9)&&(b!=a)){
        if((c==1||c==4||c==7||c==9)&&(c!=a)&&(c!=b)){
            if((d==1||d==4||d==7||d=9)&&(d!=a)&&(d!=b)&&(d!=c)){
                flag = 1;
            }
        }
    }
}
if(flag==1){
    printf("YES\n");
}else{
    print("NO\n");
}
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:36: error: lvalue required as left operand of assignment
   11 |             if((d==1||d==4||d==7||d=9)&&(d!=a)&&(d!=b)&&(d!=c)){
      |                                    ^
main.c:20:5: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   20 |     print("NO\n");
      |     ^~~~~
      |     printf
Language: C++

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


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'count' was not declared in this scope
    8 |     int i=0,j=0;count=0;
      |                 ^~~~~
Language: C

#include <stdio.h>
int main(void){
int a, b, c, d, flag = 0;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
scanf("%d",&d);
if(a==1||a==4||a==7||a==9){
    if((b==1||b==4||b==7||b==9)&&(b!=a)){
        if((c==1||c==4||c==7||c==9)&&(c!=a)&&(c!=b)){
            if((d==1||d==4||d==7||d=9)&&(d!=a)&&(d!=b)&&(d!=c)){
                flag = 1;
            }
        }
    }
}
if(fla==1){
    printf("YES\n");
}else{
    print("NO\n");
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:36: error: lvalue required as left operand of assignment
   11 |             if((d==1||d==4||d==7||d=9)&&(d!=a)&&(d!=b)&&(d!=c)){
      |                                    ^
main.c:17:4: error: 'fla' undeclared (first use in this function); did you mean 'flag'?
   17 | if(fla==1){
      |    ^~~
      |    flag
main.c:17:4: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:5: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   20 |     print("NO\n");
      |     ^~~~~
      |     printf
Language: C

#include<stdio.h>

int main(void){

	int n[4],i;

	for(i=0;i<=3;i++){
		scanf("%d",&n[i]);
	}

	if((n[0])==1||4||7||9)&&(n[1]==1||4||7||9)&&(n[2]==1||4||7||9)&&(n[3]==1||4||7||9)){
	
		printf("YES\n");
	}
	else{
	
		printf("NO\n");
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:33: error: expected identifier before '(' token
   11 |         if((n[0])==1||4||7||9)&&(n[1]==1||4||7||9)&&(n[2]==1||4||7||9)&&(n[3]==1||4||7||9)){
      |                                 ^
main.c:11:91: error: expected statement before ')' token
   11 |         if((n[0])==1||4||7||9)&&(n[1]==1||4||7||9)&&(n[2]==1||4||7||9)&&(n[3]==1||4||7||9)){
      |                                                                                           ^
main.c:15:9: error: 'else' without a previous 'if'
   15 |         else{
      |         ^~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
	int f=1,n=4,a[5],b[]={1,4,7,9};
	for(int i=0;i<n;i++){
		cin>>a[i];
	} 
	sort(a,a+n);
	for(int i=0;i<n;i++){
		if(a[i]!=b[i]){
			f=0;break;
		}
	}
	if(f==1)cout<<"YES\n";
	else cout<<"NO\n"; 
	return 0;
}

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

#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <array>
#include <algorithm>
#include <string>
#include <numeric>
using namespace std;

int main()
{
    string S;
    cin.getline(S, 100, '\n');

    int k=7, check=0;
    bool befor = true;
    bool now = true;
    string keyence("ecneyek");

    for(int i=0; i<S.size(); i++)
    {
        cout<<i<<"..."<<k<<endl;
        //比較部
        if(S[i]==keyence[keyence.size()-1])
        {
            now = true;
            keyence.pop_back();
            k--;
        }
        else
        {
            now = false;
        }

        if(befor != now)
        {
            cout<<check<<endl;
            check ++;
        }

        if(check == 2)
        {
            cout<<"NO"<<endl;
            return 0;
        }
        if(k == 0)
        {
            cout<<"YES"<<endl;
            return 0;
        }

        befor = now;
    }

    cout<<"NO"<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: no matching function for call to 'std::basic_istream<char>::getline(std::string&, int, char)'
   14 |     cin.getline(S, 100, '\n');
      |     ~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/iostream:42,
                 from a.cc:3:
/usr/include/c++/14/istream:740:5: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::getline(char_type*, std::streamsize, char_type) [with _CharT = char; _Traits = std::char_traits<char>; char_type = char; std::streamsize = long int]'
  740 |     basic_istream<char>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:509:26: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::basic_istream<char>::char_type*' {aka 'char*'}
  509 |       getline(char_type* __s, streamsize __n, char_type __delim);
      |               ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:520:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::getline(char_type*, std::streamsize) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; char_type = char; std::streamsize = long int]'
  520 |       getline(char_type* __s, streamsize __n)
      |       ^~~~~~~
/usr/include/c++/14/istream:520:7: note:   candidate expects 2 arguments, 3 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
vector<int> v= {1,4,7,9};
cin>>n1>>n2>>n3>>n4;
if(n1!=n2 && n1!=n3 && n1!=n4 )
{
if(n2!=n3 && n2!=n4)
{
if(n3!=n4)
{
if(count(v.begin(),v.end(),n1) && count(v.begin(),v.end(),n2) && count(v.begin(),v.end(),n3) && count(v.begin(),v.end(),n4))
cout<<"YES";
else
cout<<"NO";
}
else
cout<<"NO";
}
else
cout<<"NO";
}
else
cout<<"NO";
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: 'n1' was not declared in this scope; did you mean 'y1'?
    6 | cin>>n1>>n2>>n3>>n4;
      |      ^~
      |      y1
a.cc:6:10: error: 'n2' was not declared in this scope
    6 | cin>>n1>>n2>>n3>>n4;
      |          ^~
a.cc:6:14: error: 'n3' was not declared in this scope
    6 | cin>>n1>>n2>>n3>>n4;
      |              ^~
a.cc:6:18: error: 'n4' was not declared in this scope
    6 | cin>>n1>>n2>>n3>>n4;
      |                  ^~