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

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

void qsort(void * base, size_t num, size_t size, int (* cmpFunc)(const void * n1, const void * n2));

int main() 
  int N,S[200001];
scanf("%d",&N);
for(int c=0;c<N;c++){
scanf("%d",S[c]);
}
qsort(S, sizeof(S) / sizeof(S[0]), sizeof(int), cmpnum);

for(int d=0;d<N;d++){
if(S[d]==S[d+1]){
printf("NO");
break;}
}
if(d==N-1){printf("YES");}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:1: error: expected declaration specifiers before 'scanf'
    8 | scanf("%d",&N);
      | ^~~~~
main.c:9:1: error: expected declaration specifiers before 'for'
    9 | for(int c=0;c<N;c++){
      | ^~~
main.c:9:13: error: expected declaration specifiers before 'c'
    9 | for(int c=0;c<N;c++){
      |             ^
main.c:9:17: error: expected declaration specifiers before 'c'
    9 | for(int c=0;c<N;c++){
      |                 ^
main.c:12:1: error: expected declaration specifiers before 'qsort'
   12 | qsort(S, sizeof(S) / sizeof(S[0]), sizeof(int), cmpnum);
      | ^~~~~
main.c:14:1: error: expected declaration specifiers before 'for'
   14 | for(int d=0;d<N;d++){
      | ^~~
main.c:14:13: error: expected declaration specifiers before 'd'
   14 | for(int d=0;d<N;d++){
      |             ^
main.c:14:17: error: expected declaration specifiers before 'd'
   14 | for(int d=0;d<N;d++){
      |                 ^
main.c:19:1: error: expected declaration specifiers before 'if'
   19 | if(d==N-1){printf("YES");}
      | ^~
main.c:21:1: error: expected declaration specifiers before 'return'
   21 | return 0;
      | ^~~~~~
main.c:22:1: error: expected declaration specifiers before '}' token
   22 | }
      | ^
main.c:7:9: error: declaration for parameter 'S' but no such parameter
    7 |   int N,S[200001];
      |         ^
main.c:7:7: error: declaration for parameter 'N' but no such parameter
    7 |   int N,S[200001];
      |       ^
main.c:23: error: expected '{' at end of input
Language: C++

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

int main() {
  int N;
  vector<int> A(N);
  for(int i = 0; i < N; i++){
    cin >> A.at(i);
    int count = 0;
  for(int i = 0; i < N-1; i++){
    for(int j = i+1; j < N; j++){
      if(A.at(i) != A.at(j)){
        count += 0;
      }else{
        count += 1;
      }
    }
  }
  }
  if(count > 0){
    cout << "No" << endl;
  }else{
    cout << "Yes" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:12: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>'
   20 |   if(count > 0){
      |      ~~~~~~^~~
Language: C++

using namespace std;
using p=pair<int,int>;
#define int long long
#define rep(i,N) for(int i=0;i<N;i++)

signed main(){
  int N;
  cin>>N;
  vector<int> A(N);
  rep(i,N)cin>>A.at(i);
  sort(A.begin(),A.end());
  for(int i=0;i<N-1;i++){
    if(A.at(i)==A.at(i+1)){
      cout<<"NO"<<endl;
      return 0;
    }
  }
  cout<<"YES"<<endl;
}

Compiler output:
a.cc:2:9: error: 'pair' does not name a type
    2 | using p=pair<int,int>;
      |         ^~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin>>N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:9:3: error: 'vector' was not declared in this scope
    9 |   vector<int> A(N);
      |   ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | using namespace std;
a.cc:3:13: error: expected primary-expression before 'long'
    3 | #define int long long
      |             ^~~~
a.cc:9:10: note: in expansion of macro 'int'
    9 |   vector<int> A(N);
      |          ^~~
a.cc:10:16: error: 'A' was not declared in this scope
   10 |   rep(i,N)cin>>A.at(i);
      |                ^
a.cc:11:8: error: 'A' was not declared in this scope
   11 |   sort(A.begin(),A.end());
      |        ^
a.cc:11:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |   sort(A.begin(),A.end());
      |   ^~~~
      |   short
a.cc:14:7: error: 'cout' was not declared in this scope
   14 |       cout<<"NO"<<endl;
      |       ^~~~
a.cc:14:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:19: error: 'endl' was not declared in this scope
   14 |       cout<<"NO"<<endl;
      |                   ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:18:3: error: 'cout' was not declared in this scope
   18 |   cout<<"YES"<<endl;
      |   ^~~~
a.cc:18:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:16: error: 'endl' was not declared in this scope
   18 |   cout<<"YES"<<endl;
      |                ^~~~
a.cc:18:16: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'mp' was not declared in this scope
   13 |        if(mp[x])no=1;
      |           ^~
a.cc:14:8: error: 'mp' was not declared in this scope
   14 |        mp[x]=1;
      |        ^~
Language: C++

#include<iostream>
#include<vector>
#include<utility>
#include<algorithm>
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()) ;
  for(int i=0;i<N-1;i++){
    if(A.at(i)==A.at(i+1)){
      cout<<"NO"<<endl ;
      return 0 ;
    }
  }
  cout<<"YES"<<endl ;
  
  return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: expected ')' before ';' token
   14 |   sort(A.begin();A.end()) ;
      |       ~         ^
      |                 )
a.cc:14:25: error: expected ';' before ')' token
   14 |   sort(A.begin();A.end()) ;
      |                         ^
      |                         ;
a.cc:14:23: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::end() [with _Tp = int; _Alloc = std::allocator<int>; iterator = std::vector<int>::iterator]', declared with attribute 'nodiscard' [-Wunused-result]
   14 |   sort(A.begin();A.end()) ;
      |                  ~~~~~^~
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:893:7: note: declared here
  893 |       end() _GLIBCXX_NOEXCEPT
      |       ^~~
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) ;
  
  for(int i=0;i<N-1;i++){
    for(int j=i+1;j<N){
      if(A.at(i)==A.at(j)){
        cout<<"NO"<<endl ;
        return 0 ;
      }
    }
  }
  cout<<"YES"<<endl ;
  
  return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: expected ';' before ')' token
   13 |     for(int j=i+1;j<N){
      |                      ^
      |                      ;
Language: C

#include<stdio.h>
int main(void)
{
  int n=0;
  scanf("%d",&n);
  int A[n];
  int i=0;
  for(i=0;i<n;i++)
  {
    scanf("%d",&A[i]);
  }/*ここまでおっけい*/
  int k,j=0;
  int judge,p=0;
  for(k=0;k<n-1;k++)
  {
    for(j=k+1;j<n;j++)
    {
	  if(A[k]<A[j])
      {
        p=A[k]
        A[k]=A[j];
        A[j]=p;
      }
    }
  }
  for(i=0;i<n-1;i++)
  {
	if(A[i]==A[i+1])
    {
      judge++;
    }
  }
  if(judge==0)
  {
    printf("YES");
  }
  if(judge>0)
  {
    printf("NO");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:15: error: expected ';' before 'A'
   20 |         p=A[k]
      |               ^
      |               ;
   21 |         A[k]=A[j];
      |         ~
Language: C++

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

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;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14: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 '()' ?)
   14 |     if (s.size == n) cout << "YES" << endl;
      |         ~~^~~~
      |               ()
Language: C++

/******************************************************************************

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <iostream>
#include <cstring>
using namespace std;
 int a[200000+1];
int main()
{
   int n ;
   cin>>n;
   for(int i =1 ; i<=n; ++i)
   {
       cin>>a[i];
   }
   sort(a+1,a+n+1);
   for(int i=2; i<=n; ++i)
   {
       if(a[i] == a[i-1])
            {cout<<"NO";
            return 0 ;}
           
   }
   cout<<"YES";
    return 0;
}


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

import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
  int num = Integer.parseInt(sc.next());
  int array = new int[num];
  String ans = "YES";
  for (int i = 0; i < num; i++){
  array[i] = Integer.parseInt(sc.next());
  }
  Arrays.sort(array);
  for (int i = 0; i <num-1; i++){
  	if(array[i] == array[i+i]){
    ans = "NO";
    }
  }
  System.out.println(ans);
}
}

Compiler output:
Main.java:6: error: incompatible types: int[] cannot be converted to int
  int array = new int[num];
              ^
Main.java:9: error: array required, but int found
  array[i] = Integer.parseInt(sc.next());
       ^
Main.java:11: error: no suitable method found for sort(int)
  Arrays.sort(array);
        ^
    method Arrays.sort(int[]) is not applicable
      (argument mismatch; int cannot be converted to int[])
    method Arrays.sort(long[]) is not applicable
      (argument mismatch; int cannot be converted to long[])
    method Arrays.sort(short[]) is not applicable
      (argument mismatch; int cannot be converted to short[])
    method Arrays.sort(char[]) is not applicable
      (argument mismatch; int cannot be converted to char[])
    method Arrays.sort(byte[]) is not applicable
      (argument mismatch; int cannot be converted to byte[])
    method Arrays.sort(float[]) is not applicable
      (argument mismatch; int cannot be converted to float[])
    method Arrays.sort(double[]) is not applicable
      (argument mismatch; int cannot be converted to double[])
    method Arrays.sort(Object[]) is not applicable
      (argument mismatch; int cannot be converted to Object[])
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (cannot infer type-variable(s) T#1
        (actual and formal argument lists differ in length))
    method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
    T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Main.java:13: error: array required, but int found
  	if(array[i] == array[i+i]){
  	        ^
Main.java:13: error: array required, but int found
  	if(array[i] == array[i+i]){
  	                    ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
5 errors
Language: C++

//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math") 
///#pragma GCC target("avx2")
#define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <fstream>
#include <cmath>
#include <deque>
#include <list>
#include <stack>
#include <queue>
#include <iomanip>
#include <cassert>
#include <functional>
#include <ctime>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <climits>
#include <numeric>

using namespace std;
#define open_streams ifstream fin("olympiad.in");ofstream fout("olympiad.out")
#define close_streams fin.close();fout.close()
#define speed cout.tie(0);cin.tie(0);ios_base::sync_with_stdio(0)
#define ll long long
#define ull unsigned long long
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define mp(a,b) make_pair(a,b)
#define pb push_back
#define UNIQ(a) a.resize(unique(all(a)) - a.begin())
#define eps 1e-6
//const double PI = M_PI;
const int INF = INT_MAX;
const ll limit = 1LL * 1e12;
const int MOD = 1e9 + 711;
const int MOD2 = 1e9 + 933;
//---------------------------------------------------------------------------
const int mod = 1e9 + 7;
const int maxn = 1e6 + 100;



signed main() {
	speed;
	int n, x;
	cin >> n >> s;
	set<int> st;
	for (int i = 0; i < n; ++i) {
		cin >> x;
		st.emplace(x);
	}
	if (st.size() == n) {
		cout << "YES";
	}
	else {
		cout << "NO";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:21: error: 's' was not declared in this scope
   53 |         cin >> n >> s;
      |                     ^
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 main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
 
    ll N;
 
    cin >> N;
 
    ll A[N];
 
    for (ll i=0; i<N; ++i)
    {
        cin >> A[i];
 
        if (A[i]==N)
        {
            cout << "NO";
            return 0;
        }
    }
 
    cout << "YES";
 
    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin.tie(0);
      |     ^~~
a.cc:9:5: error: 'ios' has not been declared
    9 |     ios::sync_with_stdio(false);
      |     ^~~
a.cc:23:13: error: 'cout' was not declared in this scope
   23 |             cout << "NO";
      |             ^~~~
a.cc:28:5: error: 'cout' was not declared in this scope
   28 |     cout << "YES";
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#define 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;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: 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 '()' ?)
   10 |   if (s.size == N) cout << "YES" << endl;
      |       ~~^~~~
      |             ()
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5+10;
set<int>s;
int num[maxn];
int main()
{
    scanf("%d",&n);
    for(int i = 0;i<n;i++)
        scanf("%d",&num[i]);
    for(int i = 0;i<n;++i)
    {
        if(s.find(num[i])!=s.end())
        {
            printf("NO\n");
            return  0;
        }
        s.insert(num[i]);
    }
    printf("YES\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'n' was not declared in this scope; did you mean 'yn'?
    8 |     scanf("%d",&n);
      |                 ^
      |                 yn
Language: C++

#include <bits/stdc++.h>
using namespace std;
map <int,int> mp;
int main()
{
	int n,a,it;
	cin >>n;
	for (int i=0;i<n;i++)
	{
		cin >>a;
		mp[a]++;
	}
	for (map <int, int>::iterator it = mp.begin(); it != mp.end(); it++)
	{
		if (mp[it]>1)
		{
			cout <<"NO"<<endl;
			return 0;
		}
	}
	cout <<"YES"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: no match for 'operator[]' (operand types are 'std::map<int, int>' and 'std::map<int, int>::iterator' {aka 'std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int> >, std::less<int>, std::allocator<std::pair<const int, int> > >::iterator'})
   15 |                 if (mp[it]>1)
      |                       ^
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:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = int]'
  504 |       operator[](const key_type& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:504:34: note:   no known conversion for argument 1 from 'std::map<int, int>::iterator' {aka 'std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int> >, std::less<int>, std::allocator<std::pair<const int, int> > >::iterator'} to 'const std::map<int, int>::key_type&' {aka 'const int&'}
  504 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_map.h:524:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = int]'
  524 |       operator[](key_type&& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:524:29: note:   no known conversion for argument 1 from 'std::map<int, int>::iterator' {aka 'std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int> >, std::less<int>, std::allocator<std::pair<const int, int> > >::iterator'} to 'std::map<int, int>::key_type&&' {aka 'int&&'}
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#define FOR(n) for(int i=0;i<n;i++)
#define FORJ(n) for(int j=0;j<n;j++)
#define PRN(n) printf("%d\n",n)
#define PRF(n) printf("%lf\n",n)
#define PRL(n) printf("%lld\n",n)
#define PRS(s) printf("%s\n",s)
#define PRC(c) printf("%c",c)
#define INF 10000000000
#define mod 1000000007
#define X 1000000
typedef long long int ll;
ll finv[X];
ll fac[X];
ll inv[X];
ll usort(const void *a, const void *b){return *(ll*)a-*(ll*)b;}
ll dsort(const void *a, const void *b){return *(ll*)b-*(ll*)a;}
ll ssort(const void *a, const void *b){return strcmp((char*)a,(char*)b);}
ll min(ll a,ll b){
  if(a>b)return b;
  return a;
}
ll max(ll a,ll b){
  if(a>b)return a;
  return b;
}
ll z(ll a){return max(a,-a);}
ll gcd(ll a,ll b){if(!b){return a;}else{return gcd(b,a%b);}}
ll lcm(ll a,ll b){return a*b/gcd(a,b);}
ll kt(ll a){
  ll sum=0;
  while(a){
    a/=10;
    sum++;
  }
  return sum;
}
ll ks(ll a){
  ll sum=0;
  while(a){
    sum+=a%10;
    a/=10;
  }
  return sum;
}
void ppp(){
  fac[0]=fac[1]=1;
  finv[0]=finv[1]=1;
  inv[1]=1;
  for (int i=2;i<X;i++){
    fac[i]=fac[i-1]*i%mod;
    inv[i]=mod-inv[mod%i]*(mod/i)%mod;
    finv[i]=finv[i-1]*inv[i]%mod;
  }
}
ll nCr(int n,int k){
  return fac[n]*(finv[k]*finv[n-k]%mod)%mod;
}

int jank(int a){
  char s[4]="spr";
  FOR(3)if(a==s[i])return i;
}
ll x[100000];
int main(void){
  int n;
  scanf("%d"&n);
  ll a[n];
  FOR(n)scanf("%lld",&a[i]);
  qsort(s,n,sizeof(ll),usort);
  FOR(n-1){
    if(a[i]==a[i+1]){
      PRS("NO");
      return 0;
    }
  }
  PRS("YES");
}


Compiler output:
main.c: In function 'main':
main.c:70:13: error: invalid operands to binary & (have 'char *' and 'int')
   70 |   scanf("%d"&n);
      |         ~~~~^
      |         |
      |         char *
main.c:73:9: error: 's' undeclared (first use in this function)
   73 |   qsort(s,n,sizeof(ll),usort);
      |         ^
main.c:73:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:73:24: error: passing argument 4 of 'qsort' from incompatible pointer type [-Wincompatible-pointer-types]
   73 |   qsort(s,n,sizeof(ll),usort);
      |                        ^~~~~
      |                        |
      |                        ll (*)(const void *, const void *) {aka long long int (*)(const void *, const void *)}
In file included from main.c:2:
/usr/include/stdlib.h:971:34: note: expected '__compar_fn_t' {aka 'int (*)(const void *, const void *)'} but argument is of type 'll (*)(const void *, const void *)' {aka 'long long int (*)(const void *, const void *)'}
  971 |                    __compar_fn_t __compar) __nonnull ((1, 4));
      |                    ~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int  ,int > pii;
typedef pair<ll  ,ll > pll;

const ll maxn =2e6;
const ll mod = 1e9+7;
const ld PI = 4 * atan((ld) 1);

#define pb(x) push_back(x);
#define endl '\n'
#define dokme(x) cout << x ;  return(0);
#define migmig ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define file_init freopen("input.txt", "r+", stdin); freopen("output.txt", "w+", stdout);
#define ms(x , y) memset(x , y , sizeof x);
ll pw(ll a, ll b) {
    return (!b ? 1 : (b & 1 ? a * pw(a * a % mod, b / 2) % mod : pw(a * a % mod, b / 2) % mod));
}

map < int , int > mp;

int main(){
    migmig
    int n;
    cin >> n;
    for (int i = 0 ; i < n ; i ++){
        cin >> inp;
        if(mp[inp]){
            dokme("NO")
        }
        mp[inp] = 1;
    }
    cout << "YES";


    return(0);
}


//When we hit our lowest point, we are open to the greatest change.
//If I try, I fail. If I don't try, I'm NEVER GOING TO GET IT.
//Sometimes, life is like this dark tunnel. You can't always see the light at the end of the tunnel. But if you just keep moving... you will come to a better place.
//It is important to draw wisdom from diffrent places. If you take it from only one place it becomes rigid and stale.


Compiler output:
a.cc: In function 'int main()':
a.cc:31:16: error: 'inp' was not declared in this scope; did you mean 'int'?
   31 |         cin >> inp;
      |                ^~~
      |                int
Language: Java

package abc154;

import java.util.HashSet;
import java.util.Scanner;

public class C {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		HashSet<Integer> set = new HashSet<Integer>();
		
		for(int i = 0; i < n; i++) {
			int tmp = sc.nextInt();
			if(set.contains(tmp)) {
				System.out.println("NO");
				return;
			}
			set.add(tmp);
		}
		
		System.out.println("YES");
	}

}


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

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


int main() {
   int N,cnt;
   cin >> N;

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

   for(int i=0;i<N;i++){
       for(int j=0;i<N;j++){
       if(A[i]== A[j])cnt++
       }
   }

   if(cnt > 0)cout << "YES" << endl;
   else cout << "NO" << endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'A' was not declared in this scope
   10 |        cin >> A[i];
      |               ^
a.cc:15:11: error: 'A' was not declared in this scope
   15 |        if(A[i]== A[j])cnt++
      |           ^
a.cc:15:28: error: expected ';' before '}' token
   15 |        if(A[i]== A[j])cnt++
      |                            ^
      |                            ;
   16 |        }
      |        ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define int  long long
#define rep(i,a,b)    for(int i=a;i<b;i++)
#define repn(i,a,b)   for(int i=a;i>=b;i--)
#define F first
#define S second
#define pii pair<int,int>
#define vi vector<int>
#define vii vector<pii>
#define pb push_back
#define mp  make_pair
#define all(v) (v).begin(), (v).end()
#define mod 1000000007
 
bool sortby(const pair<pair<string,int>,int> &a, 
              const pair<pair<string,int>,int> &b) 
{ 
    if(a.first.first==b.first.first)
        return (a.first.second > b.first.second); 
    else
        return(a.first.first < b.first.first);
}  
 
void solve(){
    int x,y;
    int a,n,b,c;
  	set<int> s;
    cin>>n;
  	rep(i,0,n){
      cin>>a;
      s.inset(a);
    }
    if(s.size()==n) cout<<"YES";
  	else cout<<"NO";
    
}
 
signed main(){
    //IOS;
    //freopen("input.txt", "r" , stdin);
    //freopen("output.txt", "w", stdout);
    int t=1;
   // cin>>t;
    while(t--){
        solve();
        cout<<"\n";
     //   cout<<" * "<<t<<"\n";
    }
//    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:34:9: error: 'class std::set<long long int>' has no member named 'inset'; did you mean 'insert'?
   34 |       s.inset(a);
      |         ^~~~~
      |         insert
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define int  long long
#define rep(i,a,b)    for(int i=a;i<b;i++)
#define repn(i,a,b)   for(int i=a;i>=b;i--)
#define F first
#define S second
#define pii pair<int,int>
#define vi vector<int>
#define vii vector<pii>
#define pb push_back
#define mp  make_pair
#define all(v) (v).begin(), (v).end()
#define mod 1000000007
 
bool sortby(const pair<pair<string,int>,int> &a, 
              const pair<pair<string,int>,int> &b) 
{ 
    if(a.first.first==b.first.first)
        return (a.first.second > b.first.second); 
    else
        return(a.first.first < b.first.first);
}  
 
void solve(){
    int x,y;
    int a,b,c;
  	set<int> s;
    cin>>n;
  	rep(i,0,n){
      cin>>a;
      s.inset(a);
    }
    if(s.size()==n) cout<<"YES";
  	else cout<<"NO";
    
}
 
signed main(){
    //IOS;
    //freopen("input.txt", "r" , stdin);
    //freopen("output.txt", "w", stdout);
    int t=1;
   // cin>>t;
    while(t--){
        solve();
        cout<<"\n";
     //   cout<<" * "<<t<<"\n";
    }
//    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:31:10: error: 'n' was not declared in this scope
   31 |     cin>>n;
      |          ^
a.cc:34:9: error: 'class std::set<long long int>' has no member named 'inset'; did you mean 'insert'?
   34 |       s.inset(a);
      |         ^~~~~
      |         insert
Language: Java

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

Compiler output:
Main.java:6: error: cannot find symbol
		FastScanner sc = new FastScanner(System.in);
		^
  symbol:   class FastScanner
  location: class Main
Main.java:6: error: cannot find symbol
		FastScanner sc = new FastScanner(System.in);
		                     ^
  symbol:   class FastScanner
  location: class Main
2 errors
Language: Java

 

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

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
Copy
^
1 error
Language: C++

#include <bits/stdc++.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 2e9
#define ALL(v) v.begin(), v.end()
#define ARRAY_LENGTH(array) (sizeof(array) / sizeof(array[0]))
using namespace std;
typedef long long ll;



int main()
{
    int N;
    cin >> N;
    int A[N];
    REP(i,N){
        cin >>A[i];
    }

    sort(A,A+N);
    REP(i,N){
       
            if  ((A[i]==A[i+1])){
                cout << "NO" << endl;
                return 0;
               
                
            }
        }
    }
    
    cout <<"YES"<< endl;
}

Compiler output:
a.cc:34:5: error: 'cout' does not name a type
   34 |     cout <<"YES"<< endl;
      |     ^~~~
a.cc:35:1: error: expected declaration before '}' token
   35 | }
      | ^
Language: C

#include <stdio.h>

main()
{
	int n,i=0,j=0,k=0,cnt=0;
	int a[200000];

	scanf("%d", &n);

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

	for (i=0; i < n; i++)
	{
		for (j=0; j < n; j++)
		{
			if(i==j){
				continue;
			} 
			if(a[i]==a[j]) {
				printf("NO\n");
				return ;
			}
		}
	}
	printf("YES\n");
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main()
      | ^~~~
main.c: In function 'main':
main.c:23:33: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   23 |                                 return ;
      |                                 ^~~~~~
main.c:3:1: note: declared here
    3 | main()
      | ^~~~
Language: C++

#include <iostream>
#include <vector>
#define rep(i, a, b) for (int i = (a); i < (b); ++i)
using namespace std;

int main()
{
  int n;
  cin >> n;
  vector<int> a(n);
  rep(i, 0, n) { cin >> a[i]; }
  sort(a.begin(), a.end());
  rep(i, 0, n - 1)
  {
    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:3: 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 z , p , q , w ;

deque<int>vc,cv;

int main( ) {

    int n ;
    cin >> n ;
    int a[n] ;
    for(int i = 0 ; i < n ; i ++ ){
        cin >> a[i] ;
    }
    sort(a,a+n);
    for(int i = 1 ; i < ; 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:17:25: error: expected primary-expression before ';' token
   17 |     for(int i = 1 ; i < ; i ++ ){
      |                         ^
Language: C++

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

int z , p , q , w ;

deque<int>vc,cv;

int main( ) {

    int n ;
    cin >> n ;
    int a[n] ;
    for(int i = 0  i < n ; i ++ ){
        cin >> a[i] ;
    }
    sort(a,a+n);
    for(int i = 1 ; i < ; 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:13:18: error: expected ';' before 'i'
   13 |     for(int i = 0  i < n ; i ++ ){
      |                  ^ ~
      |                  ;
a.cc:17:25: error: expected primary-expression before ';' token
   17 |     for(int i = 1 ; i < ; i ++ ){
      |                         ^
Language: C++

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

int main()
{
    int N, ap;
    list<int> lst;
    cin >> N;
    for (int i = 0; i < N; i++)
    {
        cin >> ap;
        lst.push_back(ap);
    }
    lst.sort();

    if (lst[0] == lst[1])
    {
        cout << "No" << endl;
    }
    else
    {
        cout << "Yes" << endl;
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: no match for 'operator[]' (operand types are 'std::__cxx11::list<int>' and 'int')
   16 |     if (lst[0] == lst[1])
      |            ^
a.cc:16:22: error: no match for 'operator[]' (operand types are 'std::__cxx11::list<int>' and 'int')
   16 |     if (lst[0] == lst[1])
      |                      ^
Language: C

#include <stdio.h>
/*　pivot関数
	ピボットの決定を行う
	引数は、配列の先頭アドレス、左端のindex、右端のindex
	数列の左から見て、最初に得られた異なる2要素のうち
	大きいほうの要素番号を返す。
	数列の値がすべて同じ場合は -1 を返す。
*/
int pivot(int *a, int i, int j)
{
	int k = i + 1;
	while(k <= j && a[i] == a[k]){
		k++;
	}
	if(k > j){
		return -1;
	}
	if(a[i] >= a[k]){
		return i;
	}
	return k;
}

/*
	partition関数
	a[i] ~ a[j]の間で、pivotを軸として分割を行う。
	引数は、配列の先頭アドレス、左端のindex、右端のindex、ピボットの値
	返り値は、ピボット以上のグループの開始番号
*/
int partition(int *a, int l, int r, int pivot)
{
	int tmp;
	while(l < r){
		while(a[l] < pivot){
			l++;
		}
		while(a[r] >= pivot){
			r--;
		}
		if(l < r){
			tmp = a[l];
			a[l] = a[r];
			a[r] = tmp;
			l++;
			r--;
		}
	}
	return l;
}

void quick_sort(int *a, int i, int j)
{
	if(i == j) return;
	int p = pivot(a, i, j);
	if(p != -1){
		int k = partition(a, i, j, a[p]);
		quick_sort(a, i, k - 1);
		quick_sort(a, k, j);
	}
}

int main()
{
	int n, i, j;
	long long int a[200000];
	scanf("%d", &n);
	
	for(i = 0; i < n; i++){
		scanf("%lld ", &a[i]);
	}
	quicl_sort(a, 0, n - 1);
	for(i = 0; i < n - 1; 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:71:9: error: implicit declaration of function 'quicl_sort'; did you mean 'quick_sort'? [-Wimplicit-function-declaration]
   71 |         quicl_sort(a, 0, n - 1);
      |         ^~~~~~~~~~
      |         quick_sort
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL<<62
#define inf 1000000007

int main() {
	ll n;
	map<ll>a;
	cin>>n;
	for(ll i=0;i<n;i++){
		ll x;
		cin>>x;
		a[x]++;
		if(a[x]==2){
			cout << "NO";
			return 0;
		}
	}
	cout << "YES";
	// your code goes here
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: wrong number of template arguments (1, should be at least 2)
    9 |         map<ll>a;
      |               ^
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:18: error: invalid types 'int[ll {aka long long int}]' for array subscript
   14 |                 a[x]++;
      |                  ^
a.cc:15:21: error: invalid types 'int[ll {aka long long int}]' for array subscript
   15 |                 if(a[x]==2){
      |                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,a;
  cin>>n;
  set<int> s;
  while(cin>>a) s.insert(a);
  puts(s.size()==n?"YES":"NO")
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:31: error: expected ';' before '}' token
    8 |   puts(s.size()==n?"YES":"NO")
      |                               ^
      |                               ;
    9 | }
      | ~
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());

    for (int i = 0; i < n - 1; i++){
        if(A.at(i) == A.at(i+1)){
            cout << "NO" << endl;
            return 0;
        }
    }
    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<iostream>
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);
  
  int res = 1;
  for(int i = 0; i < N - 1;i++){
      if(A[i] == A[i + 1]) res = 0;
  }
  
  if(res == 1) cout << "YES" << endl;
  else cout << "NO" << endl;
}


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

#include <bits/stdc++.h>
using namespace std;
int main()
{
  set<int>s;
  int n;
  scanf("%d",&n);
  for(int i=1;i<=n;i++)
  {
    scanf("%d",&e);
    s.inset(e);
  }
  if(s.size()==n)
  {
    printf("YES");
  }
  else
  {
    printf("NO");
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'e' was not declared in this scope
   10 |     scanf("%d",&e);
      |                 ^
a.cc:11:7: error: 'class std::set<int>' has no member named 'inset'; did you mean 'insert'?
   11 |     s.inset(e);
      |       ^~~~~
      |       insert
Language: C

#include<stdio.h>

int main(void){
  
  int N,a[200001],i,j,w,c=0;
  scanf("%d",&N);
  for(i=0;i<N;i++){
    scanf("%d",&a[i]);
  }
  
  for(i=0;i<N-1;i++){
    for(j=i;j<N;j++){
      if(a[i]>a[j]){
        w=a[i];
        a[i]=a[j];
        a[j]=w;
      }
    }
  }
  for(i=0;i<N-1;i++){
    if(a[i]==a[i+1]){
      printf("NO\n");
      c=1;
      return 0;
    }
  }
  if(c==0){
    printf("YES\n");
    return 0;
  }
  
      
      

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

#include<bits/stdc++.h>

using namespace std;

int main(){
	
  int n;
  cin >> n;
  
  set<int> s;
  int t;
  for(int i = 0; i<n; ++i){
  	cin >> t;
    if(s.find(t) != s.end){
    	cout << "NO";
      return 0;
    }
    s.insert(t);
  }

  cout << "YES";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: invalid use of non-static member function 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::end() const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; iterator = std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator]'
   14 |     if(s.find(t) != s.end){
      |        ~~~~~~~~~~^~~~~~~~
In file included from /usr/include/c++/14/set:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:158,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_set.h:355:7: note: declared here
  355 |       end() const _GLIBCXX_NOEXCEPT
      |       ^~~
Language: C++

#include <iostream>
bool check (int n, int* a ) {
	for (int i = 0 ; i < n ; ++i ) {
      	for ( int j = i+1 ; j < n ; ++j ) {
         	if ( a[i] == a[j] ) return false; 
        }
    }
  	return true;
}
int main ( int argc, char** argv ) {
 	int *a;
    int n;
  	std::cin>>n;
	a = new int[n];
  	for  ( int i = 0 ; i < n ; ++i ) {
	   std::cin>>a[i] 	 
    }
	if ( check(n, a) ) std::cout<<"YES"<<std::endl;
  	else std::cout<<"NO"<<std::endl;
	delete[] a;
  	return 0;
}



Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:16:26: error: expected ';' before '}' token
   16 |            std::cin>>a[i]
      |                          ^
      |                          ;
   17 |     }
      |     ~
Language: C++

#include <iostream>
bool check (int n, int* a ) {
	for (int i = 0 ; i < n ; ++i ) {
      	for ( int j = i+1 ; j < n ; ++j ) {
         	if ( a[i] == a[j] ) return false; 
        }
    }
  	return true;
}
int main ( int argc, char** argv ) {
 	int *a 
    int n;
  	std::cin>>n;
	a = new int[n];
  	for  ( int i = 0 ; i < n ; ++i ) {
	   std::cin>>a[i] 	 
    }
	if ( check(n, a) ) std::cout<<"YES"<<std::endl;
  	else std::cout<<"NO"<<std::endl;
	delete[] a;
  	return 0;
}



Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:12:5: error: expected initializer before 'int'
   12 |     int n;
      |     ^~~
a.cc:13:19: error: 'n' was not declared in this scope
   13 |         std::cin>>n;
      |                   ^
a.cc:14:9: error: 'a' was not declared in this scope
   14 |         a = new int[n];
      |         ^
a.cc:20:9: error: type '<type error>' argument given to 'delete', expected pointer
   20 |         delete[] a;
      |         ^~~~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: expected unqualified-id before '[' token
   15 |     if(a.[i]==a[i+1]){
      |          ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: 'ture' was not declared in this scope; did you mean 're'?
   16 |       re=ture;
      |          ^~~~
      |          re
Language: C++

#include<bits/iostream>

using namespace std;

int main(){
  int n;
  int re;
  cin>>n;
  vector<int>a(n);
  for(int i=0;i<n;i++){
    cin>>a.at(i);
  }
  sort(a.begin(),a.end());
  for(int i=0; i<n;i++){
    if(a.at(i)==a.at(i+1)){
      re=ture;
      break;
    }
  }
  if(re){
    cout<<"NO";
  }else{
    cout<<"YES";
  }
  return 0;
}

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

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  int a, b, i;
  cin >> a;
  vector<int> vec(a);
  for(i = 0;i < a;i++){
    cin >> vec[i];
  }
  sort(vec.begin(), vec.end()); 
  for(i = 0;i < a; i++){
      if(vec[i] == vec[i+1]){
        cout << "NO" << endl;
        return 0;
      }
    }
  }
    cout << "YES" << endl;
}

Compiler output:
a.cc:20:5: error: 'cout' does not name a type
   20 |     cout << "YES" << endl;
      |     ^~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C++

#include<iostream>
 
using namespace std;
 
 
//5 216145
int main(){
  int num;
  cin>>num;
  int h[num];
  bool result=true;
  for(int i=0; i<=num-1; i++){
    cin>>h[i];
  }
  sort(h.begin(),h.end());
  for(int i=0; i<=num-2; i++){
    if(h[i]==h[i+1]){
      result=false;
      break;
    }
  }
  if(result){
    cout<<"YES";
  }else{
    cout<<"NO";
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: request for member 'begin' in 'h', which is of non-class type 'int [num]'
   15 |   sort(h.begin(),h.end());
      |          ^~~~~
a.cc:15:20: error: request for member 'end' in 'h', which is of non-class type 'int [num]'
   15 |   sort(h.begin(),h.end());
      |                    ^~~
a.cc:15:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   15 |   sort(h.begin(),h.end());
      |   ^~~~
      |   short
Language: C

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int Arr[200005];
    int Elements,i,j,flag=0;
    cin>>Elements;
    for(i=0;i<Elements;i++)
    {
        cin>>Arr[i];
    }
    int n = sizeof(Arr)/sizeof(Arr[0]);
    sort(Arr,Arr+n);
    for(i=0;i<Elements;i++)
    {
        if(Arr[i]==Arr[i+1])
        {
            flag = 1;
            break;
        }
    }
    if(flag == 0)
    {
        cout<<"YES\n";
    }
    else
    {
        cout<<"NO\n";
    }
    return 0;
}


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

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





Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: expected ')' before '}' token
    8 |     for(int i=0;i<n-1;i++}{
      |        ~                 ^
      |                          )
a.cc:8:26: error: expected primary-expression before '}' token
a.cc:9:15: error: 'i' was not declared in this scope
    9 |       if(a.at(i)==a.at(i+1)){c++;break;}
      |               ^
a.cc:9:34: error: break statement not within loop or switch
    9 |       if(a.at(i)==a.at(i+1)){c++;break;}
      |                                  ^~~~~
a.cc: At global scope:
a.cc:12:3: error: expected unqualified-id before 'if'
   12 |   if(c>0)cout<<"NO"<<endl;
      |   ^~
a.cc:13:3: error: expected unqualified-id before 'else'
   13 |   else cout<<"YES"<<endl;
      |   ^~~~
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
int arr[1000000];
int main()
{
	int arr[20], temp,num;
	while (cin >> num)
	{
		bool f = 0;
		count = 0;
		for (int i = 0; i < num; i++)
		{
			cin >> temp;
			arr[temp]++;
		}
		for (int i = 0; i <= 200000; i++) {
			if (arr[i] > 1) f = 1;
			arr[i] = 0;
		}
		if (f) { cout << "NO" << endl; }
		else cout << "YES" << endl;
	}return 0;

}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  long int N;
  cin >> N;
  vector<long int> data(N);
  for (long int i=0;i<N;i++){
    cin>>data.at(i);
    for  (j=0;j<i;j++){
    if (data.at(i)==data.at(j)){
      printf("NO");
      break;
    }
    } 
  }
  printf("YES");
}

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

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

int main() {
  int n,k;
  double ans=0;
  cin >> n >> k;
  vector<int> a(n);
  for(int i=0;i<n;i++)
    cin >> a.at(i);
  
  for(int i=0;i<n-k+1;i++){
    double an=0;
    if(i==0)
      for(int j=0;j<k;j++)an+=a.at(j);
    else
      an += a.at(i+k)-a.at(i-1)
    if(an>ans)
      ans=an;
  }
  cout << ans/2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:32: error: expected ';' before 'if'
   17 |       an += a.at(i+k)-a.at(i-1)
      |                                ^
      |                                ;
   18 |     if(an>ans)
      |     ~~
Language: C++


// C++ program to check if all array  
// elements are distinct 
#include <bits/stdc++.h> 
using namespace std; 
  
bool areDistinct(vector<int> arr) 
{ 
    int n = arr.size(); 
  
    // Put all array elements in a map 
    unordered_set<int> s; 
    for (int i = 0; i < n; i++) { 
        s.insert(arr[i]); 
    } 
  
    // If all elements are distinct, size of 
    // set should be same array. 
    return (s.size() == arr.size()); 
} 
  
// Driver code 
int main() 
{ 
    std::vector<int> arr = { 1, 2, 3, 2 }; 
  
    if (areDistinct(arr)) { 
        cout << "NO"; 
    } 
    else { 
        cout << "YES"; 
    } 
  
    return 0; 


Compiler output:
a.cc: In function 'int main()':
a.cc:34:14: error: expected '}' at end of input
   34 |     return 0;
      |              ^
a.cc:24:1: note: to match this '{'
   24 | {
      | ^