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

#include<iostream>

using namespace std;


int main(){
  int N;
  cin>>N;
  map<int,int> mp;
  
  for(int i=0;i<N;++i){
    int tmp;
    cin>>tmp;
    mp[tmp]++;
  }
  
  for(auto itr=mp.begin();itr<mp.end();itr++){
   if(itr.second>1){
    cout<<"NO"<<endl;
     return 0;
   }
    
  }
 	cout<<"YES"<<endl; 
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'map' was not declared in this scope
    9 |   map<int,int> mp;
      |   ^~~
a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    1 | #include<iostream>
  +++ |+#include <map>
    2 | 
a.cc:9:7: error: expected primary-expression before 'int'
    9 |   map<int,int> mp;
      |       ^~~
a.cc:14:5: error: 'mp' was not declared in this scope; did you mean 'tmp'?
   14 |     mp[tmp]++;
      |     ^~
      |     tmp
a.cc:17:16: error: 'mp' was not declared in this scope
   17 |   for(auto itr=mp.begin();itr<mp.end();itr++){
      |                ^~
Language: C++

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

int main() {
    int n;
    cin >> n;
    map<int, int> mp;
    bool f = true;
    for (int i = 0; i < n; i++){
        cin >> a;
        mp[a]++;
        if (mp[a] > 1) f = false;
    }
    cout << (f ? "YES" : "NO") << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 'a' was not declared in this scope
   11 |         cin >> a;
      |                ^
Language: C++

import numpy as np

N = int(input())
A = [int(i) for i in input().split()]
A = np.sort(A)
tf = np.any(np.diff(A) == 0)
if tf:
  print("NO")
else:
  print("YES")

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

#include <iostream>
#include <vector>

using namespace std;

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

    sort(A.begin(), A.end());
    auto p = A.begin();
    int a, b;
    while (p != A.end()) {
        a = *p;
        ++p;
        if (p == A.end()) {
            cout << "YES" << endl;
            break;
        }
        b = *p;
        if (a == b) {
            cout << "NO" << endl;
            break;
        }
    }
}



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

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


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: 'i' was not declared in this scope
    5 |   for(i=0;i<200000;i++;)
      |       ^
a.cc:5:23: error: expected ')' before ';' token
    5 |   for(i=0;i<200000;i++;)
      |      ~                ^
      |                       )
a.cc:5:24: error: expected primary-expression before ')' token
    5 |   for(i=0;i<200000;i++;)
      |                        ^
a.cc:9:6: error: expected '(' before '{' token
    9 |   for{i=0;i<n;i++)
      |      ^
      |      (
a.cc:9:6: error: expected primary-expression before '{' token
a.cc:21:7: error: expected primary-expression at end of input
   21 |      }
      |       ^
a.cc:21:7: error: expected ';' at end of input
   21 |      }
      |       ^
      |       ;
a.cc:21:7: error: expected primary-expression at end of input
a.cc:21:7: error: expected ')' at end of input
   21 |      }
      |       ^
      |       )
a.cc:9:6: note: to match this '('
    9 |   for{i=0;i<n;i++)
      |      ^
a.cc:21:7: error: expected statement at end of input
   21 |      }
      |       ^
a.cc:21:7: error: expected '}' at end of input
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int x[200000];
  for(i=0;i<200000;i++;)
    x[i]=0;
  int n,a,out=0;
  cin>>n;
  for{i=0;i<n;i++)
  {
    cin>>a;
    if(x[a-1]==0)
      x[a-1]++;
    else
      out++;
  }
if(out>0);
      cout<<'NO';
      else cout<<'YES';
      return 0;
     }
      
      

Compiler output:
a.cc:18:13: warning: multi-character character constant [-Wmultichar]
   18 |       cout<<'NO';
      |             ^~~~
a.cc:19:18: warning: multi-character character constant [-Wmultichar]
   19 |       else cout<<'YES';
      |                  ^~~~~
a.cc: In function 'int main()':
a.cc:5:7: error: 'i' was not declared in this scope
    5 |   for(i=0;i<200000;i++;)
      |       ^
a.cc:5:23: error: expected ')' before ';' token
    5 |   for(i=0;i<200000;i++;)
      |      ~                ^
      |                       )
a.cc:5:24: error: expected primary-expression before ')' token
    5 |   for(i=0;i<200000;i++;)
      |                        ^
a.cc:9:6: error: expected '(' before '{' token
    9 |   for{i=0;i<n;i++)
      |      ^
      |      (
a.cc:9:6: error: expected primary-expression before '{' token
a.cc:21:7: error: expected primary-expression at end of input
   21 |      }
      |       ^
a.cc:21:7: error: expected ';' at end of input
   21 |      }
      |       ^
      |       ;
a.cc:21:7: error: expected primary-expression at end of input
a.cc:21:7: error: expected ')' at end of input
   21 |      }
      |       ^
      |       )
a.cc:9:6: note: to match this '('
    9 |   for{i=0;i<n;i++)
      |      ^
a.cc:21:7: error: expected statement at end of input
   21 |      }
      |       ^
a.cc:21:7: error: expected '}' at end of input
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

{int a;cin>>a;vector<int>li(a+1);for(int i=0;i<a;i++){cin>>li[i];}sort(li.begin(),li.end());int c=0;for(int i=0;i<a;i++){if(li[i]==li[i+1]){c=1;}}if(c==0){cout<<"YES";}else{cout<<"NO";}return 0;}

Compiler output:
a.cc:1:1: error: expected unqualified-id before '{' token
    1 | {int a;cin>>a;vector<int>li(a+1);for(int i=0;i<a;i++){cin>>li[i];}sort(li.begin(),li.end());int c=0;for(int i=0;i<a;i++){if(li[i]==li[i+1]){c=1;}}if(c==0){cout<<"YES";}else{cout<<"NO";}return 0;}
      | ^
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[i];

  for(int i = 0; i < N; i++){
    for(int j = 0; j < N; J++){
      if(A[i] == A[j] && i != j){cout << "NO"; return 0; }
    }
  }

  cout << "YES";
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:27: error: 'J' was not declared in this scope
   12 |     for(int j = 0; j < N; J++){
      |                           ^
Language: C++

#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
#include <string>
#include <math.h>
#include <stdio.h>
#include <iomanip>
#include <limits>
#include <list>
#include <string>
#include <queue>
#include <deque>
#include <tuple>
#include <map>
#include <sstream>
using namespace std;
#define MOD (long long int)(1e9+7)
#define ll long long int
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define reps(i,n) for(int i=1; i<=(int)(n); i++)
#define REP(i,n) for(int i=n-1; i>=0; i--)
#define REPS(i,n) for(int i=n; i>0; i--)
#define FOR(i,a,b) for(int i=a; i<(int)(b); i++)
#define ALL(x) (x).begin(),(x).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define SORT(c) sort(ALL(x))
#define CLR(a) memset((a), 0 ,sizeof(a))
#define PB push_back
#define MP make_pair
#define SP << " " <<
const int INF = 1001001001;
const ll LINF = 100100100100100100;
const double EPS = 1e-10;
const long double PI  = acos(-1.0L);
typedef pair<int,int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
#define chmax(a,b) a = (((a)<(b))?(b):(a))
#define chmin(a,b) a = (((a)>(b))?(b):(a))

__attribute__((constructor))
void initial(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(15);
}

signed main(){
  int n; cin>>n;
	VI a(n); rep(i,n) cin>>a[i]; sort(ALL(a));
	rep(i,n-1){
		if(a[i]==a[i+1]) return cout<<"NO"<<endl;
	}
	cout<<"YES"<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:54:51: error: cannot convert 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} to 'int' in return
   54 |                 if(a[i]==a[i+1]) return cout<<"NO"<<endl;
      |                                         ~~~~~~~~~~^~~~~~
      |                                                   |
      |                                                   std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}
Language: C++

#include "pch.h"
#include "bits/stdc++.h"

using namespace std;


#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i < (n); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
#define all(i) (i).begin(), (i).end()
#define rall(i) (i).begin(), (i).end(), greater<int>()

#define int long long

#define elif else if
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define fst first
#define sec second

#define mod 1000000007

template <typename T>
void print(T x)
{
	std::cout << x <<" " ;
}


template <typename T>
void println(T x)
{
	std::cout << x << "\n";
}


signed main(void) {
	int N;
	cin >> N ;
	int tmp = N;
	map<int,int>mp;

	for (int x; tmp--; mp[x]++) {
		cin >> x;
	}

	if (mp.size() == N) {
		print("YES");
	}
	else {
		print("NO");
	}
	
}

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

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


int main (void) {
int n;
scanf("%d",&n);
int array[n];
for (int i=0;i<n;i++){
    scanf("%d",&array[i]);
}
for (int i=0;i<n;i++){
  for (int j=i+1;j<n;j++){
   if (array[i]==array[j]) {printf("NO");return 0;}
  }
}
printf("YES");

return EXIT_SUCCESS;

Compiler output:
main.c: In function 'main':
main.c:20:1: error: expected declaration or statement at end of input
   20 | return EXIT_SUCCESS;
      | ^~~~~~
Language: C++

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

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

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(A.begin(), A.end());
      |     ^~~~
      |     short
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  cin>>n;
  int a[n];
  for(int i=0;i<n;i++)
  {
    cin>>a[i];
  }
  map<int,int>d;
  //map<int,int>::iterator itr;
  int l;
  int a,b=0;
  for(int i=0;i<n;i++)
  {
   // int a,b=0;
    //cin>>a;
    ++d[a[i]];
  }
  for(int i=0;i<n;i++) 
  {
    if(++d[a[i]]>=2)
        {
            l=0;
            break;
        }
  }
  if(l==0)
    cout<<"no";
  else
        cout<<"yes";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: conflicting declaration 'int a'
   15 |   int a,b=0;
      |       ^
a.cc:7:7: note: previous declaration as 'int a [n]'
    7 |   int a[n];
      |       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n=5;
 // cin>>n;
 /* int a[n];
  for(int i=0;i<n;i++)
  {
    cin>>a[i];
  }*/
  map<int,int>d;
  map<int,int>::iterator itr;
  int l;
  for(int i=0;i<n;i++)
  {
    int a,b=0;
    cin>>a;
    ++d[a];
  }
  for(int i=0;i<n;i++)
  {
    if(++d[a]==2)
        {//cout<<"no";
             l=0;
            break;
        }
  }
  if(l==0)
    cout<<"no";
  else
        cout<<"yes";
  
 /*for(auto it = d.begin(); it != d.end(); it++) {
        cout << it->first << " " << it->second <<"\n";
    }*/
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:12: error: 'a' was not declared in this scope
   23 |     if(++d[a]==2)
      |            ^
Language: C++

import Data.List

solve x = if x == 0
    then "NO"
    else "YES"


main = do
    n <- map read . words<$>getLine ::IO [Int]
    a <- map read . words<$>getLine ::IO [Int]
    let aa = sort a
    let b = aa ++ [0]
    let bb = 0:aa
    let c = zipWith (-) b bb
    --let d = find (==0) c
    let e = [e | e <- c, e > -1]
    let f = sort e
    let g = head f
    let h = solve g 
    print $ h

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

#include<bits/stdc++.h>//万能头文件
using namespace std;
int c[1000001];//字符数组
int main() 
{
    int k;
    cin>>k;//记录初始字符串的字符数量
    for(int i=1;i<=n;i++)cin>>c[i];//读入字符串
    sort(c+1,c+1+k);//去重之前必须排序
    int n=unique(c+1,c+1+k)-c-1;//去重，n记录去重后字符串的字符数量
    n==k ? cout<<"yes"<<endl : cout<<"no"<<endl;//岛国题库输出要换行
    //判断去重后数组里的元素是否减少，没有输出yes，反之输出no，
    return 0;//结束
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: 'n' was not declared in this scope
    8 |     for(int i=1;i<=n;i++)cin>>c[i];//读入字符串
      |                    ^
Language: C++

#include<bits/stdc++.h>//万能头文件
using namespace std;
int c[1000001];//字符数组
int main() 
{
    int k;
    cin>>k//记录初始字符串的字符数量
    for(int i=1;i<=n;i++)cin>>c[i];//读入字符串
    sort(c+1,c+1+k);//去重之前必须排序
    int n=unique(c+1,c+1+k)-c-1;//去重，n记录去重后字符串的字符数量
    n==k ? cout<<"yes"<<endl : cout<<"no"<<endl;//岛国题库输出要换行
    //判断去重后数组里的元素是否减少，没有输出yes，反之输出no，
    return 0;//结束
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: expected ';' before 'for'
    7 |     cin>>k//记录初始字符串的字符数量
      |           ^
      |           ;
    8 |     for(int i=1;i<=n;i++)cin>>c[i];//读入字符串
      |     ~~~    
a.cc:8:17: error: 'i' was not declared in this scope
    8 |     for(int i=1;i<=n;i++)cin>>c[i];//读入字符串
      |                 ^
a.cc:8:20: error: 'n' was not declared in this scope
    8 |     for(int i=1;i<=n;i++)cin>>c[i];//读入字符串
      |                    ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a,x,n;
int main(){
    scanf("%d",&n);
    for(int i=1;i<=n;i++)
    {
        scanf("%d",&a);
        x^=a;
    }
    x==0 ? cout<<"NO"<<endl : cout<<"YES"<<endl
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:48: error: expected ';' before '}' token
   11 |     x==0 ? cout<<"NO"<<endl : cout<<"YES"<<endl
      |                                                ^
      |                                                ;
   12 | }
      | ~
Language: C++

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

int main() {
  int n;
  int k = 0;
  cin >> n;
  vector<int> a = (n);
  for (int i = 0; i < n; i++;) {
    cin >> a.at(i);
  }
  a.sort(a.bigin(), a.end());
  for (int i = 0; i < n; i++) {
    if (a.at(i) == a.at(i + 1)) {
      k++;
      cout << "Yes" << endl;
    }
    if (k > 0) {
      break;
    }
  }
  if (k =< 0) {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
    8 |   vector<int> a = (n);
      |                   ~^~
a.cc:9:29: error: expected ')' before ';' token
    9 |   for (int i = 0; i < n; i++;) {
      |       ~                     ^
      |                             )
a.cc:9:30: error: expected primary-expression before ')' token
    9 |   for (int i = 0; i < n; i++;) {
      |                              ^
a.cc:12:5: error: 'class std::vector<int>' has no member named 'sort'
   12 |   a.sort(a.bigin(), a.end());
      |     ^~~~
a.cc:12:12: error: 'class std::vector<int>' has no member named 'bigin'; did you mean 'begin'?
   12 |   a.sort(a.bigin(), a.end());
      |            ^~~~~
      |            begin
a.cc:22:10: error: expected primary-expression before '<' token
   22 |   if (k =< 0) {
      |          ^
Language: C

#include<stdio.h>
int main()
{
    int a[200000],i,n,j;
	i=0;
	
	scanf("%d", &n);
	for(i=0; i<n;i++){
		
		scanf("%d", &a[i]);
	}
	
	
	do{
		j=0;
		for(i=1; i<n; i++){
			if(a[n-1]>a[n]){
				a[n-1]=a[n-1]+a[n];
				a[n]=a[n-1]-a[n];
				a[n-1]=a[n-1]-a[n];
				j++;
			}
		}
	}(j!=0)
	
	for(i=1; i<n; i++){
		if(a[n-1]=a[n]){
			printf("NO\n");
			
			return 0;
		}
		printf("YES\n");
		return 0;
		
		
		}
}

Compiler output:
main.c: In function 'main':
main.c:24:10: error: expected 'while' before '(' token
   24 |         }(j!=0)
      |          ^
main.c:24:16: error: expected ';' before 'for'
   24 |         }(j!=0)
      |                ^
      |                ;
   25 | 
   26 |         for(i=1; i<n; i++){
      |         ~~~     
main.c:26:26: error: expected ';' before ')' token
   26 |         for(i=1; i<n; i++){
      |                          ^
      |                          ;
main.c:26:26: error: expected statement before ')' token
Language: Java

import java.util.Scanner;
import java.util.HashSet;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    HashSet<Long> set = new HashSet<Long>();
    boolean hantei = true;
    
    for(int i=0; i<N; i++){
      int bSize = set.size();
      Long A = sc.nextLong();
      size.add(A);
      if(set.size == bSize)
        hantei = false;
        break;
    }
    if(hantei == true) System.out.println("YES");
    else System.out.println("NO");
  }
}


Compiler output:
Main.java:13: error: cannot find symbol
      size.add(A);
      ^
  symbol:   variable size
  location: class Main
Main.java:14: error: cannot find symbol
      if(set.size == bSize)
            ^
  symbol:   variable size
  location: variable set of type HashSet<Long>
2 errors
Language: Java

import java.util.Scanner;
import java.util.HashSet;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    Set<Long> set = new HashSet<Long>();
    boolean hantei = true;
    
    for(int i=0; i<N; i++){
      int bSize = set.size();
      Long A = sc.nextLong();
      size.add(A);
      if(set.size == bSize)
        hantei = false;
        break;
    }
    if(hantei == true) System.out.println("YES");
    else System.out.println("NO");
  }
}


Compiler output:
Main.java:7: error: cannot find symbol
    Set<Long> set = new HashSet<Long>();
    ^
  symbol:   class Set
  location: class Main
Main.java:13: error: cannot find symbol
      size.add(A);
      ^
  symbol:   variable size
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
import java.util.Set;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    Set<Long> set = new HashSet<Long>();
    boolean hantei = true;
    
    for(int i=0; i<N; i++){
      int bSize = set.size();
      Long A = sc.nextLong();
      size.add(A);
      if(set.size == bSize)
        hantei = false;
        break;
    }
    if(hantei == true) System.out.println("YES");
    else System.out.println("NO");
  }
}


Compiler output:
Main.java:7: error: cannot find symbol
    Set<Long> set = new HashSet<Long>();
                        ^
  symbol:   class HashSet
  location: class Main
Main.java:13: error: cannot find symbol
      size.add(A);
      ^
  symbol:   variable size
  location: class Main
Main.java:14: error: cannot find symbol
      if(set.size == bSize)
            ^
  symbol:   variable size
  location: variable set of type Set<Long>
3 errors
Language: Java

import java.util.Scanner;
import java.util.Set;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    Set<Long> set = new HashSet<Long>();
    boolean hantei = true;
    
    for(int i=0; i<N; i++){
      int bSize = set.size();
      Long A = sc.nextLong();
      size.add(A);
      if(set.size == bSize)
        boolean = false;
        break;
    }
    if(hantei == true) System.out.println("YES");
    else System.out.println("NO");
  }
}


Compiler output:
Main.java:15: error: not a statement
        boolean = false;
        ^
Main.java:15: error: ';' expected
        boolean = false;
               ^
2 errors
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    long[] A = new long[N];
    boolean hantei = true;
    for(int i=0; i<N; i++){
      A[i] = sc.nextLong();
      for(int j=0; j<i; j++){
      	if(A[i] == A[j]){
        	hantei = false;
            break;
        }	
      }
      if(hantei == false) break;
    }
    if(Hantei == true) System.out.println("YES");
    else System.out.println("NO");
  }
}

Compiler output:
Main.java:18: error: cannot find symbol
    if(Hantei == true) System.out.println("YES");
       ^
  symbol:   variable Hantei
  location: class Main
1 error
Language: Java

public static void main(final String[] args){
        final Scanner sc = new Scanner(System.in);
        
        final int n = sc.nextInt();

        ArrayList<Integer> number = new ArrayList<Integer>();
        boolean res = false;
        int num;
        point:for (int i = 0; i < n; i++) {
            num = sc.nextInt();
            if(!number.isEmpty() && num == number.indexOf(num)){
                res = true;
                System.out.println("NO");
                break point;
            }
            number.add(num);
        }
        if(!res)
            System.out.println("YES");
        sc.close();
    }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(final String[] args){
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include<iostream>
using namespace std;

int main(){

int n, an, i;
cin >> n;
int a[20001];
for (i=0; i < n; i++){
  cin >> an;
  a[i] = an;
}

for (i=0; i < n-1;i++){
  if(a[i] == a[i+1]){
    cout<<"YES";
    return 0;
  }
}

cout<<"NO";
}
}

cout<<"no";
}


Compiler output:
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
a.cc:25:1: error: 'cout' does not name a type
   25 | cout<<"no";
      | ^~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

#include<iostream>
#include<set>
using namespace::std;

int main(){
  int n;
  cin>>n;
  set<int> s;
  for(int i=0,t;i<n;i++)
    cin>>t,s.insert(t);
  if(s.size()==t)
    cout<<"YES\n";
  else cout<<"NO\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 't' was not declared in this scope
   11 |   if(s.size()==t)
      |                ^
Language: C

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

int sort_DP ( int n , int *a , int *flag );
int find_func ( int n , int *a , int *flag );


int main ( void ){
  int n;
  int *a;
  int hoge,piyo;
  int *flag;
  *flag = 0;

  flag  = malloc ( sizeof( int ) );

  scanf_s ("%d",&n);

  a = calloc ( n , sizeof ( int ));
  for ( hoge = 0 ; hoge < n ; hoge++ ){
    scanf_s ("%d",&a[hoge]);
  }

  sort_DP ( n , a , flag );
  find_func ( n , a , flag );
  //
  // printf("ojeigo\n");
  // for ( hoge = 0 ; hoge < n ; hoge++ )
  //   printf("%d\n",a[hoge]);

  if ( *flag == 1 ) printf("NO");
  else printf("YES");
  return 0;
}

int sort_DP ( int n , int *a , int *flag ){
  int *big_a,*small_a;
  int big_n = 0 ;
  int small_n = 0;
  int hoge;

  if ( n <= 1 )
    return 0;

  // for ( hoge = 0 ; hoge < n ; hoge++ )
  //   printf("%d ",a[hoge]);

  big_a = calloc ( n+1 , sizeof ( int ));
  small_a = calloc ( n+1 , sizeof ( int ));


  for ( hoge = 1 ; hoge < n ; hoge++ ){
    if ( a[hoge] == a[0] ){
      *flag = 1;
      return 0;
    }
    else {
      if ( a[hoge] < a[0] ){
        small_a[small_n] = a[hoge];
        small_n++;
      }
      else{
        big_a[big_n] = a[hoge];
        big_n++;
      }
    }
  }

  if ( small_n == 0 ){
    small_a[0] = a[0];
    small_n++;
  }
  else {
    if ( big_n == 0 ){
      big_a[0] = a[0];
      big_n++;
    }
    else {
      big_a[big_n] = a[0];
      big_n++;
    }
  }


  // printf("\n");
  // for ( hoge = 0 ; hoge < small_n ; hoge++ )
  //   printf("%d ",small_a[hoge]);
  // printf("small_n:%d\n",small_n);
  // for ( hoge = 0 ; hoge < big_n ; hoge++ )
  //   printf("%d ",big_a[hoge]);
  // printf("big_n;%d\n",big_n);


  sort_DP ( small_n , small_a , flag );
  sort_DP ( big_n , big_a , flag );


  for ( hoge = 0 ; hoge < small_n ; hoge++ )
    a[hoge] = small_a[hoge];
  for ( hoge = small_n ; hoge < n ; hoge++ )
    a[hoge] = big_a[hoge-small_n];

  free ( big_a );
  free ( small_a );

  return 0;
}
int find_func ( int n , int *a , int *flag ){
  int hoge;
  if ( a[0] == a[1] ){
    *flag = 1;
    return 0;
  }
  else {
    for ( hoge = 1 ; hoge < n-1 ; hoge++ ){
      if ( a[hoge] == a[hoge-1] || a[hoge] == a[hoge+1] ){
        *flag = 1;
        return 0;
      }
    }
  }
  return 0;
}


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

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

int sort_DP ( int n , int *a , int *flag );
int find_func ( int n , int *a , int *flag );


int main ( ){
  int n;
  int *a;
  int hoge,piyo;
  int *flag;
  *flag = 0;

  flag  = malloc ( sizeof( int ) );

  scanf_s ("%d",&n);

  a = calloc ( n , sizeof ( int ));
  for ( hoge = 0 ; hoge < n ; hoge++ ){
    scanf_s ("%d",&a[hoge]);
  }

  sort_DP ( n , a , flag );
  find_func ( n , a , flag );
  //
  // printf("ojeigo\n");
  // for ( hoge = 0 ; hoge < n ; hoge++ )
  //   printf("%d\n",a[hoge]);

  if ( *flag == 1 ) printf("NO");
  else printf("YES");
  return 0;
}

int sort_DP ( int n , int *a , int *flag ){
  int *big_a,*small_a;
  int big_n = 0 ;
  int small_n = 0;
  int hoge;

  if ( n <= 1 )
    return 0;

  // for ( hoge = 0 ; hoge < n ; hoge++ )
  //   printf("%d ",a[hoge]);

  big_a = calloc ( n+1 , sizeof ( int ));
  small_a = calloc ( n+1 , sizeof ( int ));


  for ( hoge = 1 ; hoge < n ; hoge++ ){
    if ( a[hoge] == a[0] ){
      *flag = 1;
      return 0;
    }
    else {
      if ( a[hoge] < a[0] ){
        small_a[small_n] = a[hoge];
        small_n++;
      }
      else{
        big_a[big_n] = a[hoge];
        big_n++;
      }
    }
  }

  if ( small_n == 0 ){
    small_a[0] = a[0];
    small_n++;
  }
  else {
    if ( big_n == 0 ){
      big_a[0] = a[0];
      big_n++;
    }
    else {
      big_a[big_n] = a[0];
      big_n++;
    }
  }


  // printf("\n");
  // for ( hoge = 0 ; hoge < small_n ; hoge++ )
  //   printf("%d ",small_a[hoge]);
  // printf("small_n:%d\n",small_n);
  // for ( hoge = 0 ; hoge < big_n ; hoge++ )
  //   printf("%d ",big_a[hoge]);
  // printf("big_n;%d\n",big_n);


  sort_DP ( small_n , small_a , flag );
  sort_DP ( big_n , big_a , flag );


  for ( hoge = 0 ; hoge < small_n ; hoge++ )
    a[hoge] = small_a[hoge];
  for ( hoge = small_n ; hoge < n ; hoge++ )
    a[hoge] = big_a[hoge-small_n];

  free ( big_a );
  free ( small_a );

  return 0;
}
int find_func ( int n , int *a , int *flag ){
  int hoge;
  if ( a[0] == a[1] ){
    *flag = 1;
    return 0;
  }
  else {
    for ( hoge = 1 ; hoge < n-1 ; hoge++ ){
      if ( a[hoge] == a[hoge-1] || a[hoge] == a[hoge+1] ){
        *flag = 1;
        return 0;
      }
    }
  }
  return 0;
}


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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;


//System.out.println();
public class Main implements Runnable { //クラス名はMain

    public static void main(String[] args) {
    	Thread.setDefaultUncaughtExceptionHandler((t,e)->System.exit(1));
        new Thread(null, new Main(), "", 16 * 1024 * 1024).start(); //16MBスタックを確保して実行
    }

    public void run() {
    	FastScanner sc = new FastScanner(System.in);
        int n = sc.nextInt();
        ArrayList<Long> a = new ArrayList<Long>;
        for(int i=0; i<n; i++) {
        	long an = sc.nextLong();
        	if(a.contains(an)) {
        		System.out.println("NO");
        		break;
        	}
        	a.add(an);
        }
        System.out.println("YES");
    }
}

//高速なScanner
class FastScanner {
	private BufferedReader reader = null;
	private StringTokenizer tokenizer = null;

	public FastScanner(InputStream in) {
		reader = new BufferedReader(new InputStreamReader(in));
		tokenizer = null;
	}

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

	public String nextLine() {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken("\n");
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

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

	public double nextDouble() {
		return Double.parseDouble(next());
	}

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

	public long[] nextLongArray(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nextLong();
		return a;
	}
}


Compiler output:
Main.java:20: error: '(' or '[' expected
        ArrayList<Long> a = new ArrayList<Long>;
                                               ^
1 error
Language: C++

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

#define rep(i, n) for(int i = 0; i < (n); ++i)

int main(){
    int n;
    cin >> n;
    string ans = "YES";
    map<int, int> mp;
    rep(i, 0, n) 
    {
        cin >> ++mp[i];
        if (mp[i] > 1) ans = "NO";
    }
    cout << ans << endl;
}


Compiler output:
a.cc:13:16: error: macro "rep" passed 3 arguments, but takes just 2
   13 |     rep(i, 0, n)
      |                ^
a.cc:6:9: note: macro "rep" defined here
    6 | #define rep(i, n) for(int i = 0; i < (n); ++i)
      |         ^~~
a.cc: In function 'int main()':
a.cc:13:5: error: 'rep' was not declared in this scope
   13 |     rep(i, 0, n)
      |     ^~~
Language: C++

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

#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define FORd(i, a, b) for (int i = (a) ; i >= (b); i--)
#define FORall(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); it++)
#define sz(a) int((a).size())
#define present(t, x) (t.find(x) != t.end())
#define all(a) (a).begin(), (a).end()
#define uni(a) (a).erase(unique(all(a)), (a).end())
#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second
#define sp system("pause")
#define prec(n) fixed<<setprecision(n)
#define bit(n, i) (((n) >> (i)) & 1)
#define bitcount(n) __builtin_popcountll(n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
const int MOD = (int) 1e9 + 7;
const int INF = (int) 1e9;
const ll LINF = (ll) 1e18;
const ld PI = acos((ld) -1);
const ld EPS = 1e-9;
const int N = (int) 2 * 1e5 + 10;
void TimeExecution() {
    cout << "\n\n===>> Time Execution: " << clock() / (double)1000 << " sec(s).";
}
int t;
int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    /*
    #ifndef ONLINE_JUDGE
        freopen("in.txt", "r", stdin);
        freopen("out.txt", "w", stdout);
    #endif
    */
    int n;
    cin >> n;
    FOR(i, 1, n) cin >> a[i];
    bool ok = 1;
    FOR(i, 2, n)
        if(a[i] == a[i - 1])
        {
            ok = 0;
            break;
        }
    if(ok) cout << "YES";
    else cout << "NO";
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:48:25: error: 'a' was not declared in this scope
   48 |     FOR(i, 1, n) cin >> a[i];
      |                         ^
a.cc:51:12: error: 'a' was not declared in this scope
   51 |         if(a[i] == a[i - 1])
      |            ^
Language: C++

#include <iostream>
#include <vector>
#include <array>

using namespace std;

int main() {
    int n;
    cin >> n;
    int a[n];
    
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    
    sort(a, a+n);
    auto end = a+n;
    bool c = (unique(a, end) != end);
    
    cout << (c ? "NO" : "YES") << "\n";
    
    return 0;
}


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, a+n);
      |     ^~~~
      |     short
a.cc:18:15: error: 'unique' was not declared in this scope
   18 |     bool c = (unique(a, end) != end);
      |               ^~~~~~
Language: C++

#include <iostream>
//#include <bits/stdc++.h>
using namespace std;
int a[200000];
int main(int argc, const char * argv[])
{
    int n;
    cin>>n;
    bool found=true;
    for(int i=0;i<n;i++)
        cin>>a[i];
    sort(a, a+n);
    for(int i=1;i<n;i++)
    {
        if(a[i-1]==a[i])
        {
            found=false;
            break;
        }
    }
    if(found)
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    return 0;
}

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

n = int(input())
l = list(map(int, input().split()))
s = set()
for i in l:
    if (i in s):
        print("NO")
        exit(0)
    s.add(i)
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; int x=1e9;
int a[x]={0};
int main(){
 int n; cin>>n;
 for(int i=0;i<n;i++){
   int t; cin>>t; 
   if(a[t]!=0){ cout<<"NO"; return 0;}
   a[t]++;  
 }
 cout<<"YES";

}


Compiler output:
a.cc:3:7: error: size of array 'a' is not an integral constant-expression
    3 | int a[x]={0};
      |       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a[1e9]={0};
int main(){
 int n; cin>>n;
 for(int i=0;i<n;i++){
   int t; cin>>t; 
   if(a[t]!=0){ cout<<"NO"; return 0;}
   a[t]++;  
 }
 cout<<"YES";

}


Compiler output:
a.cc:3:7: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    3 | int a[1e9]={0};
      |       ^~~
a.cc:3:7: error: could not convert '1.0e+9' from 'double' to 'long unsigned int'
    3 | int a[1e9]={0};
      |       ^~~
      |       |
      |       double
a.cc:3:7: error: size of array 'a' has non-integral type 'double'
Language: Java

public class Main  {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        HashSet<Integer> hashSet = new HashSet<>();
        while (n > 0 ) {
            int val = sc.nextInt();
            if(hashSet.contains( val)) {
                System.out.println( "NO");
                return;
            }
            hashSet.add( val );
             n--;
        }

            System.out.println("YES");

    }
}

Compiler output:
Main.java:5: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: cannot find symbol
        HashSet<Integer> hashSet = new HashSet<>();
        ^
  symbol:   class HashSet
  location: class Main
Main.java:7: error: cannot find symbol
        HashSet<Integer> hashSet = new HashSet<>();
                                       ^
  symbol:   class HashSet
  location: class Main
4 errors
Language: C

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

int main(void) {
  int n;
  int a[200000];
  char str_n[7];
  char str_ai[11];
  
  int l;
  int i, j;

  scanf("%s", str_n);
  n = atoi(str_n);
  
  for(i=0; i<n; i++) {
    scanf("%s", str_ai);
    a[i] = atoi(str_ai);
  }
  
  for(i=0; i<n; i++) {
    int temp = a[i]
    for(j=i+1; j<n; j++) {
      if(temp == a[j]) {
        printf("NO\n");
        return 0;
      }
    }
  }
  
  printf("YES\n");
  
  return 0;

}


Compiler output:
main.c: In function 'main':
main.c:25:5: error: expected ',' or ';' before 'for'
   25 |     for(j=i+1; j<n; j++) {
      |     ^~~
main.c:25:24: error: expected ';' before ')' token
   25 |     for(j=i+1; j<n; j++) {
      |                        ^
      |                        ;
main.c:25:24: error: expected statement before ')' token
Language: C++

#include <bits/stdc++.h>

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



    int a[210000];
    int main(){
        int n;
        std::cin >> n;
        rep(i, n) scanf("%d", a+i);
        sort(a, a+n);
        for (int i = 0; i < n-1; ++i)
            {
                if (a[i] == a[i+1])
                {
                    /* code */printf("NO\n")
                    return 0;
                }
            }
        printf("YES\n")
        
        
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:19:45: error: expected ';' before 'return'
   19 |                     /* code */printf("NO\n")
      |                                             ^
      |                                             ;
   20 |                     return 0;
      |                     ~~~~~~                   
a.cc:23:24: error: expected ';' before '}' token
   23 |         printf("YES\n")
      |                        ^
      |                        ;
......
   26 |     }
      |     ~
Language: C++

#include <bits/stdc++.h>

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



    int a[210000];
    int main(){
        int n;
        std::cin >> n;
        rep(i, n) scanf("%d", a+i)
        sort(a, a+n);
        for (int i = 0; i < n-1; ++i)
            {
                if (a[i] == a[i+1])
                {
                    /* code */printf("NO\n", )
                    return 0;
                }
            }
        printf("YES\n", )
        
        
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:13:35: error: expected ';' before 'sort'
   13 |         rep(i, n) scanf("%d", a+i)
      |                                   ^
      |                                   ;
   14 |         sort(a, a+n);
      |         ~~~~                       
a.cc:19:46: error: expected primary-expression before ')' token
   19 |                     /* code */printf("NO\n", )
      |                                              ^
a.cc:23:25: error: expected primary-expression before ')' token
   23 |         printf("YES\n", )
      |                         ^
Language: C++

#include <stdio.h>
2 #include <algorithm>
3 using namespace std;
4 int A[210000];
5 int main(){
6 int N;scanf("%d",&N);
7 for(int i=0;i<N;i++)scanf("%d",A+i);
8 std::sort(A,A+N);
9 for(int i=0;i<N-1;i++){
10 if(A[i]==A[i+1]){
11 printf("NO\n");return 0;
12 }
13 }
14 printf("YES\n");
15 }

Compiler output:
a.cc:2:3: error: stray '#' in program
    2 | 2 #include <algorithm>
      |   ^
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2 #include <algorithm>
      | ^
a.cc:4:1: error: expected unqualified-id before numeric constant
    4 | 4 int A[210000];
      | ^
a.cc:5:1: error: expected unqualified-id before numeric constant
    5 | 5 int main(){
      | ^
Language: C++

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



    int a[210000];
    int main(){
        int n;
        std::cin >> n;
        rep(i, n) scanf("%d", a+i);
        sort(a, a+n);
        for (int i = 0; i < n-1; ++i)
            {
                if (a[i] == a[i+1])
                {
                    /* code */printf("NO\n", );
                    return 0;
                }
            }
        printf("YES\n", );
        
        
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:18:46: error: expected primary-expression before ')' token
   18 |                     /* code */printf("NO\n", );
      |                                              ^
a.cc:22:25: error: expected primary-expression before ')' token
   22 |         printf("YES\n", );
      |                         ^
Language: C++

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



    int a[210000];
    int main(){
        int n;
        std::cin >> n;
        rep(i, n) scanf("%d\n", a+i );
        sort(a, a+n);
        for (int i = 0; i < n-1; ++i)
            {
                if (a[i] == a[i+1])
                {
                    /* code */printf("NO\n", );
                    return 0;
                }
            }
        printf("YES\n", );
        
        
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:18:46: error: expected primary-expression before ')' token
   18 |                     /* code */printf("NO\n", );
      |                                              ^
a.cc:22:25: error: expected primary-expression before ')' token
   22 |         printf("YES\n", );
      |                         ^
Language: C++

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

int main()
{
  int n,count=0;
  cin>>n;
  int arr[n];
  for(int i=0;i<n;i++)
    cin>>arr[i];
  sort(arr,arr+n);
  for(int i=0;i<n-1;i++)
  {
    if(arr[i]==arr[i+1]){
      count=1;
    break;
    }
  }
  if(count==1)
    cout<<"NO"<<endl;
  else
    cout<<"YES<<endl;
    
    return 0;
}

Compiler output:
a.cc:22:11: warning: missing terminating " character
   22 |     cout<<"YES<<endl;
      |           ^
a.cc:22:11: error: missing terminating " character
   22 |     cout<<"YES<<endl;
      |           ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:24:5: error: expected primary-expression before 'return'
   24 |     return 0;
      |     ^~~~~~
Language: C++

#include<bits/stdc++.h>
int main(){
  long long int n;
  cin>>n;
  vector<long long int>v(n);
  map<long long int,int>mp;
  for(int i=0;i<n;i++){
    cin>>v[i];
    mp[v[i]]++;
  }
  if(mp.size()==n){
    cout<<"YES\n";}
  else{
  cout<<"NO\n";
  }
 return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>n;
      |   ^~~
      |   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:5:3: error: 'vector' was not declared in this scope
    5 |   vector<long long int>v(n);
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:5:10: error: expected primary-expression before 'long'
    5 |   vector<long long int>v(n);
      |          ^~~~
a.cc:6:3: error: 'map' was not declared in this scope
    6 |   map<long long int,int>mp;
      |   ^~~
a.cc:6:3: note: suggested alternatives:
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152:
/usr/include/c++/14/bits/stl_map.h:102:11: note:   'std::map'
  102 |     class map
      |           ^~~
/usr/include/c++/14/map:89:13: note:   'std::pmr::map'
   89 |       using map
      |             ^~~
a.cc:6:7: error: expected primary-expression before 'long'
    6 |   map<long long int,int>mp;
      |       ^~~~
a.cc:8:10: error: 'v' was not declared in this scope
    8 |     cin>>v[i];
      |          ^
a.cc:9:5: error: 'mp' was not declared in this scope
    9 |     mp[v[i]]++;
      |     ^~
a.cc:11:6: error: 'mp' was not declared in this scope
   11 |   if(mp.size()==n){
      |      ^~
a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     cout<<"YES\n";}
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |   cout<<"NO\n";
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

int main()
{
	int n;
	cin >> n;
	vector<int> a(n);
	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}

	bool flag = false;
	for (int i = 0; i < n; i++) {
		for (int j = i+1; j < n; j++) {
			cout << a[i] << " " << a[j] << endl;
			if (a[i] == a[j]) {
				flag = true;
				cout << flag << endl;
				break;
			}
		}
		if (flag == true) {
			break;
		}
	}

	if (flag) {
		cout << "NO" << endl;
	}
	else {
		cout << "YES" << endl;
	}

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

#include<bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
using namespace std;
int main()
{
  ll n;
  cin>>n;
  set<ll>s;
  for(ll i=0;i<n;i++)
  {
    ll x;
    cin>>x;
    s.insert(x);
  }
  if(s.size()==n)
  {
    cout<<"YES"<<'\n';
  }
  else
  {
    cout<<"NO"<<'\n';
  }
  return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:25:12: error: expected '}' at end of input
   25 |   return 0;
      |            ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: C

#include <stdio.h>
 
int cmp(void *a, void *b){
  return (int*)*a - (int*)*b;
}
 
int main(){
  int N, A[200001];
  scanf("%d", &N);
  for(int i=0; i<N; i++){
    scanf("%d", &A[i]);
  }
  
  qsort(A,N,sizeof(int),cmp);
  
  for(int i=0; i<N-1; i++){
    if(A[i]==A[i+1]){
      printf("NO");
      return 0;
    }
  }
  printf("YES");
  return 0;
  
}

Compiler output:
main.c: In function 'cmp':
main.c:4:16: warning: dereferencing 'void *' pointer
    4 |   return (int*)*a - (int*)*b;
      |                ^~
main.c:4:10: error: invalid use of void expression
    4 |   return (int*)*a - (int*)*b;
      |          ^
main.c:4:27: warning: dereferencing 'void *' pointer
    4 |   return (int*)*a - (int*)*b;
      |                           ^~
main.c:4:21: error: invalid use of void expression
    4 |   return (int*)*a - (int*)*b;
      |                     ^
main.c: In function 'main':
main.c:14:3: error: implicit declaration of function 'qsort' [-Wimplicit-function-declaration]
   14 |   qsort(A,N,sizeof(int),cmp);
      |   ^~~~~