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

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

int main(void)
{
    int i=0,j=0;
    string s,a("keyence");
    cin>>s;
    s.push_back('\n')

    while(i==7||s[j]=='\n'){
        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:10:22: error: expected ';' before 'while'
   10 |     s.push_back('\n')
      |                      ^
      |                      ;
   11 | 
   12 |     while(i==7||s[j]=='\n'){
      |     ~~~~~
Language: C++

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

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


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

}

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

#include <bits/stdc++.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&&a[2]==4){
    if(a[3]==7&&a[4]==9)cout<<"YES"<<endl;
    else cout<<"NO<<endl;
    }
  else cout<<"NO"<<endl;
  return 0;
}


Compiler output:
a.cc:10:16: warning: missing terminating " character
   10 |     else cout<<"NO<<endl;
      |                ^
a.cc:10:16: error: missing terminating " character
   10 |     else cout<<"NO<<endl;
      |                ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:11:5: error: expected primary-expression before '}' token
   11 |     }
      |     ^
Language: C++

#include <iostream>

using namespace std;

int main(){
    int n[4];
    cin >> n[0] >> n[1] >> n[2] >> n[3];
    sort(n, n + 4);
    if (n[0] == 1 && n[1] == 4 && n[2] == 7 && n[3] == 9) cout << "YES" << endl;
    else cout << "NO" << endl;
    return 0;
}

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

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
    6 |     char *k="keyence";
      |             ^~~~~~~~~
a.cc:9:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     while(*k=="\0"){
      |           ~~^~~~~~
Language: C++

#include<iostream>
using namespace std;

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


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

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: cannot convert 'const char*' to 'char**' in initialization
    6 |     char **k="keyence";
      |              ^~~~~~~~~
      |              |
      |              const char*
a.cc:9:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     for(int i=0;**k=="\0";i++){
      |                 ~~~^~~~~~
a.cc:12:23: error: expected '}' at end of input
   12 |     cout<<"YES"<<endl;
      |                       ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<iostream>
using namespace std;

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


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

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

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

        Scanner sc =   new Scanner(System.in);
        int[] = N ;
        N = new int [4];
         N[0] = sc nextInt();
         N[1] = sc nextInt();
         N[2] = sc nextInt();
         N[3] = sc nextInt();

        Arrays.sort(N[]);

        if(N[0]==1){
            if(N[1]==4){
                if(N[2]==7){
                    if(N[3]==9){
                        System.out.println("YES");
                    }
                }
            }
        }else{
            System.out.println("NO");
            }


    }


Compiler output:
Main.java:8: error: not a statement
        int[] = N ;
           ^
Main.java:8: error: ';' expected
        int[] = N ;
             ^
Main.java:8: error: not a statement
        int[] = N ;
                ^
Main.java:10: error: ';' expected
         N[0] = sc nextInt();
                  ^
Main.java:11: error: ';' expected
         N[1] = sc nextInt();
                  ^
Main.java:12: error: ';' expected
         N[2] = sc nextInt();
                  ^
Main.java:13: error: ';' expected
         N[3] = sc nextInt();
                  ^
Main.java:15: error: '.class' expected
        Arrays.sort(N[]);
                       ^
Main.java:30: error: reached end of file while parsing
    }
     ^
9 errors
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int a,b,c,d;
  cin>>a>>b>>c>>d;
  int e=a*1000+b*100+c*10+d
  if(e==1479 or e==1497 or e==1749 or e==1794 or e==1947 or e==1974 or e==4179 or e==4197 or e==4719 or e==4791 or e==4917 or e==4971 or e==7149 or e==7194 or e==7419 or e==7491 or e==7914 or e==7941 or e==9147 or e==9174 or e==9417 or e==9471 or e==9714 or e==9741 )
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'if'
    8 |   if(e==1479 or e==1497 or e==1749 or e==1794 or e==1947 or e==1974 or e==4179 or e==4197 or e==4719 or e==4791 or e==4917 or e==4971 or e==7149 or e==7194 or e==7419 or e==7491 or e==7914 or e==7941 or e==9147 or e==9174 or e==9417 or e==9471 or e==9714 or e==9741 )
      |   ^~
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else
      |   ^~~~
Language: C

#include<stdio.h>

int main(){
    int a,b,c,d;
    scanf_s("%d %d %d %d",&a,&b,&c,&d);
    int i,count=0;

    int box[4];
    box[0]=a;
    box[1]=b;
    box[2]=c;
    box[3]=d;
    
    for(i=0;i<4;i++){
        if(box[i]==1){
            count++;
        }else if(box[i]==7){
            count++;
        }else if(box[i]==9){
            count++;
        }else if(box[i]==4){
            count++;
        }
    }

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

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:5: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |     scanf_s("%d %d %d %d",&a,&b,&c,&d);
      |     ^~~~~~~
      |     scanf
Language: Java

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

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

        Scanner sc =   new Scanner(System.in);
        int[] = N[4];
         N[0] = sc nextInt();
         N[1] = sc nextInt();
         N[2] = sc nextInt();
         N[3] = sc nextInt();

        Arrays.sort(N[]);

        if(N[0]==1){
            if(N[1]==4){
                if(N[2]==7){
                    if(N[3]==9){
                        System.println("YES");
                    }
                }
            }
        }else{
            System.println("NO");
            }


    }

}

Compiler output:
Main.java:8: error: not a statement
        int[] = N[4];
           ^
Main.java:8: error: ';' expected
        int[] = N[4];
             ^
Main.java:8: error: not a statement
        int[] = N[4];
                 ^
Main.java:9: error: ';' expected
         N[0] = sc nextInt();
                  ^
Main.java:10: error: ';' expected
         N[1] = sc nextInt();
                  ^
Main.java:11: error: ';' expected
         N[2] = sc nextInt();
                  ^
Main.java:12: error: ';' expected
         N[3] = sc nextInt();
                  ^
Main.java:14: error: '.class' expected
        Arrays.sort(N[]);
                       ^
8 errors
Language: Java

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

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

        Scanner sc =   new Scanner(System.in);
        int[] = N[4]
         N[0] = sc nextInt();
         N[1] = sc nextInt();
         N[2] = sc nextInt();
         N[3] = sc nextInt();

        Arrays.sort(N[]);

        if(N[0]==1){
            if(N[1]==4){
                if(N[2]==7){
                    if(N[3]==9){
                        System.println("YES");
                    }
                }
            }
        }else{
            System.println("NO");
            }


    }

}

Compiler output:
Main.java:8: error: not a statement
        int[] = N[4]
           ^
Main.java:8: error: ';' expected
        int[] = N[4]
             ^
Main.java:8: error: not a statement
        int[] = N[4]
                 ^
Main.java:8: error: ';' expected
        int[] = N[4]
                    ^
Main.java:9: error: ';' expected
         N[0] = sc nextInt();
                  ^
Main.java:10: error: ';' expected
         N[1] = sc nextInt();
                  ^
Main.java:11: error: ';' expected
         N[2] = sc nextInt();
                  ^
Main.java:12: error: ';' expected
         N[3] = sc nextInt();
                  ^
Main.java:14: error: '.class' expected
        Arrays.sort(N[]);
                       ^
9 errors
Language: C++

public class Main {
    public static void main (String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

        //int[] _1974 = {1, 9, 7, 4};
        String[] inList = new String[4];
        inList[0] = in.readLine();
        inList[1] = in.readLine();
        inList[2] = in.readLine();
        inList[3] = in.readLine();

        if(Arrays.asList(inList).contains("1") &&
                Arrays.asList(inList).contains("9") &&
                Arrays.asList(inList).contains("7") &&
                Arrays.asList(inList).contains("4")) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'public'
    1 | public class Main {
      | ^~~~~~
Language: C++

#include <stdio.h>

int main(){
int n[4];
int i;
scanf("%d%d%d%d",&n[0],&n[1],&n[2],&n[3]);

for(i=0;i<4;i++){
 if(n[i] == 1) break;
}
if(i>=4){printf("NO\n"); return;}

for(i=0;i<4;i++){
 if(n[i] == 9) break;
}
if(i>=4){printf("NO\n"); return;}

for(i=0;i<4;i++){
 if(n[i] == 4) break;
}
if(i>=4){printf("NO\n"); return;}

for(i=0;i<4;i++){
 if(n[i] == 3) break;
}
if(i>=4){printf("NO\n"); return;}

printf("YES\n");
return;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: return-statement with no value, in function returning 'int' [-fpermissive]
   11 | if(i>=4){printf("NO\n"); return;}
      |                          ^~~~~~
a.cc:16:26: error: return-statement with no value, in function returning 'int' [-fpermissive]
   16 | if(i>=4){printf("NO\n"); return;}
      |                          ^~~~~~
a.cc:21:26: error: return-statement with no value, in function returning 'int' [-fpermissive]
   21 | if(i>=4){printf("NO\n"); return;}
      |                          ^~~~~~
a.cc:26:26: error: return-statement with no value, in function returning 'int' [-fpermissive]
   26 | if(i>=4){printf("NO\n"); return;}
      |                          ^~~~~~
a.cc:29:1: error: return-statement with no value, in function returning 'int' [-fpermissive]
   29 | return;
      | ^~~~~~
Language: C++

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

int main(void)
{
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    cout<<ch(a,b,c,d)<<endl;
    return 0;
} 

string ch(int a,int b,int c,int d)
{
    if(a!=1||b!=1||c!=1||d!=1) return "NO" ; 
    if(a!=9||b!=9||c!=9||d!=9) return "NO";
    if(a!=7||b!=7||c!=7||d!=7)return "NO";
    if(a!=4||b!=4||c!=4||d!=4) return "NO";
    return "YES";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'ch' was not declared in this scope; did you mean 'c'?
    9 |     cout<<ch(a,b,c,d)<<endl;
      |           ^~
      |           c
Language: C++

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

using namespace std;

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


int main() {
	int iNum[4] = { 0 };
	int total = 0;

	for (int j = 0; j < 4; j++) {
		scanf_s("%d", &iNum[j]);

		if(0 <= iNum[j] && iNum[j] <= 9){
			for (int i = 0; i < 4; i++) {
				if (iNum[j] == NUM[i]) {
					total++;
				}
			}
		}
		else {
			printf("NO\n");
			return 0;
		}

	}

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

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   15 |                 scanf_s("%d", &iNum[j]);
      |                 ^~~~~~~
      |                 scanf
Language: C++

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<stdio.h>
      | ^~~~~~~
Language: C++

#include<iostream>

using namespace std;

int main(void)
{
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    cout<<ch(a,b,c,d)<<endl;
    return 0;
} 

char ch(int a,int b,int c,int d)
{
    if(a!=1||b!=1||c!=1||d!=1) return "NO" ; 
    if(a!=9||b!=9||c!=9||d!=9) return "NO";
    if(a!=7||b!=7||c!=7||d!=7)return "NO";
    if(a!=4||b!=4||c!=4||d!=4) return "NO";
    return "YES";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'ch' was not declared in this scope; did you mean 'c'?
    9 |     cout<<ch(a,b,c,d)<<endl;
      |           ^~
      |           c
a.cc: In function 'char ch(int, int, int, int)':
a.cc:15:39: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   15 |     if(a!=1||b!=1||c!=1||d!=1) return "NO" ;
      |                                       ^~~~
      |                                       |
      |                                       const char*
a.cc:16:39: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   16 |     if(a!=9||b!=9||c!=9||d!=9) return "NO";
      |                                       ^~~~
      |                                       |
      |                                       const char*
a.cc:17:38: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   17 |     if(a!=7||b!=7||c!=7||d!=7)return "NO";
      |                                      ^~~~
      |                                      |
      |                                      const char*
a.cc:18:39: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   18 |     if(a!=4||b!=4||c!=4||d!=4) return "NO";
      |                                       ^~~~
      |                                       |
      |                                       const char*
a.cc:19:12: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   19 |     return "YES";
      |            ^~~~~
      |            |
      |            const char*
Language: C++

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

namespace A_Beggining
{
    class Program
    {
        static void Main(string[] args)
        {
            string []N = Console.ReadLine().Split(' ');

            string str = N[0] + N[1] + N[2] + N[3];
            if(str.Contains("1")
                &&str.Contains("4")
                &&str.Contains("7")
                && str.Contains("9"))
            {
                Console.Write("YES");
            }
            else
            {
                Console.Write("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:28:6: error: expected ';' after class definition
   28 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void A_Beggining::Program::Main(int*)':
a.cc:13:13: error: 'string' was not declared in this scope
   13 |             string []N = Console.ReadLine().Split(' ');
      |             ^~~~~~
a.cc:13:21: error: expected primary-expression before ']' token
   13 |             string []N = Console.ReadLine().Split(' ');
      |                     ^
a.cc:15:20: error: expected ';' before 'str'
   15 |             string str = N[0] + N[1] + N[2] + N[3];
      |                    ^~~
a.cc:16:16: error: 'str' was not declared in this scope; did you mean 'std'?
   16 |             if(str.Contains("1")
      |                ^~~
      |                std
a.cc:21:17: error: 'Console' was not declared in this scope
   21 |                 Console.Write("YES");
      |                 ^~~~~~~
a.cc:25:17: error: 'Console' was not declared in this scope
   25 |                 Console.Write("NO");
      |                 ^~~~~~~
Language: C++

#include<iostream>

using namespace std;

int main(void)
{
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    cout<<ch(a,b,c,d)<<endl;
    return 0;
} 

char ch(int a,int b,int c,int d)
{
    if(a!=1||b!=1||c!=1||d!=1) return "NO" ; 
    if(a!=9||b!=9||c!=9||d!=9) return "NO";
    if(a!=7||b!=7||c!=7||d!=7)retrun "NO";
    if(a!=4||b!=4||c!=4||d!=4) return "NO";
    retrun "YES";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'ch' was not declared in this scope; did you mean 'c'?
    9 |     cout<<ch(a,b,c,d)<<endl;
      |           ^~
      |           c
a.cc: In function 'char ch(int, int, int, int)':
a.cc:15:39: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   15 |     if(a!=1||b!=1||c!=1||d!=1) return "NO" ;
      |                                       ^~~~
      |                                       |
      |                                       const char*
a.cc:16:39: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   16 |     if(a!=9||b!=9||c!=9||d!=9) return "NO";
      |                                       ^~~~
      |                                       |
      |                                       const char*
a.cc:17:31: error: 'retrun' was not declared in this scope
   17 |     if(a!=7||b!=7||c!=7||d!=7)retrun "NO";
      |                               ^~~~~~
a.cc:18:39: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   18 |     if(a!=4||b!=4||c!=4||d!=4) return "NO";
      |                                       ^~~~
      |                                       |
      |                                       const char*
a.cc:19:5: error: 'retrun' was not declared in this scope
   19 |     retrun "YES";
      |     ^~~~~~
a.cc:20:1: warning: control reaches end of non-void function [-Wreturn-type]
   20 | }
      | ^
Language: C++

#include <iostream>

using namespace std;

int main(void){
    int n[4]={0};

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

    sort(n,n+4);

    if(n[0]==1&&n[1]==4&&n[2]==7&&n[3]==9)cout << "YES" << endl;
    else cout << "NO" << endl; 

    return 0;
}

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

#include <stdio.h>

int main() {
	int num[4],x;
	int i,j;
	
	for(i = 0; i<4; ++i)
		scanf_s("%d", &num[i]);

	
	for (i = 0; i < 4;i++) {
		for (j = i + 1; j < 4; j++) {
			if (num[i] > num[j]) {
				x = num[i];
				num[i] = num[j];
				num[j] = x;
			}
		}
	}
	if (num[0] = 1) {
		if (num[1] = 4) {
			if (num[2] = 7) {
				if (num[3] = 9) {
					printf("YES");
				}
			}
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    8 |                 scanf_s("%d", &num[i]);
      |                 ^~~~~~~
      |                 scanf
Language: Java

import java.util.Scanner;
public class Mai{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Boolean f1=false,f2=false,f3=false,f4=false;


		for(int i=0;i<4;i++) {
			int n = sc.nextInt();
			if(n==1)f1=true;
			else if (n==9)f2=true;
			else if(n==7)f3=true;
			else if(n==4)f4=true;

		}
		if(f1&&f2&&f3&&f4)System.out.print("Yes");
		else System.out.print("No");

	}
}

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

#include <stdio.h>
int main() {

     int N[4], M[4];
     int i;

     for(i = 0; i < 4; ++i) {
          scanf("%d", &N[i]);
          M[i] = 0;
     }

     for(i = 0; i < 4; ++i) {
          if(N[i] == 1) {
             M[0] = 1;
          }
          else if(N[i] == 9) {
             M[1] = 9;
          }
          else if(N[i] == 7) {
             M[2] = 7;
          }
          else if(N[i] == 4) {
             M[3] = 4;
          }
     }

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

     return 0;
}


Compiler output:
main.c: In function 'main':
main.c:27:40: error: lvalue required as left operand of assignment
   27 |      if(M[0] == 1 && M[1] == 9 && M[2] = 7 && M[3] == 4) {
      |                                        ^
Language: C

#include <stdio.h>
int main() {

     int N[4], M[4];
     int i;

     for(i = 0; i < 4; ++i) {
          scanf("%d", &N[I]);
          M[i] = 0;
     }

     for(i = 0; i < 4; ++i) {
          if(N[i] == 1) {
             M[0] = 1;
          }
          else if(N[i] == 9) {
             M[1] = 9;
          }
          else if(N[i] == 7) {
             M[2] = 7;
          }
          else if(N[i] == 4) {
             M[3] = 4;
          }
     }

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

     return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:26: error: 'I' undeclared (first use in this function)
    8 |           scanf("%d", &N[I]);
      |                          ^
main.c:8:26: note: each undeclared identifier is reported only once for each function it appears in
main.c:27:40: error: lvalue required as left operand of assignment
   27 |      if(M[0] == 1 && M[1] == 9 && M[2] = 7 && M[3] == 4) {
      |                                        ^
Language: C++

#include<iostream>

using namespace std;

int main(void)
{
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    if(a==1||b==1||c==1||d==1) 
    if(a==9||b==9||c==9||d==9)
    if(a==7||b==7||c==7||d==7)
    if(a==4||b==4||c==4||d==4) {cout<<YES<<endl;}
    else cout<<NO<<endl;
    return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:12:39: error: 'YES' was not declared in this scope
   12 |     if(a==4||b==4||c==4||d==4) {cout<<YES<<endl;}
      |                                       ^~~
a.cc:13:16: error: 'NO' was not declared in this scope
   13 |     else cout<<NO<<endl;
      |                ^~
Language: C++

a=list(map(int,input().split()))
b=[1,4,7,9]
cnta=0
cntb=0
cntc=0
cntd=0

for i in range(4):
  if a[i]==1:
    cnta+=1
  if a[i]==4:
    cntb=1
  if a[i]==7:
    cntc+=1
  if a[i]==9:
    cntd+=1

if cnta==1 and cntb==1 and cntc==1 and cntd==1:
  print("YES")
else:
  print("NO")

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

#include<iostream.h>

using namespace std;

int main(void)
{
    int a,b,c,d;
    cin<<a<<b<<c<<d;
    if(a==1||b==1||c==1||d==1) 
    if(a==9||b==9||c==9||d==9)
    if(a==7||b==7||c==7||d==7)
    if(a==4||b==4||c==4||d==4) {cout<<YES<<endl;}
    else cout<<NO<<endl;
    return 0;
} 

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

#include <iostream>
using namespace std;

int main(){
    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" <<endl;
    else cout << "NO" <<endl;
    return 0;
}

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

#include <iostream>
using namespace std;

int main(){
    int s[4];
    cin >> s[0] >> s[1] >> s[2] >> s[3];

    int cnt1=0;
    int cnt2=0;
    int cnt3=0, 
    int cnt4=0;

    for(int i = 0; i < 4; i++) {
        if(s[i] == 1) {
            cnt1++;
        } else if (s[i] == 9) {
            cnt2++;
        } else if (s[i] == 7) {
            cnt3++;
        } else if (s[i] == 4) {
            cnt4++;
        }
    }

    if(cnt1 == 1 && cnt2 == 1 && cnt3 == 1 && cnt4 == 1) {
        cout <<  "YES" << endl;
    } else {
        cout << "NO" << endl;
    }

}   

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: expected unqualified-id before 'int'
   11 |     int cnt4=0;
      |     ^~~
a.cc:21:13: error: 'cnt4' was not declared in this scope; did you mean 'cnt3'?
   21 |             cnt4++;
      |             ^~~~
      |             cnt3
a.cc:25:47: error: 'cnt4' was not declared in this scope; did you mean 'cnt3'?
   25 |     if(cnt1 == 1 && cnt2 == 1 && cnt3 == 1 && cnt4 == 1) {
      |                                               ^~~~
      |                                               cnt3
Language: Java

import java.util.Scanner;

public class A {
	public static void main(String args[]) {
		Scanner scn = new Scanner(System.in);
		boolean[] n = new boolean[4];
		for (int i = 0; i < 4; i++) {
			int a = scn.nextInt();
			switch (a) {
			case 1:
				n[0] = true;
				break;
			case 9:
				n[1] = true;
				break;
			case 7:
				n[2] = true;
				break;
			case 4:
				n[3] = true;
				break;
			default:
				break;
			}
		}
		boolean ans = true;
		for(int i = 0;i < 4;i++) {
			ans &= n[i];
		}
		System.out.println(ans?"YES":"NO");
	}
}


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

#include <stdio.h>  
#include <algorithm>  
#include <assert.h>
#include <bitset>
#include <cmath>  
#include <complex>  
#include <deque>  
#include <functional>  
#include <iostream>  
#include <limits.h>  
#include <map>  
#include <math.h>  
#include <queue>  
#include <set>  
#include <stdlib.h>  
#include <string.h>  
#include <string>  
#include <time.h>  
#include <unordered_map>  
#include <unordered_set>  
#include <vector>  
#define ll long long
#define rep2(i,a,b) for(ll i=a;i<=b;++i)
#define rep(i,n) for(int i=0;i<n;i++)
#define rep3(i,a,b) for(int i=a;i>=b;i--)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define tii tuple<int,int,int>
#define pq priority_queue<int>
#define pqg priority_queue<int,vector<int>,greater<int>>
#define pb push_back
#define edge(v,a,b) v[a].pb(b);v[b].pb(a);
#define MAX_V 400010
#define vec vector<int>
#define vecll vector<ll>
#define vecpii vector<pii>
#define endl "\n"
#define ALL(c) (c).begin(),(c).end()
using namespace std;
int in() {int x;scanf("%d",&x);return x;}
ll lin() {ll x;scanf("%lld",&x);return x;}
template<typename A, size_t NNN, typename T>
void Fill(A (&array)[NNN], const T &val){
    fill( (T*)array, (T*)(array+NNN), val );
}
#define INF 1e9+7
#define LLINF 1e18+7
ll MOD=1e9+7;
#define N 205050

ll n;
ll p;
ll a[N];
ll c[4]={1,9,7,4};
main(){
    rep(i,4)a[i]=in();
    bool flag=true;
    rep(i,4){
        bool f=false;
        rep(j,4){
            if(c[i]==a[j]){
                f=true;
            }
        }
        if(!f)flag=false;
    }
    cout<<(flag"YES":"NO");
}

Compiler output:
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:67:16: error: expected ')' before string constant
   67 |     cout<<(flag"YES":"NO");
      |           ~    ^~~~~
      |                )
Language: C++

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

int main()
{
  vector<int> a(4);
  cin >> a[0] >> a[1] >> a[2] >> a[3];
  sort(begin(a), end(a));
  cout << (a[0] == 1 && a[1] == 4 && a[2] == 7 && a[3] == 9 ? "YES" : "NO") << endl;
}


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

#include<bits/stdc++.h>
using namepsace std;
int main(){
	int a[4];
  for(int i=0;i<4;i++){
  	cin >> a[i];
    if(a[i]!=1 || a[i]!=9 || a[i]!=7 || a[i]!=4){
    	cout << "NO";
      return 0;
    }
  }
  cout << "YES" ;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namepsace'
    2 | using namepsace 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[i];
      |         ^~~
      |         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:8:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         cout << "NO";
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |   cout << "YES" ;
      |   ^~~~
      |   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 <stdio.h>

void main(){
int n[4];
int i;
scanf("%d%d%d%d",&n[0],&n[1],&n[2],&n[3])

for(i=0;i<4;i++){
 if(n[i] == 1) break;
}
if(i>=4){printf("NO\n"); return;}

for(i=0;i<4;i++){
 if(n[i] == 9) break;
}
if(i>=4){printf("NO\n"); return;}

for(i=0;i<4;i++){
 if(n[i] == 4) break;
}
if(i>=4){printf("NO\n"); return;}

for(i=0;i<4;i++){
 if(n[i] == 3) break;
}
if(i>=4){printf("NO\n"); return;}

printf("YES\n");
return;

}


Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:42: error: expected ';' before 'for'
    6 | scanf("%d%d%d%d",&n[0],&n[1],&n[2],&n[3])
      |                                          ^
      |                                          ;
    7 | 
    8 | for(i=0;i<4;i++){
      | ~~~                                       
a.cc:8:16: error: expected ';' before ')' token
    8 | for(i=0;i<4;i++){
      |                ^
      |                ;
a.cc:11:26: error: return-statement with no value, in function returning 'int' [-fpermissive]
   11 | if(i>=4){printf("NO\n"); return;}
      |                          ^~~~~~
a.cc:16:26: error: return-statement with no value, in function returning 'int' [-fpermissive]
   16 | if(i>=4){printf("NO\n"); return;}
      |                          ^~~~~~
a.cc:21:26: error: return-statement with no value, in function returning 'int' [-fpermissive]
   21 | if(i>=4){printf("NO\n"); return;}
      |                          ^~~~~~
a.cc:26:26: error: return-statement with no value, in function returning 'int' [-fpermissive]
   26 | if(i>=4){printf("NO\n"); return;}
      |                          ^~~~~~
a.cc:29:1: error: return-statement with no value, in function returning 'int' [-fpermissive]
   29 | return;
      | ^~~~~~
Language: C++

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

#define rep(i,n) for(signed i=0;i<n;++i)
#define int long long
#define str string
#define debg(a) cout<<#a<<":"<<a<<endl;
#define print(a) cout<<a<<endl;
#define end cout<<endl;
#define elif else if

int a,b,c,i,j,k,n,m,x,y,z;
str s,t;
vector<signed> v;

signed main(){
  int a[4];
  rep(i,4)cin>>a[i];
  sort(a,a+4);
  if(a[0]==1&&a[1]==4&&a[2]==7&&a[3]==9){
    cout<<"YES"<<endl;
    return 0;
  }
  cout<<"NO"<<endl;
  return 0;
}
  return 0;
}


Compiler output:
a.cc:27:3: error: expected unqualified-id before 'return'
   27 |   return 0;
      |   ^~~~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<map>
#include<iomanip>
#define int long long
#define ll getchar();getchar();return 0;
using namespace std;
bool prime(int n) {
	int cnt = 0;
	for (int i = 1; i <= sqrt(n); i++) {
		if (n%i == 0)cnt++;
	}
	if (cnt != 1)return false;
	else return n != 1;
}
int gcd(int x, int y) {
	int ans;
	for (int i = (min(x, y)); i >= 1; i--) {
		if (x%i == 0 && y%i == 0) {
			ans = i;
			break;
		}
	}
	return ans;
}
int yakusuunowa(int n) {
	int ans = 0;
	for (int i = 1; i <= n; i++) {
		if (n%i == 0)ans += i;
	}
	return ans;
}
int lcm(int x, int y) {
	return x * y / gcd(x, y);
}
int ketanowa(int n) {
	int cnt = 0, sum = 0;
	for (int i = 10; i <= n * 10; i *= 10) {
		if (i == 10)cnt += n % i;
		else sum += (n%i - n % (i / 10)) / (i / 10);
	}
	return cnt + sum;
}
signed main() {
	int cnta = 0, cntb = 0, cntc = 0, cntd = 0;
	int a[3];
	for (int i = 0; i < 4; i++)cin >> a[i];
	for (int i = 0; i < 4; i++) {
		if (s[i] == '1')cnta++;
		else if (s[i] == '9')cntb++;
		else if (s[i] == '7')cntc++;
		else if (s[i] == '4')cntd++;
	}
	if (cnta == 1 && cntb == 1 && cntc == 1 && cntd == 1)puts("YES");
	else puts("NO");
	ll
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:21: error: 's' was not declared in this scope
   52 |                 if (s[i] == '1')cnta++;
      |                     ^
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<map>
#include<iomanip>
#define int long long
#define ll getchar();getchar();return 0;
using namespace std;
bool prime(int n) {
	int cnt = 0;
	for (int i = 1; i <= sqrt(n); i++) {
		if (n%i == 0)cnt++;
	}
	if (cnt != 1)return false;
	else return n != 1;
}
int gcd(int x, int y) {
	int ans;
	for (int i = (min(x, y)); i >= 1; i--) {
		if (x%i == 0 && y%i == 0) {
			ans = i;
			break;
		}
	}
	return ans;
}
int yakusuunowa(int n) {
	int ans = 0;
	for (int i = 1; i <= n; i++) {
		if (n%i == 0)ans += i;
	}
	return ans;
}
int lcm(int x, int y) {
	return x * y / gcd(x, y);
}
int ketanowa(int n) {
	int cnt = 0, sum = 0;
	for (int i = 10; i <= n * 10; i *= 10) {
		if (i == 10)cnt += n % i;
		else sum += (n%i - n % (i / 10)) / (i / 10);
	}
	return cnt + sum;
}
signed main() {
	int cnta = 0, cntb = 0, cntc = 0, cntd = 0;
	int a[3];
	for (int i = 0; i < 4; i++)cin >> a[i];
	for (int i = 0; i < 4; i++) {
		if (s[i] == '1')cnta++;
		else if (s[i] == '9')cntb++;
		else if (s[i] == '7')cntc++;
		else if (s[i] == '4')cntd++;
	}
	if (cnta == 1 && cntb == 1 && cntc == 1 && cntd == 1)puts("Yes");
	else puts("No");
	ll
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:21: error: 's' was not declared in this scope
   52 |                 if (s[i] == '1')cnta++;
      |                     ^
Language: C++

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

bool a = false,b= false,c= false,d=false;
int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
REP(i,4){
	int N
	cin >> N;
	if(N ==1){
		a = true;
	}else if(N==9){
		b = true;
	}else if(N == 4){
		c= true;
	}else if(N == 7){
		d = true;
	}
}

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: expected initializer before 'cin'
   12 |         cin >> N;
      |         ^~~
a.cc:13:12: error: 'N' was not declared in this scope
   13 |         if(N ==1){
      |            ^
Language: C++

int main(){
    int n,cnt[10]={};
    for(int i=0;i<4;i++){
        scanf("%d",&n);
        cnt[n]++;
    }
    if(cnt[1]==1&&cnt[9]==1&&cnt[7]==1&&cnt[4]==1)printf("YES");
    else printf("NO");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'scanf' was not declared in this scope
    4 |         scanf("%d",&n);
      |         ^~~~~
a.cc:7:51: error: 'printf' was not declared in this scope
    7 |     if(cnt[1]==1&&cnt[9]==1&&cnt[7]==1&&cnt[4]==1)printf("YES");
      |                                                   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:8:10: error: 'printf' was not declared in this scope
    8 |     else printf("NO");
      |          ^~~~~~
a.cc:8:10: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: Java

import java.util.Arrays;
import java.util.Scanner;

public class AssignA {
    /**
     * @param args
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int[] N = new int[4];
        N[0] = sc.nextInt();
        N[1] = sc.nextInt();
        N[2] = sc.nextInt();
        N[3] = sc.nextInt();

        boolean ans = solve(N);

        System.out.println(ans ? "YES" : "NO");
    }

    private static boolean solve(int[] N) {
        Arrays.sort(N);

        if (N[0] == 1 && N[1] == 4 && N[2] == 7 && N[3] == 9) {
            return true;
        }

        return false;
    }

}


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

import sys

sys.setrecursionlimit(200000)


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


N = il(str)
for n in N:
    if n not in ["1", "9", "7", "4"]:
        print('NO')
        exit()
print('YES')


Compiler output:
a.cc:29:15: warning: multi-character character constant [-Wmultichar]
   29 |         print('NO')
      |               ^~~~
a.cc:31:7: warning: multi-character character constant [-Wmultichar]
   31 | print('YES')
      |       ^~~~~
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;

#define rep(i,n) for(signed i=0;i<n;++i)
#define int long long
#define str string
#define debg(a) cout<<#a<<":"<<a<<endl;
#define print(a) cout<<a<<endl;
#define end cout<<endl;
#define elif else if

int a,b,c,i,j,k,n,m,x,y,z;
str s,t;
vector<signed> v;

signed main(){
  int a[4];
  rep(i,4)cin>>a[i];
  sort(a,a+4);
  if(a[0]==1&&a[2]==4&&a[2]==7&&a[3]==9){
    cout<<"YES"<<endl;
    return 0;
  }
  cout<<"NO"<<endl;
  return 0;
}
  return 0;
}

Compiler output:
a.cc:27:3: error: expected unqualified-id before 'return'
   27 |   return 0;
      |   ^~~~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<map>
#include<iomanip>
#define int long long
#define ll getchar();getchar();return 0;
using namespace std;
bool prime(int n) {
	int cnt = 0;
	for (int i = 1; i <= sqrt(n); i++) {
		if (n%i == 0)cnt++;
	}
	if (cnt != 1)return false;
	else return n != 1;
}
int gcd(int x, int y) {
	int ans;
	for (int i = (min(x, y)); i >= 1; i--) {
		if (x%i == 0 && y%i == 0) {
			ans = i;
			break;
		}
	}
	return ans;
}
int yakusuunowa(int n) {
	int ans = 0;
	for (int i = 1; i <= n; i++) {
		if (n%i == 0)ans += i;
	}
	return ans;
}
int lcm(int x, int y) {
	return x * y / gcd(x, y);
}
int ketanowa(int n) {
	int cnt = 0, sum = 0;
	for (int i = 10; i <= n * 10; i *= 10) {
		if (i == 10)cnt += n % i;
		else sum += (n%i - n % (i / 10)) / (i / 10);
	}
	return cnt + sum;
}
signed main() {
	int cnta = 0, cntb = 0, cntc = 0, cntd = 0;
	int s[3];
	for (int i = 0; i < 4; i++)cin >> a[i];
	for (int i = 0; i < 4; i++) {
		if (s[i] == '1')cnta++;
		else if (s[i] == '9')cntb++;
		else if (s[i] == '7')cntc++;
		else if (s[i] == '4')cntd++;
	}
	if (cnta == 1 && cntb == 1 && cntc == 1 && cntd == 1)puts("YES");
	else puts("NO");
	ll
}

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

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

int main() {
	char a, b, c, d;
	cin >> a >> b >> c >> d;
	string s = a+b+c+d;
	sort(s.begin(), s.end());

	if ( s[0] == '1' && s[1] == '4' && s[2] == '7' && s[3] == '9' ) cout << "YES" << endl;
	else cout << "NO" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    7 |         string s = a+b+c+d;
      |                    ~~~~~^~
Language: C++

n = list(map(int, input().split()))

#print(n)

n.sort()

#print(n)

if n == [1, 4, 7, 9]:
    print('YES')

else:
    print('NO')


Compiler output:
a.cc:3:2: error: invalid preprocessing directive #print
    3 | #print(n)
      |  ^~~~~
a.cc:7:2: error: invalid preprocessing directive #print
    7 | #print(n)
      |  ^~~~~
a.cc:10:11: warning: multi-character character constant [-Wmultichar]
   10 |     print('YES')
      |           ^~~~~
a.cc:13:11: warning: multi-character character constant [-Wmultichar]
   13 |     print('NO')
      |           ^~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n = list(map(int, input().split()))
      | ^
Language: Java

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author dyominov
 */
public class Main {
  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    InputReader in = new InputReader(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    ABeginning solver = new ABeginning();
    solver.solve(1, in, out);
    out.close();
  }

  static class ABeginning {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
      int n = 4;
      int[] arr = in.nextArray(n);
      Arrays.sort(arr);
      out.println(Arrays.equals(arr, new int[]{1, 4, 7, 9}) ? "YES" : "NO");
    }

  }

  static class InputReader implements AutoCloseable {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
      reader = new BufferedReader(new InputStreamReader(stream), 32768);
      tokenizer = null;
    }

    public String next() {
      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
        try {
          tokenizer = new StringTokenizer(reader.readLine());
        } catch (IOException e) {
          throw new RuntimeException(e);
        }
      }
      return tokenizer.nextToken();
    }

    public int nextInt() {
      return Integer.parseInt(next());
    }

    public int[] nextArray(int n) {
      int[] arr = new int[n];
      for (int i = 0; i < n; i++) {
        arr[i] = nextInt();
      }
      return arr;
    }

    public void close() {
    }



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

#!/usr/bin/env python


def solve():
    N = list(map(int, input().split()))
    if 1 in N and 9 in N and 7 in N and 4 in N:
        print('YES')
    else:
        print('NO')


if __name__ == "__main__":
    solve()


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env python
      |  ^
a.cc:7:15: warning: multi-character character constant [-Wmultichar]
    7 |         print('YES')
      |               ^~~~~
a.cc:9:15: warning: multi-character character constant [-Wmultichar]
    9 |         print('NO')
      |               ^~~~
a.cc:4:1: error: 'def' does not name a type
    4 | def solve():
      | ^~~