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

import java.util.HashMap; 
public class UniqueInArray2 { 
  
    public static void main(String args[]) 
  
    { 
        int ar[] = { 10, 5, 3, 4, 3, 5, 6 }; 
        HashMap<Integer,Integer> hm = new HashMap<Integer,Integer>(); 
        for (int i = 0; i < ar.length; i++) { 
            hm.put(ar[i], i); 
        } 
        // Using hm.keySet() to print output reduces time complexity. - Lokesh 
        System.out.println(hm.keySet()); 
  
    } 
  
} 

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

#include <iostream>
#include <vector>

using namespace std;

int main(){
  int N;
  vector<int> A;

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

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

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

int main(){
  int n;
  int a[2000000];
  scanf("%d",&n)
    for(int i=0;i<n;i++){
      scanf("%d",&a[i]);
    }
  for(int i=0;i<n-1;i++){
    for(int j=i+1;j<n;i++){
      if(a[j]==a[i]){
        printf("No");
        return 0;
      }
    }
  }
  printf("Yes");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:17: error: expected ';' before 'for'
    7 |   scanf("%d",&n)
      |                 ^
      |                 ;
    8 |     for(int i=0;i<n;i++){
      |     ~~~
Language: C++

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

int main(){
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  vector <int> a(n);
  for (int i = 0;i < n; ++i){
	cin >> a[i];
  }
  sort(a.begin(),a.end());
  bool a = true;
  for (int i = 1; i < n; ++i){
	if(a[i] == a[i-1]){
		a = false;
		break;
	}	
  }
  (a) ? cout << "Yes\n" : cout << "No\n";
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: conflicting declaration 'bool a'
   14 |   bool a = true;
      |        ^
a.cc:9:16: note: previous declaration as 'std::vector<int> a'
    9 |   vector <int> a(n);
      |                ^
a.cc:17:21: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'bool')
   17 |                 a = false;
      |                     ^~~~~
In file included from /usr/include/c++/14/vector:72,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
  210 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note:   no known conversion for argument 1 from 'bool' to 'const std::vector<int>&'
  211 |     operator=(const vector<_Tp, _Alloc>& __x)
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66:
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note:   no known conversion for argument 1 from 'bool' to 'std::vector<int>&&'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |                 ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]'
  788 |       operator=(initializer_list<value_type> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   no known conversion for argument 1 from 'bool' to 'std::initializer_list<int>'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:21:4: error: could not convert 'a' from 'std::vector<int>' to 'bool'
   21 |   (a) ? cout << "Yes\n" : cout << "No\n";
      |   ~^~
      |    |
      |    std::vector<int>
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());
    
    bool exist = false;
    
    for ( int i = 0; i < N-1; ++i){
        if ( A.at(i) == A.at(i+1) ){
            exist = true;
        }
    }
    
    if ( exist ){
        cout << "NO" << endl;
    } else {
        cout << "YES" << endl;
    }
    
    return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int INF = 1e9;
const int MOD = 1e9 + 7;

int main(){
  map<int int> check;
  int N, a;
  cin >> N;
  rep(i, N){
    cin >> a;
    check[a]++;
  }
  bool ans = true;
  rep(i, check.size()){
    if(check.at(i) > 1){
      ans = false;
      break;
    }
    if(ans)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: two or more data types in declaration of 'type name'
    9 |   map<int int> check;
      |       ^~~
a.cc:9:14: error: wrong number of template arguments (1, should be at least 2)
    9 |   map<int int> check;
      |              ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:14:10: error: invalid types 'int[int]' for array subscript
   14 |     check[a]++;
      |          ^
a.cc:17:16: error: request for member 'size' in 'check', which is of non-class type 'int'
   17 |   rep(i, check.size()){
      |                ^~~~
a.cc:4:45: note: in definition of macro 'rep'
    4 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                             ^
a.cc:18:14: error: request for member 'at' in 'check', which is of non-class type 'int'
   18 |     if(check.at(i) > 1){
      |              ^~
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  ll n; cin >> n;
  map<ll,ll> ma;
  bool ok = true;
  for(ll i=0 ; i<n ; i++){
    ll x; cin >> x;
    if(ma.count(x)){
      ok = false;
    }else{
      ma[x]++;
    }
  }
  if(!ok){
    cout << "No" ;
  }else{
    cout << "Yes" ;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'll' was not declared in this scope
    4 |   ll n; cin >> n;
      |   ^~
a.cc:4:16: error: 'n' was not declared in this scope; did you mean 'yn'?
    4 |   ll n; cin >> n;
      |                ^
      |                yn
a.cc:5:12: error: template argument 3 is invalid
    5 |   map<ll,ll> ma;
      |            ^
a.cc:5:12: error: template argument 4 is invalid
a.cc:7:9: error: expected ';' before 'i'
    7 |   for(ll i=0 ; i<n ; i++){
      |         ^~
      |         ;
a.cc:7:16: error: 'i' was not declared in this scope
    7 |   for(ll i=0 ; i<n ; i++){
      |                ^
a.cc:8:7: error: expected ';' before 'x'
    8 |     ll x; cin >> x;
      |       ^~
      |       ;
a.cc:8:18: error: 'x' was not declared in this scope
    8 |     ll x; cin >> x;
      |                  ^
a.cc:9:11: error: request for member 'count' in 'ma', which is of non-class type 'int'
    9 |     if(ma.count(x)){
      |           ^~~~~
Language: C++

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

int arr[200005];
int main(){
  int N;
  cin >> N;
  for (int i=0; i<N; i++){
  	scanf("%d", &arr[i]);
  }
  sort(arr, arr+N);
  for (int i=1; i<N; i++){
  	if (arr[i] == arr[i-1]) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}

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

import sys
read = sys.stdin.buffer.read 
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines 

N,*A = map(int,read().split())

bl = len(set(A)) == N
answer = 'YES' if bl else 'NO'
print(answer)

Compiler output:
a.cc:9:10: warning: multi-character character constant [-Wmultichar]
    9 | answer = 'YES' if bl else 'NO'
      |          ^~~~~
a.cc:9:27: warning: multi-character character constant [-Wmultichar]
    9 | answer = 'YES' if bl else 'NO'
      |                           ^~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long  
#define pb push_back 
#define mod 1e9+7

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



Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: expected initializer before 'cin'
   10 |             cin>>n;
      |             ^~~
a.cc:12:17: error: 'n' was not declared in this scope
   12 |   for(ll i=0; i<n; i++)
      |                 ^
a.cc:18:19: error: 'n' was not declared in this scope
   18 |      if(s.size()==n)
      |                   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
   int n;
   cin >> n;
   vector<int>a(n);
   int count =0;
   for(int i=0;i<n;i++){
       cin >> a[i]
       for(int r=0;r<i;r++){
           if(a[i]==a[r])
           count++;
       }
   }
   if(count>0)
   cout <<"YES";
   else
   cout << "NO";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected ';' before 'for'
    9 |        cin >> a[i]
      |                   ^
      |                   ;
   10 |        for(int r=0;r<i;r++){
      |        ~~~         
a.cc:10:20: error: 'r' was not declared in this scope
   10 |        for(int r=0;r<i;r++){
      |                    ^
Language: Java

package beginner154;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class C {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String[] line = br.readLine().split(" ");
		br.close();
		List<Integer> nums = new ArrayList<Integer>();
		for(int i=0;i<n;i++) {
			nums.add(Integer.parseInt(line[i]));
		}
		Collections.sort(nums);
		
		boolean flg = false;
		for(int i=0;i<n-1;i++) {
			if(nums.get(i).equals(nums.get(i+1))) {
				flg = true;
				break;
			}
		}
		if(flg) {
			System.out.println("NO");
		}else {
			System.out.println("YES");
		}

	}

}


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

#include<iostream>
#include<vector>
#include<algorithm>
#include<fstream>
#include<utility>
#include<string>
#include<iomanip>
#include<queue> 
#include<cmath>
#include<utility>
#include<set>
using namespace std;
int main()
{
  ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  int n, x;
  cin >> n,
  set<int>s;
  for(int i = 0; i < n; i++)
  {
    cin >> x;
    s.insert(x);
  }
  if(s.size()==n)
    cout << "YES\n";
  else
    cout << "NO\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: expected primary-expression before 's'
   18 |   set<int>s;
      |           ^
a.cc:22:5: error: 's' was not declared in this scope
   22 |     s.insert(x);
      |     ^
a.cc:24:6: error: 's' was not declared in this scope
   24 |   if(s.size()==n)
      |      ^
Language: Java

import java.util.HashMap;
import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
 
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		String anser = "YES";
 
		HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
 
		for (int i = 0; i < N; i++) {
			map.put(scan.nextInt(), i);
		}
 
		for (int i = 0; i < N; i++) {
			int size = map.size();
          	int a = 0;
         	while(a != null){
				a = map.remove(map.get(i));
            }
 
			if (size - 1 > map.size()) {
				anser = "NO";
				break;
			}
		}
		System.out.println(anser);
	}
 
}

Compiler output:
Main.java:20: error: bad operand types for binary operator '!='
         	while(a != null){
         	        ^
  first type:  int
  second type: <null>
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll= long long;
using vi= vector<int>;
using vvi= vector<vi>;
using vd= vector<double>;
using vvd= vector<vd>;
using vc= vector<char>;
using vb= vector<bool>;
using vl= vector<ll>;
using vs= vector<string>;
#define rep(i,x,n) for(int i=x; i<n; i++)
#define all(x) x.begin(), x.end()

int main(){
  int n;
  bool ans=0;
  cin >> n;
  vi[n];
  rep(i,0,n){
    cin >> a[i];
  }
  sort(all(a));
  rep(i,1,n){
    if(a[i]==a[i-1]){
      ans=1;
    }
  }
  if(ans){
    cout << "NO" << endl;
  }else{
    cout << "YES" << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: structured binding declaration cannot have type 'vi' {aka 'std::vector<int>'}
   19 |   vi[n];
      |     ^~~
a.cc:19:5: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:19:6: error: conflicting declaration 'auto n'
   19 |   vi[n];
      |      ^
a.cc:16:7: note: previous declaration as 'int n'
   16 |   int n;
      |       ^
a.cc:19:8: error: expected initializer before ';' token
   19 |   vi[n];
      |        ^
a.cc:21:12: error: 'a' was not declared in this scope
   21 |     cin >> a[i];
      |            ^
a.cc:23:12: error: 'a' was not declared in this scope
   23 |   sort(all(a));
      |            ^
a.cc:13:16: note: in definition of macro 'all'
   13 | #define all(x) x.begin(), x.end()
      |                ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'for'
    8 |     for(int i=0;i<n;i++){
      |     ^~~
a.cc:8:17: error: 'i' was not declared in this scope
    8 |     for(int i=0;i<n;i++){
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
  vector<int>a(n);
  string ans="NO"
    for(int i=0;i<n;i++){
      cin>>a[i];
    }
  sort(a.begin(),a.end());
 for(int i=0;i<n;i++){
  if(a[i]==a[i++]){
    cout<<"NO"<<endl;
    break;
  }
 }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'for'
    8 |     for(int i=0;i<n;i++){
      |     ^~~
a.cc:8:17: error: 'i' was not declared in this scope
    8 |     for(int i=0;i<n;i++){
      |                 ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
using namespace std;
int main()
 {  ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
	//int t; 
      // / cin>>t;
       // /while(t--){
        int n,flag=1;
        cin>>n;
        int a[n];
        for(int i=0;i<n;i++){
            cin>>a[i];
            m[a[i]]++;
        }
        unordered_map<int,int>m;
        for(int i=0;i<n;i++){
            if(m[a[i]]>0) {flag=0;break;}
        }
        cout<<((flag)?"YES\n":"NO\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'm' was not declared in this scope
   16 |             m[a[i]]++;
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  vector<int> num(N);
  for(int i=0; i<n; i++){
    cin>>num.at(i);
  }
  sort(num.begin(),num.end());
  bool flag=0;
  for(int i=0; i<n-1; i++){
    if(num.at(i)==num.at(i+1)){
      flag=1;
      break;
    }
  }
  if(flag){
    cout<<"NO"<<endl;
  }else{
    cout<<"YES"<<endl;
  }
  return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  vector<int> num(n);
  for(int i=0; i<n; i++){
    cin>>num.at(i);
  }
  sort(num.begin(),num.end());
  bool flag=0;
  for(int i=0; i<n-1; i++){
    if(num.at(i)==num.at(i+1)){
      flag=1;
      break;
    }
  }
  if(flag){
    cout<<"NO"<<endl;
  }else{
    cout<<"YES"<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: 'n' was not declared in this scope
    6 |   vector<int> num(n);
      |                   ^
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]
    }
    sort(A.begin(), A.end());
    string ans = "Yes";
    for(int i = 0; i < N - 1; i++){
        if(A[i] == A[i + 1]){
            ans = "No";
        }
    }

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: expected ';' before '}' token
    9 |         cin >> A[i]
      |                    ^
      |                    ;
   10 |     }
      |     ~
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main(){
  int n,a,i,j,cnt=0;
  cin >> n;
  vector<int>a(n);
  for(i=0; i<n; i++){
    cin >> a.at(i);
  }
  for(i=0; i<n; i++){
    for(j=i+1; j<n; j++){
      if(a.at(i)==a.at(j)){
        cnt++;
        break;
      }
    }
  }
  if(cnt>0){
    cout << "NO" << endl;
  }
  else{
    cout << "YES" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: conflicting declaration 'std::vector<int> a'
    7 |   vector<int>a(n);
      |              ^
a.cc:5:9: note: previous declaration as 'int a'
    5 |   int n,a,i,j,cnt=0;
      |         ^
a.cc:9:14: error: request for member 'at' in 'a', which is of non-class type 'int'
    9 |     cin >> a.at(i);
      |              ^~
a.cc:13:12: error: request for member 'at' in 'a', which is of non-class type 'int'
   13 |       if(a.at(i)==a.at(j)){
      |            ^~
a.cc:13:21: error: request for member 'at' in 'a', which is of non-class type 'int'
   13 |       if(a.at(i)==a.at(j)){
      |                     ^~
Language: C++

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

int main(){
  int n; cin >> n;
  vector<int> a;
  for(int i=0; i<n; ++i){
    int x; cin >> x;
    auto itr = a.find(a.begin(), a.end(), x);
    if(itr != a.end()){
      cout << "No" << endl;
      return 0;
    }
    a.push_back(x);
  }
  cout << "Yes" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: 'class std::vector<int>' has no member named 'find'
    9 |     auto itr = a.find(a.begin(), a.end(), x);
      |                  ^~~~
Language: Java

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	
	static boolean flg = false;
	private static final String YES = "YES";
	private static final String NO = "NO";

	public static void main(String[] args) {
		
		Scanner scanner = new Scanner(System.in);
		int digits = scanner.nextInt();
		
		List<Integer> numberLists = new ArrayList<Integer>();
		
		for (int i = 0; i < digits; i++) {
			int number = scanner.nextInt();
			numberLists.add(number);
		}
		scanner.close();
		for (int i = 0; i < numberLists.size(); i++) {
			for (int j = 0; j < numberLists.size(); j++) {
				if (i != j && numberLists.get(i) == numberLists.get(j)) {
					flg = true;
					break;
				}
			}
		}
		if (flg) {
			System.out.println(NO);
		}else {
			System.out.println(YES);
		}
	}

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

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

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

    }
    
    cout << "YES" << endl;;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: expected ';' before 'i'
   11 |     for (int i = 0 i < n; i++) {
      |                   ^~
      |                   ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define DEBUG 0
#define nl          '\n'
#define fori(n)			for(int i = 0; i < n; ++i) 
#define forj(n)			for(int j = 0; j < n; ++j)
#define fork(n)			for(int k = 0; k < n; ++k)
#define forl(n)			for(int l = 0; l < n; ++l)
#define pq priority_queue
#define umap unordered_map
#define uset unordered_set
#define ppb push_back
typedef long long ll;typedef pair<int,int> pii;typedef vector<bool> vbool;
typedef vector<int> vint;typedef vector<ll> vll;typedef long double ld;
typedef vector<vector<int>> vvi; typedef vector<vbool> vvb;

const ll N = 100010;
const ll INF = 0x3f3f3f3f;
const ll MOD = 1e9 + 7;

int main() {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int n; cin >> n;
	vint a(n); cin >> a[i];
	sort(a.begin(), a.end());
	for(int i= 1; i < n; i++) {
		if (a[i] == a[i-1]) {
			cout << "No" << nl; return 0;
		}
	}
	cout << "Yes" << nl;
	
	#if DEBUG
	cerr << "Time: " << (ld)clock() / CLOCKS_PER_SEC << " s" << nl;
	#endif
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:29: error: 'i' was not declared in this scope
   24 |         vint a(n); cin >> a[i];
      |                             ^
Language: C++

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

int main() {
long long n;
cin >> n;
set <long long>a;
long long s[n]
for(int i=0;i++;i<n){
    a.insert(s[n]);
}
if(a.size()==n)cout << "YES";
else cout << "NO";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: expected initializer before 'for'
    9 | for(int i=0;i++;i<n){
      | ^~~
a.cc:9:13: error: 'i' was not declared in this scope
    9 | for(int i=0;i++;i<n){
      |             ^
Language: C++

/**
     **author : _KMS_
     **created : 05-03-2020
**/
#include<bits/stdc++.h>
using namespace std;
const long long M =6e5,MOD=2e9;
typedef long long ll;
set<int>st;
int main() {
      
   ios::sync_with_stdio(false);
   cin.tie(0);
    int n;
  cin>>n;'
  for(int i=0;i<n;i++)
  {int a;cin>>a;st.insert(a);}
  ((int)st.size()==n)?puts("YES"):puts("NO");
               
               
   return 0;
}


Compiler output:
a.cc:15:10: warning: missing terminating ' character
   15 |   cin>>n;'
      |          ^
a.cc:15:10: error: missing terminating ' character
Language: C++

#include <cstdio>
#include <iostream>
#include <set>
using namespace std;
int main(){
    set<int> s;
    int n,m;
    cin >> n;
    for(int i=0;i<n;i++){
        cin >> m;
        s.insert(m);
    }
    if(s.size()==n)cout <<Yes<<endl;
  else cout << No<<endl;
  return 0;
  

}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:27: error: 'Yes' was not declared in this scope
   13 |     if(s.size()==n)cout <<Yes<<endl;
      |                           ^~~
a.cc:14:16: error: 'No' was not declared in this scope
   14 |   else cout << No<<endl;
      |                ^~
Language: C++

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

int main() {
	int n;
	cin >> n;
	map<int,int> mp;
	for(int i=0;i<n;i++){
	    int a;
	    cin >> a;
	    mp[a]++;
	    if(mp[a]>1){
	      //  cout << "NO";
	        flag=1;
	    }
	}
	if(flag==1)
	    cout << "NO" << endl;
	else    
	cout << "YES" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'flag' was not declared in this scope
   14 |                 flag=1;
      |                 ^~~~
a.cc:17:12: error: 'flag' was not declared in this scope
   17 |         if(flag==1)
      |            ^~~~
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 a;
	    cin >> a;
	    mp[a]++;
	    if(mp[a]>1){
	      //  cout << "NO";
	        flag=1;
	    }
	}
	if(flag==1)
	    cout << "NO" << endl;
	else    
	cout << "Yes" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'map' was not declared in this scope
    7 |         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 | using namespace std;
a.cc:7:13: error: expected primary-expression before 'int'
    7 |         map<int,int> mp;
      |             ^~~
a.cc:11:13: error: 'mp' was not declared in this scope
   11 |             mp[a]++;
      |             ^~
a.cc:14:17: error: 'flag' was not declared in this scope
   14 |                 flag=1;
      |                 ^~~~
a.cc:17:12: error: 'flag' was not declared in this scope
   17 |         if(flag==1)
      |            ^~~~
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 a;
	    cin >> a;
	    mp[a]++;
	    if(mp[a]>1){
	        cout << "NO";
	        exit(0);
	    }
	}
	cout << "YES" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'map' was not declared in this scope
    7 |         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 | using namespace std;
a.cc:7:13: error: expected primary-expression before 'int'
    7 |         map<int,int> mp;
      |             ^~~
a.cc:11:13: error: 'mp' was not declared in this scope
   11 |             mp[a]++;
      |             ^~
Language: C++

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

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

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

int main(){
  int N; cin >> N;
  vector<int> A(N + 2);
  for(int i = 1; i <= N; i++){
    cin >> A[i];
  }
  A[N + 1] = -1;
  sort(A.begin, A.end());
  bool ans = true;
  for(int i = 1; i <= N; i++){
    if(A[i] == A[i + 1]) ans = false;
  }
  if(ans) cout << "YES" << endl;
  else cout << "NO" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: no matching function for call to 'sort(<unresolved overloaded function type>, std::vector<int>::iterator)'
   11 |   sort(A.begin, A.end());
      |   ~~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<int*, vector<int> >]'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:32: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to '__gnu_cxx::__normal_iterator<int*, std::vector<int> >'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |          ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 2 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 2 provided
Language: C++

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

int main(){
 int n;
 cin >> n;
  
 vector<int> a(n);
 rep(i,n) cin >> a[i];
 set<int> s;
 rep(i,n) s.insert(a[i]);
 if(s.size() == n) cout << "YES" << endl;
  else cout << "NO" << endl;
}


Compiler output:
a.cc:2:2: error: invalid preprocessing directive #rep
    2 | #rep(i,n) for (int i = 0; i < (n); i++)
      |  ^~~
a.cc: In function 'int main()':
a.cc:10:6: error: 'i' was not declared in this scope
   10 |  rep(i,n) cin >> a[i];
      |      ^
a.cc:10:2: error: 'rep' was not declared in this scope
   10 |  rep(i,n) cin >> a[i];
      |  ^~~
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
struct Fast { Fast() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(20);} } fast;

long long mod = 1000000007;



int main() {
  	long long N;
  	cin >> N;
  	vector<long long> A;
  	for(long long = i; i<N i++){
      cin >> A[i];
    }
  	map<long,long> uss;
  	for(long long i; i<N; i++){
    	uss[(A[i])]++;
	}
  	for(long long i; i<N; i++){
      if (uss[(A[i])]>=2){
        cout << "NO" << endl;
        return 0;
      }
    }
  	cout << "YES" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: expected unqualified-id before '=' token
   14 |         for(long long = i; i<N i++){
      |                       ^
a.cc:14:22: error: expected ';' before '=' token
   14 |         for(long long = i; i<N i++){
      |                      ^~
      |                      ;
a.cc:14:23: error: expected primary-expression before '=' token
   14 |         for(long long = i; i<N i++){
      |                       ^
a.cc:14:25: error: 'i' was not declared in this scope
   14 |         for(long long = i; i<N i++){
      |                         ^
a.cc:14:31: error: expected ')' before 'i'
   14 |         for(long long = i; i<N i++){
      |            ~                  ^~
      |                               )
Language: C++

v#include "bits/stdc++.h"
using namespace std;
#define all(v) (v).begin(), (v).end()
#define io ios::sync_with_stdio(0)
#define rep(i, a, b) for (int i = a; i <= b; i++)
#define rson rt << 1 | 1, mid + 1, r
#define lson rt << 1, l, mid
#define lll __int128
#define pii pair<int, int>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define int long long
const int mod = 1e9 + 7;
inline int ksm(int a, int b)
{
	int ans = 1;
	for (; b; b >>= 1, a = a * a % mod)
		if (b & 1)
			ans = ans * a % mod;
	return ans;
}

signed main()
{
	io;
	int n;
	int f = 1;
	cin >> n;
	map<int, int> Mp;
	rep(i, 1, n)
	{
		int x;
		cin >> x;
		f &= !Mp[x];
		Mp[x] = 1;
	}
	f ? puts("YES") : puts("NO");

	getchar(); //
	getchar();
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include "bits/stdc++.h"
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include "bits/stdc++.h"
      | ^
a.cc: In function 'int main()':
a.cc:4:12: error: 'ios' has not been declared
    4 | #define io ios::sync_with_stdio(0)
      |            ^~~
a.cc:27:9: note: in expansion of macro 'io'
   27 |         io;
      |         ^~
a.cc:30:9: error: 'cin' was not declared in this scope
   30 |         cin >> n;
      |         ^~~
a.cc:31:9: error: 'map' was not declared in this scope; did you mean 'mp'?
   31 |         map<int, int> Mp;
      |         ^~~
      |         mp
a.cc:14:13: error: expected primary-expression before 'long'
   14 | #define int long long
      |             ^~~~
a.cc:31:13: note: in expansion of macro 'int'
   31 |         map<int, int> Mp;
      |             ^~~
a.cc:36:23: error: 'Mp' was not declared in this scope; did you mean 'mp'?
   36 |                 f &= !Mp[x];
      |                       ^~
      |                       mp
a.cc:39:13: error: 'puts' was not declared in this scope
   39 |         f ? puts("YES") : puts("NO");
      |             ^~~~
a.cc:41:9: error: 'getchar' was not declared in this scope
   41 |         getchar(); //
      |         ^~~~~~~
a.cc:1:1: note: 'getchar' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | v#include "bits/stdc++.h"
Language: C++

clude<bits/stdc++.h>
using namespace std;
int main()
{
  int N,K,i;
  double max,mae,ato;
  
  cin >> N >> K;
  vector<double> p(N);
  max=0;
  mae=0;
  ato=0;
   for(i=0;i<N;i++)
  {
    cin >> p.at(i);
  }
  for(i=0;i<K;i++)
  {
    mae=mae+(p.at(i)+1)/2;
  } 
 // max=mae;
  cout << mae << endl;
  for(i=0;i<N-K;i++)
  {
    mae=mae+(p.at(i+K)-p.at(i))/2;
   // cout << mae << max << endl;
    
    if(max<=mae)
    {
      max=mae;
    }
  }
  cout << max << endl;
}

  

Compiler output:
a.cc:1:1: error: 'clude' does not name a type
    1 | clude<bits/stdc++.h>
      | ^~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin >> N >> K;
      |   ^~~
a.cc:9:3: error: 'vector' was not declared in this scope
    9 |   vector<double> p(N);
      |   ^~~~~~
a.cc:9:10: error: expected primary-expression before 'double'
    9 |   vector<double> p(N);
      |          ^~~~~~
a.cc:15:12: error: 'p' was not declared in this scope
   15 |     cin >> p.at(i);
      |            ^
a.cc:19:14: error: 'p' was not declared in this scope
   19 |     mae=mae+(p.at(i)+1)/2;
      |              ^
a.cc:22:3: error: 'cout' was not declared in this scope
   22 |   cout << mae << endl;
      |   ^~~~
a.cc:22:18: error: 'endl' was not declared in this scope
   22 |   cout << mae << endl;
      |                  ^~~~
a.cc:25:14: error: 'p' was not declared in this scope
   25 |     mae=mae+(p.at(i+K)-p.at(i))/2;
      |              ^
Language: C++

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

int main() {
    int N;
    set<int> A;
    if (A.size == N) {
        cout << "YES" << endl;
    } else {
        cout << "NO" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: invalid use of member function 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::size() const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?)
    7 |     if (A.size == N) {
      |         ~~^~~~
      |               ()
Language: C

#include <stdio.h>

int med3(int x, int y, int z){
	if(x<y){
		if(y<z){
			return y;
		}
		else if(z<x){
			return x;
		}
		else{
			return z;
		}
	}
	else{
		if(x<z){
			return x;
		}
		else if(z<y){
			return y;
		}
		else{
			return z;
		}
	}
}

void sort(int a[], int left, int right){
	if(left<right){
		int i=left, j=right;
		int pivot=med3(a[i], a[i+(j-i)/2], a[j]);
		int temp;
		while(1){
			while(a[i]<pivot){
				i++;
			}
			while(pivot<a[j]){
				j--;
			}
			if(i>=j){
				break;
			}
			temp=a[i];
			a[i]=a[j];
			a[j]=temp;
			
			i++;
			j--;
		}
		sort(a, left, i-1);
		sort(a, j+1, right);
	}

}

int main(void){
	int a[210000], n, k, j, i;
	
	scanf("%d", &n);
	
	for(i=0; i<n; i++){
		scanf("%d", &a[i]);
	}
	
	sort(a, 0, n-1);
	
	for(i; 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 'main':
main.c:77:1: error: expected declaration or statement at end of input
   77 | }
      | ^
Language: C++

#include <iostream>
using namespace std;
int main() {
	int N;
	cin >> N;
	long a[N];
	bool flag = true;
	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]) {
					flag = false;
					break;
			}
		}
	}
	if (flag == true) cout << "YES";
	else cout <<"NO"
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:43: error: expected ')' before '{' token
   12 |                 for (int j = 0; j < N; j++{
      |                     ~                     ^
      |                                           )
a.cc:20:25: error: expected ';' before '}' token
   20 |         else cout <<"NO"
      |                         ^
      |                         ;
   21 | }
      | ~
Language: C++

#include <iostream>
using namespace std;
int main() {
	int N;
	cin >> N;
	int a[N];
	bool flag = true;
	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]) {
					flag = false;
					break;
			}
		}
	}
	if (flag == true) cout << "YES";
	else cout <<"NO"
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:43: error: expected ')' before '{' token
   12 |                 for (int j = 0; j < N; j++{
      |                     ~                     ^
      |                                           )
a.cc:20:25: error: expected ';' before '}' token
   20 |         else cout <<"NO"
      |                         ^
      |                         ;
   21 | }
      | ~
Language: C

#include <stdio.h>
#include <stdlib.h>
 
int main(){
  int n;
  scanf("%d",&n);
  int a[n];
  for(int i=0;i<n;i++){
    scanf("%d",&a[i]);
  }
  QuickSort(a, 0, n+1);
  
  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 'main':
main.c:11:3: error: implicit declaration of function 'QuickSort' [-Wimplicit-function-declaration]
   11 |   QuickSort(a, 0, n+1);
      |   ^~~~~~~~~
Language: C

#include <stdio.h>
#include <stdlib.h>
 
//値を交換する関数
void swap(int *a, int *b) {
	int temp = *a;
	*a = *b;
	*b = temp;
}
 
/*クイックソート*/
void QuickSort(int A[], int left, int right)
{
	// 変数定義
	int Left, Right;
	int pivot;
 
	// 初期値は引数から
	Left = left; Right = right;
 
	// 基準は真ん中に設定
	pivot = A[(left + right) / 2];
 
	// ソーティング
	while (1) {
 
		// 基準より小さい値を左から見つけていく
		while (A[Left] < pivot) Left++;
 
		// 基準より大きい値を右から見つけていく
		while (pivot < A[Right]) Right--; 
 
		// 見つかった値の順序が逆になったら終了 
		if (Left >= Right) break;
 
		// 値を交換
		swap(&A[Left], &A[Right]);
 
		// 次の値に移動
		Left++; Right--;
 
	}
 
	//左のデータ群を対象としてクイックソートを再帰
	if (left < Left - 1) QuickSort(A, left, Left - 1);
 
	//右のデータ群を対象としてクイックソートを再帰
	if (Right + 1 < right) QuickSort(A, Right + 1, right);
 
}
 
int main(){
  int n;
  scanf("%d",&n);
  int a[n];
  for(int i=0;i<n;i++){
    scanf("%d",&a[i]);
  }
  quick_sort(a, 0, n);
  
  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 'main':
main.c:59:3: error: implicit declaration of function 'quick_sort'; did you mean 'QuickSort'? [-Wimplicit-function-declaration]
   59 |   quick_sort(a, 0, n);
      |   ^~~~~~~~~~
      |   QuickSort
Language: C++

#include <iostream>
using namespace std;
int main() {
	int N;
	cin >> N;
	int a[N];
	bool flag = true;
	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]) flag = false;
		}
	}
	if (flag == true) cout << "YES";
	else cout <<"NO"
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:43: error: expected ')' before '{' token
   12 |                 for (int j = 0; j < N; j++{
      |                     ~                     ^
      |                                           )
a.cc:17:25: error: expected ';' before '}' token
   17 |         else cout <<"NO"
      |                         ^
      |                         ;
   18 | }
      | ~
Language: C

#include <stdio.h>

//値を交換する関数
void swap(int *a, int *b) {
	int temp = *a;
	*a = *b;
	*b = temp;
}

/*クイックソート*/
void QuickSort(int A[], int left, int right)
{
	// 変数定義
	int Left, Right;
	int pivot;

	// 初期値は引数から
	Left = left; Right = right;

	// 基準は真ん中に設定
	pivot = A[(left + right) / 2];

	// ソーティング
	while (1) {

		// 基準より小さい値を左から見つけていく
		while (A[Left] < pivot) Left++;

		// 基準より大きい値を右から見つけていく
		while (pivot < A[Right]) Right--; 

		// 見つかった値の順序が逆になったら終了 
		if (Left >= Right) break;

		// 値を交換
		swap(&A[Left], &A[Right]);

		// 次の値に移動
		Left++; Right--;

	}

	//左のデータ群を対象としてクイックソートを再帰
	if (left < Left - 1) QuickSort(A, left, Left - 1);

	//右のデータ群を対象としてクイックソートを再帰
	if (Right + 1 < right) QuickSort(A, Right + 1, right);

}

int main(){
  int n;
  scanf("%d",&n);
  int a[n];
  for(int i=0;i<n;i++){
    scanf("%d",&a[i]);
  }
  quick_sort(a, 0, n);
  
  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 'main':
main.c:58:3: error: implicit declaration of function 'quick_sort'; did you mean 'QuickSort'? [-Wimplicit-function-declaration]
   58 |   quick_sort(a, 0, n);
      |   ^~~~~~~~~~
      |   QuickSort
Language: C++

#include <bits/stdc++.h>
#include "../utils.h"

#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 1e9
#define ALL(v) v.begin(), v.end()

using namespace std;
typedef unsigned long long ll;

int main(){
    // read in integers
    ll n;
    cin >> n;

    map<string, int> dict; 
    int maxi = 0; 

    vector<string> s(n);
    for (int i = 0; i < n; i++){
        cin >> s[i];
        maxi = max(maxi, ++dict[s[i]]);
    }

    ll res = 0;
    if (maxi > 1) {
        cout << "NO" << endl;
    }
    else{
        cout << "YES" << endl;
    }
}

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

#include <bits/stdc++.h>
#include <vector>
 
int main()
{
  long int n;
  scanf("%ld",&n);
  vector<long int> v={0};
  long int a[n],i,max=0;
  for(i=0;i<n;++i)
  {
    scanf("%ld",&a[i]);
    v[a[i]]++;
    if(max<a[i])
        max=a[i];
  }
  
  for(i=0;i<=max;++i)
  {
    if(v[i]>1)
    {
      flag=1;
      break;
    }
  }
  
  if(flag==1)
      printf("NO");
  
  else
     printf("YES");
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'vector' was not declared in this scope
    8 |   vector<long int> v={0};
      |   ^~~~~~
a.cc:8: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,
                 from a.cc:1:
/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:8:10: error: expected primary-expression before 'long'
    8 |   vector<long int> v={0};
      |          ^~~~
a.cc:13:5: error: 'v' was not declared in this scope
   13 |     v[a[i]]++;
      |     ^
a.cc:20:8: error: 'v' was not declared in this scope
   20 |     if(v[i]>1)
      |        ^
a.cc:22:7: error: 'flag' was not declared in this scope
   22 |       flag=1;
      |       ^~~~
a.cc:27:6: error: 'flag' was not declared in this scope
   27 |   if(flag==1)
      |      ^~~~
Language: C++

#include<iostream>
using namespace std;
using ll = long long;
#define VFOR(x,begin,num) for(int x=(begin);x<((begin)+(num));x++)
int main(){
  vector<ll> A;int N;
  cin >> N;
  VFOR(i,0,N) {int tmp;cin >> tmp;A.push_back(tmp);}
  sort(A.begin(),A.end());
  VFOR(i,0,N-1){
    if(A[i]==A[i+1]){cout << "NO";return 0;}
  }
  cout << "YES";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<ll> A;int N;
      |   ^~~~~~
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:6:12: error: expected primary-expression before '>' token
    6 |   vector<ll> A;int N;
      |            ^
a.cc:6:14: error: 'A' was not declared in this scope
    6 |   vector<ll> A;int N;
      |              ^
a.cc:9:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    9 |   sort(A.begin(),A.end());
      |   ^~~~
      |   short
Language: C++

#include<iostream>
using namespace std;
using ll = long long;
#define VFOR(x,begin,num) for(int x=(begin);x<((begin)+(num));x++)
int main(){
  vector<ll> A;int N;
  cin >> N;
  VFOR(i,0,N) {int tmp;cin >> tmp;A,push_back(tmp);}
  sort(A.begin(),A.end());
  VFOR(i,0,N-1){
    if(A[i]==A[i+1]){cout << "NO";return 0;}
  }
  cout << "YES";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<ll> A;int N;
      |   ^~~~~~
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:6:12: error: expected primary-expression before '>' token
    6 |   vector<ll> A;int N;
      |            ^
a.cc:6:14: error: 'A' was not declared in this scope
    6 |   vector<ll> A;int N;
      |              ^
a.cc:8:37: error: 'push_back' was not declared in this scope
    8 |   VFOR(i,0,N) {int tmp;cin >> tmp;A,push_back(tmp);}
      |                                     ^~~~~~~~~
a.cc:9:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    9 |   sort(A.begin(),A.end());
      |   ^~~~
      |   short