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

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

int main(void)
{
	bool nums[200000] = {};
	int index = 0;

	scanf("%d", &index);

	int tmp;
	for (int i = 0; i < index; i++)
	{
		scanf("%d", &tmp);
		if (tmp > 200000)
		{
			printf("NO\n");
			return 0;
		}
		if (!nums[tmp])
		{
			 nums[tmp] = true;
		}
		else
		{
			printf("NO\n");
			return 0;
		}
	}
	printf("YES\n");

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: unknown type name 'bool'
    7 |         bool nums[200000] = {};
      |         ^~~~
main.c:4:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    3 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    4 | 
main.c:23:38: error: 'true' undeclared (first use in this function)
   23 |                          nums[tmp] = true;
      |                                      ^~~~
main.c:23:38: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:23:38: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());
        String[] data = (sc.nextLine()).split(" ");
        boolean ans = false;
        for(int i=0; i<n; i++){
            for(int j=0; j<n; j++){
                if(i!=j && data[i].equals(data[j])){
                    ans = true;
                }
                    
            }
        }
        if(ans){
            System.out.println("NO");
        } else {
            System.out.println("YES");
        }
    }
}
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());
        String[] data = (sc.nextLine()).split(" ");
        boolean ans = false;
        for(int i=0; i<n; i++){
            for(int j=0; j<n; j++){
                if(i!=j && data[i].equals(data[j])){
                    ans = true;
                }
                    
            }
        }
      	String Ans = "";
        if(ans){
            Ans = "NO";
        } else {
            Ans = "YES";
        }
      	System.out.println(Ans);
    }
}
提出情報

Compiler output:
Main.java:24: error: class, interface, enum, or record expected
import java.util.*;
^
Main.java:49: error: reached end of file while parsing
????
^
2 errors
Language: C

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

int main(void)
{
	bool nums[200000] = {};
	int index = 0;

	scanf("%d", &index);

	int tmp;

	for (int i = 0; i < index; i++)
	{
		scanf("%d", &tmp);
		if (tmp > 200000)
		{
			printf("NO\n");
			return 0;
		}
		if (!nums[tmp])
		{
			 nums[tmp] = true;
		}
		else
		{
			printf("NO\n");
			return 0;
		}
	}
	printf("YES\n");

	getchar();
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: unknown type name 'bool'
    7 |         bool nums[200000] = {};
      |         ^~~~
main.c:4:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    3 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    4 | 
main.c:24:38: error: 'true' undeclared (first use in this function)
   24 |                          nums[tmp] = true;
      |                                      ^~~~
main.c:24:38: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:24:38: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long n;
    cin>>n;
    long a[n],i,c=0;
    for(i=0;i<n;i++)
        cin>>a[i];
    sort(a,a+n);
    for(i=0;i<n-1;i++)
    {
        if(a[i]==a[i+1])
        {
            c=1;
            break;
        }
    }
    if(c==0)
        cout<<"YES";
    else
        cout<<"NO";

    return 0;
}


Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
class Main {
    public static void main(String[] args) {
        Scanner scan =new Scanner(System.in);
        int n = scan.nextInt();
        int[] a = new int[n];
        for (int i=0;i<n;i++){
            a[i] = scan.nextInt();
        }
        String str = a.toString();
        for (int i=0;i<n;i++){
            String temp = Integer.toString(a[i]);
            if (str.contains((temp)) {
                System.out.println("NO");
                break;
            }
        }
        System.out.println("YES");
    }
}


Compiler output:
Main.java:13: error: ')' expected
            if (str.contains((temp)) {
                                    ^
1 error
Language: Java

import java.util.*;

public class code {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] arr= new int[200001];
		for(int i=0; i<arr.length; i++) {
			arr[i]=sc.nextInt();
		}
		Arrays.sort(arr);
		boolean flag=true;
		for(int i=0; i<arr.length-1; i++) {
			if(arr[i]==arr[i+1]) {
				flag=false;
				break;
			}
		}
		if(flag) {
			System.out.println("YES");
		}
		else {
			System.out.println("NO");
		}
	}
}


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

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<String> list = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            list.add(sc.next());
        }
        boolean flag = false;
        Set<String> checkHash = new HashSet<String>();
        for(String str : list) {
            if(checkHash.contains(str)) {
                flag = true;
                break;
            } else {
                checkHash.add(str);
            }
        }

        if (flag) {
            System.out.println("No");
        } else {
            System.out.println("Yes");
        }

    }

Compiler output:
Main.java:28: error: reached end of file while parsing
    }
     ^
1 error
Language: Java

ort java.util.*;
import java.util.Comparator;
 
public class Main { 
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);       
        int n=sc.nextInt();
        String o="YES";
        int[] a=new int[n];
        for(int i=0;i<n;i++){
        	a[i]=sc.nextInt();
            for(int j=0;j<i;j++){
            	if(a[j]==a[i]){
                	o="NO";
                    System.out.println(o);
                    return;
                }
            }
        }
      System.out.println(o);
    }
}
import java.util.*;
import java.util.Comparator;

public class Main { 
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);       
        int n=sc.nextInt();
        String o="Yes";
        int[] a=new int[n];
        for(int i=0;i<n;i++){
        	a[i]=sc.nextInt();
            for(int j=0;j<i;j++){
            	if(a[j]==a[i]){
                	o="No";
                    System.out.println(o);
                    return;
                }
            }
        }
      System.out.println(o);
    }
}
提出情報

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
ort java.util.*;
^
Main.java:2: error: class, interface, enum, or record expected
import java.util.Comparator;
^
Main.java:23: error: class, interface, enum, or record expected
import java.util.*;
^
Main.java:24: error: class, interface, enum, or record expected
import java.util.Comparator;
^
Main.java:45: error: reached end of file while parsing
????
^
5 errors
Language: C++

#include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;

int main()
{
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (ll i = 0; i < N; i++)
  {
    cin >> A.at(i);

  }

  sort(A.begin(), A.end());
  reverse(A.begin(), A.end());
  ll tmp = 20000000000;
  for (ll i = 0; i < N; i++)
  {
    if (A.at(i) == tmp)
    {
      cout << "NO" << endl;
      return 0;
    }
    tmp = A.at(i);
  }

  cout << "YES" << endl;

  return 0;
}


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

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


int main(){

    int num;

    vector<int> vec;

    for (int i=0; i<num; i++){
        int temp;
        cin >> temp;
        vec.push_back(temp)
    }

    bool flag=false;
    for (int i=0; i<vec.size(); i++){
        for (int j=i+1; i<vec.size(); j++){
            if (vec.at(i)==vec.at(j)){
                flag=true;
                break;
            }
        }
    }
    if (flag){
        cout << "YES" <<endl;
    }
    else
    {
        cout << "NO" <<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: expected ';' before '}' token
   15 |         vec.push_back(temp)
      |                            ^
      |                            ;
   16 |     }
      |     ~
Language: C++

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

nt main(){
    int n ,an =0,ans =0; cin >> n;
    vector<int> vec(n);
    for(int i = 0;i < n;i++){
        cin >> vec.at(i);
    }
    for(int i = 0;i < n;i++){
        for(int j = 0;j < n;j++){
            if(vec.at(i) == vec.at(an)){
                ans++;
            }
        }
        if(ans != 1){
            cout << "NO" << endl;
            break;
        }
        an++;
    }
    cout << "YES" << endl;
}

Compiler output:
a.cc:6:1: error: 'nt' does not name a type; did you mean 'int'?
    6 | nt main(){
      | ^~
      | int
Language: C++

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


int main(){

    int num;

    vector<int> vec;

    for (int i=0; i<num; i++){
        int temp;
        cin >> temp;
        vec.push_back(temp)
    }

    bool flag=false;
    for (int i=0; i<vec.size(); i++){
        for (int j=i+1; i<vec.size(); j++){
            if (vec.at[i]==vec.at(j)){
                flag=true;
                break;
            }
        }
    }
    if (flag){
        cout << "YES" <<endl;
    }
    else
    {
        cout << "NO" <<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: expected ';' before '}' token
   15 |         vec.push_back(temp)
      |                            ^
      |                            ;
   16 |     }
      |     ~                       
a.cc:21:23: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   21 |             if (vec.at[i]==vec.at(j)){
      |                       ^
Language: C++

// This file is a "Hello, world!" in C++ language by GCC for wandbox.
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <string>
#include <vector>

using namespace std;

int main()
{
    vector<int> a;
    int n;
    
    cin >> n;
    
    for(int i = 0; i < n; i++) {
        int v;
        cin >> v;
        a.push_back(v);
    }
    sort(a.begin(), a.end());
    
    for (int i = 0; i < (int)a.size() - 1; i++) {
        if (a[i] == a[i+1]) {
            cout << "NO" << endl;
            return 0;
        }
    }
    cout << "YES" << endl;
    return 0;
}

// GCC reference:
//   https://gcc.gnu.org/

// C++ language references:
//   https://cppreference.com/
//   https://isocpp.org/
//   http://www.open-std.org/jtc1/sc22/wg21/

// Boost libraries references:
//   https://www.boost.org/doc/


Compiler output:
a.cc: In function 'int main()':
a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   22 |     sort(a.begin(), a.end());
      |     ^~~~
      |     sqrt
Language: Java

import java.util.Scanner;


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

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int[] list = new int[n];
		for (int i = 0; i < n; i++){
			list[i] = sc.nextInt();
		}

		quick_sort(list, 0, list.length-1);

		boolean result = false;
		for(int i = 1; i < n-1; i++){
			if(list[i-1] == list[i]) {
				result = true;
				break;
			}
		}


		if(!result){
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}
	}

	static void quick_sort(int[] d, int left, int right) {
        if (left>=right) {
            return;
        }
        int p = d[(left+right)/2];
        int l = left, r = right, tmp;
        while(l<=r) {
            while(d[l] < p) { l++; }
            while(d[r] > p) { r--; }
            if (l<=r) {
                tmp = d[l]; d[l] = d[r]; d[r] = tmp;
                l++; r--;
            }
        }
        quick_sort(d, left, r);  // ピボットより左側をクイックソート
        quick_sort(d, l, right); // ピボットより右側をクイックソート
    }
}


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

#include<bits/stdc++.h>

using namespace std;

int main(){
    long long n; cin >> n;

    long long a[200010];
    for (long long i = 0; i < n; i++){
        cin >> a[i];
    }

    sort(a, a + n);

    bool flag = false; 
    for (long long i = 1; i < n; i++){
        if(a[i] == a[i - 1]) flag = true
    }
    if(flag){
        puts("NO");
    }else{
        puts("YES");
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:41: error: expected ';' before '}' token
   17 |         if(a[i] == a[i - 1]) flag = true
      |                                         ^
      |                                         ;
   18 |     }
      |     ~
Language: C++

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


int main(){

    int num;

    vector<int> vec;

    for (int i=0; i<num; i++){
        int temp;
        cin >> temp;
        vec.push_back(temp)
    }

    bool flag=false;
    for (int i=0; i<vec.size(); i++){
        for (int j=i+1; i<vec.size(); j++){
            if vec.at[i]==vec.at(j){
                flag=true;
                break;
            }
        }
    }
    if (flag){
        cout << "YES" <<endl;
    }
    else
    {
        cout << "NO" <<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: expected ';' before '}' token
   15 |         vec.push_back(temp)
      |                            ^
      |                            ;
   16 |     }
      |     ~                       
a.cc:21:16: error: expected '(' before 'vec'
   21 |             if vec.at[i]==vec.at(j){
      |                ^~~
      |                (
Language: C++

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

int main(){
	int N;
  	cin >> N;
  
  	vector<int> A(N);
  	for(int i = 0;i < N;i++){
    	cin >> A.at(i);
    }
 
  	string ans = "Yes";
  	for(int i = 0;i < N;i++){
    	int set = A.at(i);
        for(int j = i + 1;j < N;j++){
        	if(set == A.at(j)){
              ans = "No";
              break;
            }
        }
      	
      	if(set == A.at(j)){
        	break;
        }
    }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:24: error: 'j' was not declared in this scope
   23 |         if(set == A.at(j)){
      |                        ^
Language: C++

include<bits/stdc++.h>
using namespace std;
int main(){
    long long n;
    cin>>n;
    long long a[n];
    for(long long i=0;i<n;i++){
        cin>>a[i];
    }
    long long ans=0;
    sort(a,a+n);
    for(long long i=0;i<n;i++){
        if(a[i]==a[i+1]){
            ans=1;
            break;
        }
    }
    if(ans==1){
        cout<<"NO"<<endl;
    }
    else{
        cout<<"YES"<<endl;
    }
return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>>n;
      |     ^~~
a.cc:11:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |     sort(a,a+n);
      |     ^~~~
      |     short
a.cc:19:9: error: 'cout' was not declared in this scope
   19 |         cout<<"NO"<<endl;
      |         ^~~~
a.cc:19:21: error: 'endl' was not declared in this scope
   19 |         cout<<"NO"<<endl;
      |                     ^~~~
a.cc:22:9: error: 'cout' was not declared in this scope
   22 |         cout<<"YES"<<endl;
      |         ^~~~
a.cc:22:22: error: 'endl' was not declared in this scope
   22 |         cout<<"YES"<<endl;
      |                      ^~~~
Language: Java

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

public class Contest2 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n =sc.nextInt();
		int[]input = new int[n];
		for(int i=0;i<n;i++) {
			input[i]= sc.nextInt();
		}
		Arrays.sort(input);
		String res = "YES";
		for(int i=0;i<n-1;i++) {
			if(input[i]==input[i+1]) {
				res ="NO";
				break;
			}
		}
		


	}

}


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

#include <bits/stdc++.h>
#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
using namespace std;

bool check( vector<int> A ){
    return unique( begin( A ), end( A ) ) == end( A );
}
 
int main()
{
  int n;
  cin >> n;
  vector<int> input(n,0);
  string line;
  getline(cin, line);
  for (int j = 0; j < n; j++){
	const auto subStr = split(line, ' ');
	input[j] = atoi(subStr[j].c_str());
  }
  sort( begin(input), end(input) );
  
  if(check(input)){
    cout << "YES" << endl;
  }else{
    cout << "NO" << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:29: error: 'split' was not declared in this scope
   20 |         const auto subStr = split(line, ' ');
      |                             ^~~~~
Language: C++

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


int main(){

    int num;

    vector<int> vec;

    for (int i=0; i<num; i++){
        int temp
        cin >> temp;
        vec.push_back(temp)
    }

    bool flag=false;
    for (int i=0; i<vec.size(); i++){
        for (int j=i+1; i<vec.size(); j++){
            if vec.at[i]==vec.at(j){
                flag=true;
                break;
            }
        }
    }
    if (flag){
        cout << "YES" <<endl;
    }
    else
    {
        cout << "NO" <<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: expected initializer before 'cin'
   14 |         cin >> temp;
      |         ^~~
a.cc:15:23: error: 'temp' was not declared in this scope; did you mean 'tm'?
   15 |         vec.push_back(temp)
      |                       ^~~~
      |                       tm
a.cc:21:16: error: expected '(' before 'vec'
   21 |             if vec.at[i]==vec.at(j){
      |                ^~~
      |                (
Language: C++

#include<cstdio>
#include<cmath>
#include<climits>
#include<algorithm>
#include<sstream>
#include<iostream>
#include<string>
#include<queue>
#include<stack>
#include<set>
#include<list>
#include<map>
#include<vector>
#include<unordered_set>

using namespace std;


#define rep(i,n) for(int i=0; i<n; i++)
#define rept(i,a,b) for(int i=a; i<b; i++)
#define ll long long
#define MOD 1000000007

#define IMIN INT_MIN;
#define IMAX INT_MAX;


int main(){
    int N;
    cin >> N;
    vector<int> A(N);
    rep(i, N) cin >> A[i];
    unordered_set<int> h;
    rep(i, N) h.insert(A[i]);
    if (A.size() == B.size()) cout << "YES" << endl;
    else cout << "NO" << endl;



	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:21: error: 'B' was not declared in this scope
   35 |     if (A.size() == B.size()) cout << "YES" << endl;
      |                     ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    int N = 0;

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

    for (int i = 0; i < N-1; i++) {
        for (int j = i+1; j < N; j++) {
            if (A[i] == A[j]){
                cout << "No" << endl;
                exit();
            }
        }
    }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:20:21: error: too few arguments to function 'void exit(int)'
   20 |                 exit();
      |                 ~~~~^~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdlib.h:756:13: note: declared here
  756 | extern void exit (int __status) __THROW __attribute__ ((__noreturn__));
      |             ^~~~
Language: C++

#include<bits/stdc++.h>
#define ll long long;
#define dbg(x) cout<<#x<<"--------------"<<x<<endl;
#define dl cout<<"LINE"<<__LINE__<<endl;
using namespace std;
int main(){
	std::ios::sync_with_stdio(false);
	std::cin.tie(0);
	ll n,a[200005];bool b[200005];
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a[i];
		for(int j=1;j<i;j++)if(a[j]==a[i]){
			cout<<"NO"<<endl;return 0;
		}
	}
	
	cout<<"YES"<<endl;
	
	
		
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:17: error: declaration does not declare anything [-fpermissive]
    2 | #define ll long long;
      |                 ^~~~
a.cc:9:9: note: in expansion of macro 'll'
    9 |         ll n,a[200005];bool b[200005];
      |         ^~
a.cc:9:12: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 |         ll n,a[200005];bool b[200005];
      |            ^
      |            yn
a.cc:9:14: error: 'a' was not declared in this scope
    9 |         ll n,a[200005];bool b[200005];
      |              ^
Language: C

#include<stdio.h>
int n;
int a[1000000000]={0};
int main()
{
    int m,flag=0;
    scanf("%d",n);
    for(int i=0；i<n;i++)
    {
        scanf("%d",&m);
        a[m]++;
        if(a[m]>1) {flag=1;break;}
    }
    if(flag==1) printf("NO");
    else printf("YES");
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:15: error: invalid suffix "；i" on integer constant
    8 |     for(int i=0；i<n;i++)
      |               ^~~~
main.c:8:25: error: expected ';' before ')' token
    8 |     for(int i=0；i<n;i++)
      |                         ^
      |                         ;
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
using namespace std;
typedef long long ll;
//max=({});
//条件式が真ならwhileの中身を回し続ける

bool flag[1050000];

int main() {
	ll n;
	cin >> n;
	vector<ll>A(n);
	rep(i, n) {
		cin >> A[i];
	}
	target = 1e9 + 7;
	vector<ll>B(target);
	rep(i, target) {
		B[i] = 0;
	}
	rep(i, n) {
		B[A[i]]++;
	}
	rep(i, target) {
		if (B[i] == 2)puts("NO");
		return 0;
	}
	puts("YES");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'target' was not declared in this scope
   18 |         target = 1e9 + 7;
      |         ^~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;

int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  set<ll> a;
  for (int i = 0; i < n; i++) {
    ll s;
    cin >> s;
    a.insert(s);
  }
  if (s.size() == n) cout << "YES" << endl;
  else cout << "NO" << endl;
  return 0;
}


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

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

bool check( vector<int> A ){
    return unique( begin( A ), end( A ) ) == end( A );
}
 
int main()
{
  int n;
  cin >> n;
  vector<int> input(n,0);
  string line;
  getline(cin, line);
  for (int j = 0; j < n; j++){
	const auto subStr = split(line, ' ');
	input[j] = atoi(subStr[j].c_str());
  }
  sort( begin(input), end(input) );
  
  if(check(input)){
    cout << "YES" << endl;
  }else{
    cout << "NO" << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'bool check(std::vector<int>)':
a.cc:7:12: error: 'unique' was not declared in this scope
    7 |     return unique( begin( A ), end( A ) ) == end( A );
      |            ^~~~~~
a.cc: In function 'int main()':
a.cc:18:29: error: 'split' was not declared in this scope
   18 |         const auto subStr = split(line, ' ');
      |                             ^~~~~
a.cc:21:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   21 |   sort( begin(input), end(input) );
      |   ^~~~
      |   short
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
int i;
int j;
int N;
int count = 0;
cin >> N;
int A[N];
for(i=0;i<N;i++)cin >> A[i];
sort(A,A+N)
for(i=0;i<N-1;i++){
     if(A[i]==A[i+1]){
         count++;
         break;
     }
 }
if(count>0)cout << "NO" << endl;
else{cout << "YES"<< endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: expected ';' before 'for'
   12 | sort(A,A+N)
      |            ^
      |            ;
   13 | for(i=0;i<N-1;i++){
      | ~~~         
a.cc:13:18: error: expected ';' before ')' token
   13 | for(i=0;i<N-1;i++){
      |                  ^
      |                  ;
Language: C++

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

int main(){
    vector<int> A;

    int N;
    cin>>N;
    int An;
    for(int i=0;i<N;i++){
        cin>>An;
        A.push_back(An);
    }
    int A_size=A.size();
    sort(A.begin(),A.end());
    A.erase(unique(A.begin(),A.end()),A.end());
    if(A_size==A.size())cout<<"Yes"<<endl;
    else cout<<"No"<<endl;


}

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

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


int main(){
    string str;

    cin >> str;

    for (int i=0; i<str.length(); i++){
        str[i]="x";
    }

    cout << str <<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   12 |         str[i]="x";
      |                ^~~
      |                |
      |                const char*
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<Long> c = new ArrayList<>();
		for(int i=0;i<n;i++){
			long a = sc.nextLong();
			if(c.contains(a)){
				System.out.println("NO");
				return;
			}else{
				c.add(a);
			}
		}
		sc.close();
		System.out.println("YES");
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
		List<Long> c = new ArrayList<>();
		^
  symbol:   class List
  location: class Main
Main.java:8: error: cannot find symbol
		List<Long> c = new ArrayList<>();
		                   ^
  symbol:   class ArrayList
  location: class Main
2 errors
Language: C

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

int main()
{
	int n, i, j;
	long long int *a;
	scanf("%d", &n);
	a = (long long int *)malloc(sizeof(long long int) * n);
	for(i = 0; i < n; i++){
		scanf("%d ", &a[i]);
	}
	for(i = 0; i < n - 1; i++){
		for(j = i + 1; j < n; j++){
			if(a[i] == a[j]){
				printf("NO\n");
			}
		}
	}
	printf("YES\n");
	
	return 0;
}

Compiler output:
main.c:2:10: fatal error: stdlin.h: No such file or directory
    2 | #include <stdlin.h>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

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

inline int num (const std::string& S, int idx){ return S.at(idx) - '0'; }
inline unsigned int bitMask(int i){ return (1 << i); }
inline bool isTrue(unsigned int bit, int i){ return bit & bitMask(i); }

int main(){
	int N;
	cin >> N;
	vector<int> v(N);
	for(auto& e : v) cin >> e;
	sort(v.begin(), v.end());
	if(v[0]==v[1]){
		cout << "NO" << endl;
		return 0;
	}
	for(std::size_t i=1; i<v.size(); ++i){
		if(v[i]==v[i-1]){
			cout << "NO" << endl;
			return 0;
		}
	}
	cout << "YES" << endl;
	return 0;
}


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

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

bool check( vector<int> A ){
    return unique( begin( A ), end( A ) ) == end( A );
}
 
int main()
{
  int n;
  cin >> n;
  vector<int> input(n,0);
  getline(cin, line);
  for (int j = 0; j < n; j++){
	const auto subStr = split(line, ' ');
	input[i] = atoi(subStr[j].c_str());
  }
  sort( begin(input), end(input) );
  
  if(check(input)){
    cout << "YES" << endl;
  }else{
    cout << "NO" << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'bool check(std::vector<int>)':
a.cc:7:12: error: 'unique' was not declared in this scope
    7 |     return unique( begin( A ), end( A ) ) == end( A );
      |            ^~~~~~
a.cc: In function 'int main()':
a.cc:15:16: error: 'line' was not declared in this scope
   15 |   getline(cin, line);
      |                ^~~~
a.cc:17:29: error: 'split' was not declared in this scope
   17 |         const auto subStr = split(line, ' ');
      |                             ^~~~~
a.cc:18:15: error: 'i' was not declared in this scope
   18 |         input[i] = atoi(subStr[j].c_str());
      |               ^
a.cc:20:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   20 |   sort( begin(input), end(input) );
      |   ^~~~
      |   short
Language: C++

#include <iostream>
using namespace std;


int main(){

    int num;

    vector<int> vec;

    for (int i=0; i<num; i++){
        int temp
        cin >> temp;
        vec.push_back(temp)
    }

    bool flag=false;
    for (int i=0; i<vec.size(); i++){
        for (int j=i+1; i<vec.size(); j++){
            if vec.at[i]==vec.at(j){
                flag=true;
                break;
            }
        }
    }
    if (flag){
        cout << "YES" <<endl;
    }
    else
    {
        cout << "NO" <<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'vector' was not declared in this scope
    9 |     vector<int> vec;
      |     ^~~~~~
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:9:12: error: expected primary-expression before 'int'
    9 |     vector<int> vec;
      |            ^~~
a.cc:13:9: error: expected initializer before 'cin'
   13 |         cin >> temp;
      |         ^~~
a.cc:14:9: error: 'vec' was not declared in this scope
   14 |         vec.push_back(temp)
      |         ^~~
a.cc:14:23: error: 'temp' was not declared in this scope; did you mean 'tm'?
   14 |         vec.push_back(temp)
      |                       ^~~~
      |                       tm
a.cc:18:21: error: 'vec' was not declared in this scope
   18 |     for (int i=0; i<vec.size(); i++){
      |                     ^~~
a.cc:20:16: error: expected '(' before 'vec'
   20 |             if vec.at[i]==vec.at(j){
      |                ^~~
      |                (
Language: C++

n = int(input())
l = input().split()
t = True
new = []
for el in l:
    if el not in new:
        new.append(el)
    else: 
        print("NO")
        t = False
if t:
    print("YES")
    

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

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned int u32;
typedef pair<int, int> p;
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
int Inf = 1000000000;
ll inf = 1000000000000;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main() {
	int n;
	cin >> n;
	int a[330000];
	int i;
	for (i = 0; i < n; i++) {
		cin >> a[i];
	}
	stable_sort(a,a+n,greater<int>())；
	for (i = 0; i < n - 1; i++) {
		if (a[i] == a[i + 1]) {
			cout << "NO";
			return(0);
		}
	}
	cout << "YES";
	return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:42: error: expected ';' before '\U0000ff1b'
   20 |         stable_sort(a,a+n,greater<int>())；
      |                                          ^~
      |                                          ;
a.cc:21:35: error: expected ';' before ')' token
   21 |         for (i = 0; i < n - 1; i++) {
      |                                   ^
      |                                   ;
Language: C

#include<stdio.h>

#define MAX_N 200001

void merge_sort (long int array[], int left, int right) {
  int i, j, k, mid;
  int work[MAX_N]; 
  if (left < right) {
    mid = (left + right)/2; 
    merge_sort(array, left, mid);  
    merge_sort(array, mid+1, right);  
    for (i = mid; i >= left; i--) { work[i] = array[i]; } 
    for (j = mid+1; j <= right; j++) {
      work[right-(j-(mid+1))] = array[j]; 
    i = left; j = right;
    for (k = left; k <= right; k++) {
      if (work[i] < work[j]) { array[k] = work[i++]; }
      else                   { array[k] = work[j--]; }
    }
  }
}

int main(void){

    long int N,A[MAX_N],i;

    scanf("%ld",&N);
    for(i = 0;i < N;i++){
        scanf("%ld",&A[i]);
    }

    merge_sort(A,0,N-1);

    for(i = 1;i < N;i++){
        if(A[i] == A[i-1]){
            printf("NO\n");
            return 0;
        }
    }

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

Compiler output:
main.c: In function 'merge_sort':
main.c:43:1: error: expected declaration or statement at end of input
   43 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(void) {
  int N;
  int A[N];
  
  for (int i = 0; i < N; i++) cin >> A[i];
  
  flg = 0;
  
  for (int i = 0; i < N; i++) {
    for (int j = i + 1; j < N; j++) {
      if (A[i] == A[j]) flg = 1;
    }
  }
  
  if (flg == 1) cout << "NO" << endl;
  else cout << "YES" << endl;
  
  return 0;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'flg' was not declared in this scope
   10 |   flg = 0;
      |   ^~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  long long n:
  cin>>n;
  long long A[n];
  for(long long i=0;i<n;i++){
    cin>>A[i];
  }
  long long m=0;
  int f=0;
  for(long long i=m+1;i<n;i++){
    if(A[m]==A[i]){
      f=1;
      break;
    }
    m++;
  }
  if(f==0){
    cout<<"OK"<<endl;
  }
  else{
    cout<<"NO"<<endl;
  }
 return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:14: error: found ':' in nested-name-specifier, expected '::'
    4 |   long long n:
      |              ^
      |              ::
a.cc:4:13: error: 'n' has not been declared
    4 |   long long n:
      |             ^
a.cc:5:6: error: qualified-id in declaration before '>>' token
    5 |   cin>>n;
      |      ^~
a.cc:6:15: error: 'n' was not declared in this scope
    6 |   long long A[n];
      |               ^
a.cc:8:10: error: 'A' was not declared in this scope
    8 |     cin>>A[i];
      |          ^
a.cc:13:8: error: 'A' was not declared in this scope
   13 |     if(A[m]==A[i]){
      |        ^
Language: C++

#include<stdio.h>
#include<set>

int n,tmp;
std::set<int> a;

int main(){
  scanf("%d",&n);
  for(int i=0;i<n;i++){
    scanf("%d",&tmp);
    if(a.count(tmp)){
      puts("NO");
      retur 0;
    }
    else a.insert(p);
  }
  puts("YES");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: 'retur' was not declared in this scope
   13 |       retur 0;
      |       ^~~~~
a.cc:15:19: error: 'p' was not declared in this scope
   15 |     else a.insert(p);
      |                   ^
Language: C++

//#include<iostream>
//using namespace std;
//int a[200005];
//int main(void)
//{
//    int n,k;
//    cin >> n >> k;
//    for(int i=1;i<=n;i++)
//        cin >> a[i];
//    for(int i=1;i<=n-k+1;i++)
//    {
//        for(int j=i;j<i+k;j++)
//            
//    }
//}
#include<iostream>
#include<algorithm>
using namespace std;
int a[200005];
int main(void)
{
    int n,cnt=0;
    bool flag=false;
    cin >> n;
    for(int i=1;i<=n;i++) cin >> a[i];
    sort(a+1,a+n+1);
    for(int i=2;i<=n;i++)
        if(a[i-1]==a[i])
            flag=true,break;
    if(flag==false)
        cout << "YES";
    else cout <<"NO";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:23: error: expected primary-expression before 'break'
   29 |             flag=true,break;
      |                       ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main (){
int n;
cin >>n;
int a[n]
for (int i=0; i<n; i++){
cin>>a[i];
}
for (int i=0; i<n; i++){
for (int j=1+i; j<n; j++){
if (a[i]==a[j]){
cout << "NO"<<endl;

return 0;
}

}

}
cout << "YES"<<endl;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: expected initializer before 'for'
    7 | for (int i=0; i<n; i++){
      | ^~~
a.cc:7:15: error: 'i' was not declared in this scope
    7 | for (int i=0; i<n; i++){
      |               ^
a.cc:12:5: error: 'a' was not declared in this scope
   12 | if (a[i]==a[j]){
      |     ^
Language: C++

#include<iostream>
usingnamespace std;
int main (){
int n;
cin >>n;
int a[n]
for (int i=0; i<n; i++){
cin>>a[i];
}
for (int i=0; i<n; i++){
for (int j=1+i; j<n; j++){
if (a[i]==a[j]){
cout << "NO"<<endl;

return 0;
}

}

}
cout << "YES"<<endl;

return 0;
}

Compiler output:
a.cc:2:1: error: 'usingnamespace' does not name a type
    2 | usingnamespace std;
      | ^~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 | 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:7:1: error: expected initializer before 'for'
    7 | for (int i=0; i<n; i++){
      | ^~~
a.cc:7:15: error: 'i' was not declared in this scope
    7 | for (int i=0; i<n; i++){
      |               ^
a.cc:12:5: error: 'a' was not declared in this scope
   12 | if (a[i]==a[j]){
      |     ^
a.cc:13:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 | 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:13:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 | cout << "NO"<<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:21:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   21 | 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:21:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   21 | cout << "YES"<<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 <vector>
#include <string>
#include <iostream>
int main()
{
    std::size_t n;
    std::cin >> n;
    std::vector<std::uint32_t> v(n);
    for(auto&& i : v) std::cin >> i;
    std::sort(v.begin(), v.end());
    std::cout << ((v.end() == std::unique(v.begin(), v.end())) ? "YES" : "NO") << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: 'uint32_t' is not a member of 'std'; did you mean 'wint_t'?
    8 |     std::vector<std::uint32_t> v(n);
      |                      ^~~~~~~~
      |                      wint_t
a.cc:8:30: error: template argument 1 is invalid
    8 |     std::vector<std::uint32_t> v(n);
      |                              ^
a.cc:8:30: error: template argument 2 is invalid
a.cc:9:20: error: 'begin' was not declared in this scope; did you mean 'std::begin'?
    9 |     for(auto&& i : v) std::cin >> i;
      |                    ^
      |                    std::begin
In file included from /usr/include/c++/14/vector:69,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:114:37: note: 'std::begin' declared here
  114 |   template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
      |                                     ^~~~~
a.cc:9:20: error: 'end' was not declared in this scope; did you mean 'std::end'?
    9 |     for(auto&& i : v) std::cin >> i;
      |                    ^
      |                    std::end
/usr/include/c++/14/bits/range_access.h:116:37: note: 'std::end' declared here
  116 |   template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
      |                                     ^~~
a.cc:10:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   10 |     std::sort(v.begin(), v.end());
      |          ^~~~
      |          qsort
a.cc:10:17: error: request for member 'begin' in 'v', which is of non-class type 'int'
   10 |     std::sort(v.begin(), v.end());
      |                 ^~~~~
a.cc:10:28: error: request for member 'end' in 'v', which is of non-class type 'int'
   10 |     std::sort(v.begin(), v.end());
      |                            ^~~
a.cc:11:22: error: request for member 'end' in 'v', which is of non-class type 'int'
   11 |     std::cout << ((v.end() == std::unique(v.begin(), v.end())) ? "YES" : "NO") << std::endl;
      |                      ^~~
a.cc:11:36: error: 'unique' is not a member of 'std'
   11 |     std::cout << ((v.end() == std::unique(v.begin(), v.end())) ? "YES" : "NO") << std::endl;
      |                                    ^~~~~~
a.cc:11:45: error: request for member 'begin' in 'v', which is of non-class type 'int'
   11 |     std::cout << ((v.end() == std::unique(v.begin(), v.end())) ? "YES" : "NO") << std::endl;
      |                                             ^~~~~
a.cc:11:56: error: request for member 'end' in 'v', which is of non-class type 'int'
   11 |     std::cout << ((v.end() == std::unique(v.begin(), v.end())) ? "YES" : "NO") << std::endl;
      |                                                        ^~~
Language: C++

#incldue <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,b,cnt;
ll a[1000000010];
int main()
{
    cin>>n;
    for(int i=0; i<n; i++)
    {
        cin>>b;
        if(a[b]==0)
        {
            a[b]++;
            cnt++;
        }
        else
        {
            cout<<"NO";
            break;
        }
    }
    if(cnt==n){
    cout<<"YES";
    }
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
    1 | #incldue <bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin>>n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incldue <bits/stdc++.h>
a.cc:19:13: error: 'cout' was not declared in this scope
   19 |             cout<<"NO";
      |             ^~~~
a.cc:19:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:24:5: error: 'cout' was not declared in this scope
   24 |     cout<<"YES";
      |     ^~~~
a.cc:24:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long arr[3000000],cnt[3000000];
int main()
{
	long long n,i,j,k;
	cin>>n;
	for (i=0;i<n;i++)
	{
		cin>>arr[i];
		cnt[arr[i]]++;
	}
	sort(arr,arr+n)
	for (i=0;i<n-1;i++)
	{
		if (arr[i+1]==arr[i])
		{
			cout<<"NO"<<endl;
			return 0;
		}
	}
	cout<<"YES"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: expected ';' before 'for'
   13 |         sort(arr,arr+n)
      |                        ^
      |                        ;
   14 |         for (i=0;i<n-1;i++)
      |         ~~~             
a.cc:14:27: error: expected ';' before ')' token
   14 |         for (i=0;i<n-1;i++)
      |                           ^
      |                           ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n; cin>>n;
 	bool can=false;
  map<int,int>mp;
  for(int i=0;i<n;i++)
  {
	cin>>x;
    mp[x]++;
    if(mp[x]>1)
    {
      can=true;
    }
  }
  if(can){cout<<"NO\n";}
  else
  {
    cout<<"YES";
  }
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'x' was not declared in this scope
   10 |         cin>>x;
      |              ^
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    long[] a=new Long[n];
    for(int i=0;i<n;i++){
      a[i]=sc.nextLong();
    }
    Arrays.sort(a);
    boolean flg=true;
    for(int i=1;i<n;i++){
      if(a[i]!=a[i-1]){
        flg=false;
        break;
      }
    }
    if(flg){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }
  }
}

Compiler output:
Main.java:7: error: incompatible types: Long[] cannot be converted to long[]
    long[] a=new Long[n];
             ^
1 error
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<string>
#include<set>
using namespace std;
int main()
{
   set<int > m;
   int n,i,x;
   cin>>n;
   for(i = 0;i < n;i++)
   {
       cin>>x;
       m.insert(x);
   }
   if(m.size()==n)
    cout<<"YES"<<endl;
   else
    cout<<"NO"<<endl
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:21: error: expected ';' before '}' token
   22 |     cout<<"NO"<<endl
      |                     ^
      |                     ;
   23 | }
      | ~