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

#include <iostream>
using namespace std;
int main() 
{
  int noteven[200000];
  int even[200000]
  int bash = 0;
  int N = 0;
  int evencount = 0;
  int count = 0;
  cin >> N;
  for(int i = 0;i < N; i++){
    cin >> bash;
    if(bash % 2 == 0){
        for(int j = 0; j < evencount;j++){
            if(bash == even[j]){
                cout << "NO" << endl;
                return 0;
            }
            if(evencount > (j + 2)){
                if((bash == even[j + 1]) || (bash == even[j + 2])){
                cout << "NO" << endl;
                return 0;
                }
                j += 2;
            }
        } 
    }
    else{
        for(int j = 0; j < count;j++){
            if(bash == noteven[j]){
                cout << "NO" << endl;
                return 0;
            }
            if(count > (j + 2)){
                if((bash == noteven[j + 1]) || (bash == noteven[j + 2])){
                cout << "NO" << endl;
                return 0;
                }
                j += 2;
            }
        } 
    }
    input[count] = bash;
    count ++;
  }
  cout << "YES" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'int'
    7 |   int bash = 0;
      |   ^~~
a.cc:13:12: error: 'bash' was not declared in this scope
   13 |     cin >> bash;
      |            ^~~~
a.cc:16:24: error: 'even' was not declared in this scope; did you mean 'noteven'?
   16 |             if(bash == even[j]){
      |                        ^~~~
      |                        noteven
a.cc:21:29: error: 'even' was not declared in this scope; did you mean 'noteven'?
   21 |                 if((bash == even[j + 1]) || (bash == even[j + 2])){
      |                             ^~~~
      |                             noteven
a.cc:44:5: error: 'input' was not declared in this scope; did you mean 'int'?
   44 |     input[count] = bash;
      |     ^~~~~
      |     int
Language: C++

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

int main（）
{
    int n;
    int array[100];
    int i,j;
    int flag = 0;
    cin>>n;
    for(i=0; i<n; i++) cin>>array[i];
    for(i=0; i<n; i++)
        for(j=i+1; j<n; j++)
             if(array[i]==array[j])
             {
               flag = 1;
               break;
             }
    if(flag)
        cout<<"NO"<<endl;
    else
        cout<<"YES"<<endl;
    return 0;
}


Compiler output:
a.cc:6:5: error: expected primary-expression before 'int'
    6 |     int n;
      |     ^~~
a.cc:6:5: error: expected '}' before 'int'
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
a.cc:10:5: error: 'cin' does not name a type
   10 |     cin>>n;
      |     ^~~
a.cc:11:5: error: expected unqualified-id before 'for'
   11 |     for(i=0; i<n; i++) cin>>array[i];
      |     ^~~
a.cc:11:14: error: 'i' does not name a type
   11 |     for(i=0; i<n; i++) cin>>array[i];
      |              ^
a.cc:11:19: error: 'i' does not name a type
   11 |     for(i=0; i<n; i++) cin>>array[i];
      |                   ^
a.cc:12:5: error: expected unqualified-id before 'for'
   12 |     for(i=0; i<n; i++)
      |     ^~~
a.cc:12:14: error: 'i' does not name a type
   12 |     for(i=0; i<n; i++)
      |              ^
a.cc:12:19: error: 'i' does not name a type
   12 |     for(i=0; i<n; i++)
      |                   ^
a.cc:13:20: error: 'j' does not name a type
   13 |         for(j=i+1; j<n; j++)
      |                    ^
a.cc:13:25: error: 'j' does not name a type
   13 |         for(j=i+1; j<n; j++)
      |                         ^
a.cc:19:5: error: expected unqualified-id before 'if'
   19 |     if(flag)
      |     ^~
a.cc:21:5: error: expected unqualified-id before 'else'
   21 |     else
      |     ^~~~
a.cc:23:5: error: expected unqualified-id before 'return'
   23 |     return 0;
      |     ^~~~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C

#include <stdio.h>
void main()
{
  long long int n,a[1000000],x;
  int i,j,flag=0;
  scanf("%lld",&n);
  for(i=0;i<n;i++)
  {
	scanf("%lld",&a[i];
  }
          for(i=0;i<n;i++)
          {
         	x=a[i];
            	for(j=i+1;j<n;j++)
           	 {
             	 if(x==a[j])
                 {
               		 flag=1;
             		break;
                 }
            }
          	break;
          }
          if(flag==1)
          printf("NO");
          else 
          printf("YES");
}

Compiler output:
main.c: In function 'main':
main.c:9:27: error: expected ')' before ';' token
    9 |         scanf("%lld",&a[i];
      |              ~            ^
      |                           )
main.c:9:28: error: expected ';' before '}' token
    9 |         scanf("%lld",&a[i];
      |                            ^
      |                            ;
   10 |   }
      |   ~
Language: C

for(i=0;i<n;i++)
{
    scanf("%d",&a[i]);
    if(i!=0){
        for(j=0;j<i;j++)
        {
            if(a[i]==a[j])
            {
                printf("NO");
                return 0;
            }
        }
    }
}

Compiler output:
main.c:1:1: error: expected identifier or '(' before 'for'
    1 | for(i=0;i<n;i++)
      | ^~~
main.c:1:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | for(i=0;i<n;i++)
      |          ^
main.c:1:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    1 | for(i=0;i<n;i++)
      |              ^~
Language: C++

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int ar[1000000005],a[1000000005];
int main()
{
    int n,i,j,c=1;
    cin>>n;
    for(i=0; i<n; i++)
    {
        cin>>ar[i];
        a[ar[i]]++;
    }
    for(i=0; i<n; i++)
    {

        if(a[i]>1)
        {
            cout<<"NO"<<endl;
            c=0;
            break;
        }
    }
    if(c==1)
        cout<<"YES"<<endl;
    return 0;
}


Compiler output:
/tmp/ccfWtN85.o: in function `main':
a.cc:(.text+0x7c): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/ccfWtN85.o
a.cc:(.text+0x93): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/ccfWtN85.o
a.cc:(.text+0xbf): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/ccfWtN85.o
collect2: error: ld returned 1 exit status
Language: C++

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

int main() {
  long int n, a, ans;
  cin >> n;
  vector<int> A(1000000000);
  for(int i = 0;i < n;i++){
	cin >> a;
    if(A.at(a) == null){
    	B.at(a) = 0;
    }
    else {
      cout << "Yes" << endl;
      ans =0;
      break;
    }
    if(ans == null){
      cout << "No" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 'null' was not declared in this scope
   10 |     if(A.at(a) == null){
      |                   ^~~~
a.cc:11:9: error: 'B' was not declared in this scope
   11 |         B.at(a) = 0;
      |         ^
a.cc:18:15: error: 'null' was not declared in this scope
   18 |     if(ans == null){
      |               ^~~~
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:32: error: expected ';' before 'for'
   12 |     sort(vec.begin(),vec.end())
      |                                ^
      |                                ;
   13 |     for(int i = 0;i < n;i++){
      |     ~~~                         
a.cc:13:19: error: 'i' was not declared in this scope
   13 |     for(int i = 0;i < n;i++){
      |                   ^
Language: C++

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

int main（）
{
    int n;
    int array[100];
    int i,j;
    int flag = 0;
    cin>>n;
    for(i=0 ; i <n; i++)
    cin >> array[i];
    for(i=0 ; i < n ; i++)
    {
        for(j = i + 1 , j < n ; j++)
        {
             if(array[i] == array[j])
             {
               flag = 1;
               break;
             }
        }
        if(flag == 1) break;
    }
    if(flag)
        cout << "NO" << endl;
    else
        cout << "YES" << endl;
    return 0;
}


Compiler output:
a.cc:6:5: error: expected primary-expression before 'int'
    6 |     int n;
      |     ^~~
a.cc:6:5: error: expected '}' before 'int'
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
a.cc:10:5: error: 'cin' does not name a type
   10 |     cin>>n;
      |     ^~~
a.cc:11:5: error: expected unqualified-id before 'for'
   11 |     for(i=0 ; i <n; i++)
      |     ^~~
a.cc:11:15: error: 'i' does not name a type
   11 |     for(i=0 ; i <n; i++)
      |               ^
a.cc:11:21: error: 'i' does not name a type
   11 |     for(i=0 ; i <n; i++)
      |                     ^
a.cc:13:5: error: expected unqualified-id before 'for'
   13 |     for(i=0 ; i < n ; i++)
      |     ^~~
a.cc:13:15: error: 'i' does not name a type
   13 |     for(i=0 ; i < n ; i++)
      |               ^
a.cc:13:23: error: 'i' does not name a type
   13 |     for(i=0 ; i < n ; i++)
      |                       ^
a.cc:25:5: error: expected unqualified-id before 'if'
   25 |     if(flag)
      |     ^~
a.cc:27:5: error: expected unqualified-id before 'else'
   27 |     else
      |     ^~~~
a.cc:29:5: error: expected unqualified-id before 'return'
   29 |     return 0;
      |     ^~~~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
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; i++){
        if(A.at(i) == A.at(i+1)){
            cout << "NO" << endl;
            return 0;
        }
    }
    cout << "YES" << endl;
    return 0;
}

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

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


int main(){
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i=0; i<N; i++){
    cin >> A[i];
  }
  string x="YES";
    for (int i=0; i<N; i++){
      for (int j=0;j<i; j++){
        if (A[i]==A[j]){
          X="NO";
          break;
        }
      }
    }

  
  cout << x << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: 'X' was not declared in this scope
   18 |           X="NO";
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main（）
{
    int n;
    int array[200010];
    int i,j;
    int flag = 0;
    cin>>n;
    for(i=0 ; i <n; i++)
    cin >> array[i];
    for(i=0 ; i < n ; i++)
    {
        for(j = i + 1 , j < n ; j++)
        {
             if(array[i] == array[j])
             {
               flag = 1;
               break;
             }
        }
        if(flag == 1) break;
    }
    
    if(flag)
        cout << "NO" << endl;
    else
        cout << "YES" << endl;
    return 0;
}


Compiler output:
a.cc:5:5: error: expected primary-expression before 'int'
    5 |     int n;
      |     ^~~
a.cc:5:5: error: expected '}' before 'int'
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
a.cc:9:5: error: 'cin' does not name a type
    9 |     cin>>n;
      |     ^~~
a.cc:10:5: error: expected unqualified-id before 'for'
   10 |     for(i=0 ; i <n; i++)
      |     ^~~
a.cc:10:15: error: 'i' does not name a type
   10 |     for(i=0 ; i <n; i++)
      |               ^
a.cc:10:21: error: 'i' does not name a type
   10 |     for(i=0 ; i <n; i++)
      |                     ^
a.cc:12:5: error: expected unqualified-id before 'for'
   12 |     for(i=0 ; i < n ; i++)
      |     ^~~
a.cc:12:15: error: 'i' does not name a type
   12 |     for(i=0 ; i < n ; i++)
      |               ^
a.cc:12:23: error: 'i' does not name a type
   12 |     for(i=0 ; i < n ; i++)
      |                       ^
a.cc:25:5: error: expected unqualified-id before 'if'
   25 |     if(flag)
      |     ^~
a.cc:27:5: error: expected unqualified-id before 'else'
   27 |     else
      |     ^~~~
a.cc:29:5: error: expected unqualified-id before 'return'
   29 |     return 0;
      |     ^~~~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: Java

import java.util.*;
import java.io.*;
public class demo
{
    public static void main(String args[])
    {
       Scanner sc = new Scanner(System.in);
       int n = sc.nextInt();
       int A[] = new int[n];
       int i,j,flag=0;

       for(i=0;i<n;i++)
       {
            A[i] = sc.nextInt();
       }
       for(i=0;i<n;i++)
       {
            for(j=i+1;j<n;j++)
            {
                if(A[i]==A[j])
                {
                    flag=1;
                }
            }
       }

       if(flag==0)
       {
            System.out.println("YES");
       }
       else
       {
            System.out.println("NO");
       }
    }
}

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

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

int main（）
{
    int n;
    int array[200010];
    int i,j;
    int flag = 0;
    cin>>n;
    for(i=0 ; i <n; i++)
    cin >> array[i];
    for(i=0 ; i < n ; i++)
    {
        for(j = i + 1 , j < n ; j++)
        {
             if(array[i] == array[j])
             {
               flag = 1;
               break;
             }
        }
        if(flag == 1) break;
    }
    
    if(flag)
        cout << "NO" << endl;
    else
        cout << "YES" << endl;
}


Compiler output:
a.cc:6:5: error: expected primary-expression before 'int'
    6 |     int n;
      |     ^~~
a.cc:6:5: error: expected '}' before 'int'
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
a.cc:10:5: error: 'cin' does not name a type
   10 |     cin>>n;
      |     ^~~
a.cc:11:5: error: expected unqualified-id before 'for'
   11 |     for(i=0 ; i <n; i++)
      |     ^~~
a.cc:11:15: error: 'i' does not name a type
   11 |     for(i=0 ; i <n; i++)
      |               ^
a.cc:11:21: error: 'i' does not name a type
   11 |     for(i=0 ; i <n; i++)
      |                     ^
a.cc:13:5: error: expected unqualified-id before 'for'
   13 |     for(i=0 ; i < n ; i++)
      |     ^~~
a.cc:13:15: error: 'i' does not name a type
   13 |     for(i=0 ; i < n ; i++)
      |               ^
a.cc:13:23: error: 'i' does not name a type
   13 |     for(i=0 ; i < n ; i++)
      |                       ^
a.cc:26:5: error: expected unqualified-id before 'if'
   26 |     if(flag)
      |     ^~
a.cc:28:5: error: expected unqualified-id before 'else'
   28 |     else
      |     ^~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

#include <iostream>
//#include <numeric>
#include <vector>
	#include<math.h>
	//#include <algorithm>
	//#include <functional>
	//#include <numeric>
	//#include<cmath>
//#include <stdio.h> 
#include <cstdint>
	#include <string>
	//#include <cstdlib>
	//#define pi 3.14159265359
using namespace std;


int main() {

	int num = 0;
	uint64_t a;
	cin >> a;
	int k;
	vector<uint64_t> b(a, 0);
    for	(uint64_t i = 0; i < a; i++) {
 	    cin >> k;
		if (i != 0) {
			auto itr = std::find(b.begin(), b.end(), k);
			if (std::distance(b.begin(), itr) != a)
			{
				//cout << std::distance(b.begin(), itr);
				num = 1;
				break;
			}
			b[i] = k;
		}
    } 

	if (num == 0) {
		cout<<"YES";
	}
	else {
		cout << "NO";
	}

	return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:45: error: no matching function for call to 'find(std::vector<long unsigned int>::iterator, std::vector<long unsigned int>::iterator, int&)'
   27 |                         auto itr = std::find(b.begin(), b.end(), k);
      |                                    ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:27:45: note:   '__gnu_cxx::__normal_iterator<long unsigned int*, std::vector<long unsigned int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   27 |                         auto itr = std::find(b.begin(), b.end(), k);
      |                                    ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

main()
{
    int n; cin>>n;
    int ma=-1e9;
    int mi=1e9;
    for(int i=n; i--; )
    {
        int a; cin>>a;
        ma=max(ma,a);
        mi=min(mi,a);
    }
    if(ma!=mi)
    {
        cout << "YES" << "\n";
    }
    else
    {
        cout << "NO" << "\n";
    }
    return 0;
    int k,n; cin>>n>>k;
    vector<int> acc(n+1);
    int ans{};
    for(int i=1; i<=n; ++i)
    {
        int p; cin>>p;
        acc[i]=acc[i-1]+p;
        if(i<k) continue;
        int tmp=acc[i]-acc[i-k];
        if(tmp>ans) ans=tmp;
    }
    cout << double(ans+k)/2 << "\n";
}

Compiler output:
a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    6 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:26:11: error: redeclaration of 'int n'
   26 |     int k,n; cin>>n>>k;
      |           ^
a.cc:8:9: note: 'int n' previously declared here
    8 |     int n; cin>>n;
      |         ^
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; i++){
        if(A.at(i) == A.at(i+1)){
            cout << "NO" << endl;
            return 0;
        }
    }
    cout << "YES" << endl;
    return 0;
}


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

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

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

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

int main(){
  int N;
  int count = 0;
  cin >> N;
  vector<int> A(N);
  for(int i = 0; i < N; i++){
    cin >> A.at(i);
  }
  for(int i = 0; i < N; i++){
    int a = A.at(i);
    for(int j = 0; j < N; j++){
      if(A.at(j) == a　&& j >= i){
        count++;
      }
    }
  }
  if(count > N){
    cout << "NO" << "\n";
  }else{
    cout << "YES" << "\n";
  }  
 return 0; 
}

Compiler output:
a.cc:16:21: error: extended character 　 is not valid in an identifier
   16 |       if(A.at(j) == a　&& j >= i){
      |                     ^
a.cc: In function 'int main()':
a.cc:16:21: error: 'a\U00003000' was not declared in this scope
   16 |       if(A.at(j) == a　&& j >= i){
      |                     ^~~
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; 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>
#include<bits/stdc++.h>
using namespace std;
int ar[10000000],a[10000000];
int main()
{
int n,i,j,c=1;
    cin>>n;
    for(i=0; i<n; i++)
    {
        cin>>ar[i];
        a[ar[i]]++;
    }
    for(i=0;i<n;i++)
    {

        if(a[i]>1)
        {
            cout<<"NO"<<endl;
            c=0;
            break;
        }
    }
    if(c==1)
        cout<<"YES"<<endl;
        return 0
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:17: error: expected ';' before '}' token
   26 |         return 0
      |                 ^
      |                 ;
   27 | }
      | ~
Language: C++

#include <iostream>
//#include <numeric>
#include <vector>
	#include<math.h>
	//#include <algorithm>
	//#include <functional>
	//#include <numeric>
	//#include<cmath>
//#include <stdio.h> 
#include <cstdint>
	#include <string>
	//#include <cstdlib>
	//#define pi 3.14159265359
using namespace std;


int main() {

	int num = 0;
	uint64_t a;
	cin >> a;
	int k;
	vector<uint64_t> b(a, 0);
    for	(uint64_t i = 0; i < a; i++) {
 	    cin >> k;
		if (i != 0) {
			auto itr = std::find(b.begin(), b.end(), k);
			if (std::distance(b.begin(), itr) != a)
			{
				//cout << std::distance(b.begin(), itr);
				num = 1;
				break;
			}
			b[i] = k;
		}
    } 

	if (num == 0) {
		cout<<"YES";
	}
	else {
		cout << "NO";
	}

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:45: error: no matching function for call to 'find(std::vector<long unsigned int>::iterator, std::vector<long unsigned int>::iterator, int&)'
   27 |                         auto itr = std::find(b.begin(), b.end(), k);
      |                                    ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:27:45: note:   '__gnu_cxx::__normal_iterator<long unsigned int*, std::vector<long unsigned int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   27 |                         auto itr = std::find(b.begin(), b.end(), k);
      |                                    ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
Language: C++

int main() {
    // insert code here...
    int N,x;
    cin >> N ;
    int a[N];
    x=0;
    for(int i=0;i<N;i++){
        
        cin >>a[i];
    }
    
    for(int i=0;i<N;i++){
    
    for(int j=0;j+1<N;j++){
        
        if(a[i]==a[j+1]){
            
            x=x+1;
        }
        
    }
  }
    
    if(x>0){
        
        cout <<"No"<<endl;
    }
    
    else{
        
        cout <<"Yes"<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> N ;
      |     ^~~
a.cc:26:9: error: 'cout' was not declared in this scope
   26 |         cout <<"No"<<endl;
      |         ^~~~
a.cc:26:22: error: 'endl' was not declared in this scope
   26 |         cout <<"No"<<endl;
      |                      ^~~~
a.cc:31:9: error: 'cout' was not declared in this scope
   31 |         cout <<"Yes"<<endl;
      |         ^~~~
a.cc:31:23: error: 'endl' was not declared in this scope
   31 |         cout <<"Yes"<<endl;
      |                       ^~~~
Language: C++

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
long long int ar[10000000],a[10000000];
int main()
{
    long long int n,i,j,c=1;
    cin>>n;
    for(i=0; i<n; i++)
    {
        cin>>ar[i];
        a[ar[i]]++;
    }
    for(i=0;i<n;i++)
    {

        if(a[i]>1)
        {
            cout<<"NO"<<endl;
            c=0;
            break;
        }
    }
    if(c==1)
        cout<<"YES"<<endl;
        return 0
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:17: error: expected ';' before '}' token
   26 |         return 0
      |                 ^
      |                 ;
   27 | }
      | ~
Language: C++

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
long long int ar[10000000],a[10000000];
int main()
{
    long long int n,i,j,c=1;
    cin>>n;
    for(i=0; i<n; i++)
    {
        cin>>ar[i];
        a[ar[i]]++;
    }
    //sort(ar,ar+n);
    for(i=0;i<n;i++)
    {

        if(a[i]>1)
        {
            cout<<"NO"<<endl;
            c=0;
            break;
        }
    }
    if(c==1)
        cout<<"YES"<<endl;
        return 0
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:17: error: expected ';' before '}' token
   27 |         return 0
      |                 ^
      |                 ;
   28 | }
      | ~
Language: C++

#include <bits/stdc++.h> 
using namespace std; 
  
bool areDistinct(vector<int> arr) 
{ 
    int n = arr.size(); 
    
    unordered_set<int> s; 
    for (int i = 0; i < n; i++) { 
        s.insert(arr[i]); 
    } 
  
    return (s.size() == arr.size()); 
} 
int main() 
{ 
  int a;
  vector<int> arr(0);
  while(true)
  {
    cin >>a;
    if (a<0)
      break;
    arr.pushback(a);
  }
  if (areDistinct(arr)) { 
    cout << "YES"; 
  } 
  else { 
    cout << "NO"; 
  } 

  return 0; 
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:24:9: error: 'class std::vector<int>' has no member named 'pushback'; did you mean 'push_back'?
   24 |     arr.pushback(a);
      |         ^~~~~~~~
      |         push_back
Language: C

#include <stdio.h>
void main()
{
  long long int n,a[200000],x;
  int i,j,flag=0;
  scanf("%lld",&n);
  for(i=0;i<n;i++)
  {
    sacnf("%d",&a[i]);
  }
  for(i=0;i<n;i++)
  {
    x=a[i];
    for(j=1;j<n;j++)
    {
		if(x==a[j])
          flag=1;
     		goto final; 			
    }
  }
  final:
  if(flag==1)
    printf("NO");
  
  else
    printf("YES");
}
      
      	

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

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

int main（）
{
    int n;
    int array[200010];
    int i,j;
    int flag = 0;
    for(i=0 ; i <n; i++)
    cin >> array[i];
    for(i=0 ; i < n ; i++)
    {
        for(j = i + 1 , j < n ; j++)
        {
             if(array[i] == array[j])
             {
               flag = 1;
               break;
             }
        }
        if(flag == 1) break;
    }
    
    if(flag)
        cout << "NO" << endl;
    else
        cout << "YES" << endl;
     return 0;
}


Compiler output:
a.cc:6:5: error: expected primary-expression before 'int'
    6 |     int n;
      |     ^~~
a.cc:6:5: error: expected '}' before 'int'
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
a.cc:10:5: error: expected unqualified-id before 'for'
   10 |     for(i=0 ; i <n; i++)
      |     ^~~
a.cc:10:15: error: 'i' does not name a type
   10 |     for(i=0 ; i <n; i++)
      |               ^
a.cc:10:21: error: 'i' does not name a type
   10 |     for(i=0 ; i <n; i++)
      |                     ^
a.cc:12:5: error: expected unqualified-id before 'for'
   12 |     for(i=0 ; i < n ; i++)
      |     ^~~
a.cc:12:15: error: 'i' does not name a type
   12 |     for(i=0 ; i < n ; i++)
      |               ^
a.cc:12:23: error: 'i' does not name a type
   12 |     for(i=0 ; i < n ; i++)
      |                       ^
a.cc:25:5: error: expected unqualified-id before 'if'
   25 |     if(flag)
      |     ^~
a.cc:27:5: error: expected unqualified-id before 'else'
   27 |     else
      |     ^~~~
a.cc:29:6: error: expected unqualified-id before 'return'
   29 |      return 0;
      |      ^~~~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

#include<memory.h>
using namespace std;
int main()
{
	int n,i,j,k,a[200001];
	int data[200001];
	memset(data,1,sizeof(int)*200001);
	cin>>n;
	for(i=1;i<=n;i++)
		cin>>a[i];
	for(i=1;i<=n;i++)
		for(j=i+1;j<=n;j++)
			if(a[i]>a[j])
				swap(a[i],a[j]);
	for(i=2;i<=n;i++)
		if(a[i]==a[i-1])
			data[k]++;
		else if(data[k]%2==1)
		{
			cout<<"NO"<<endl;
			return 0;
		}
		else
			k++;
	
	if(data[k]%2==1)
		cout<<"NO"<<endl;
	else
		cout<<"Yes"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin>>n;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<memory.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:14:33: error: 'swap' was not declared in this scope
   14 |                                 swap(a[i],a[j]);
      |                                 ^~~~
a.cc:20:25: error: 'cout' was not declared in this scope
   20 |                         cout<<"NO"<<endl;
      |                         ^~~~
a.cc:20:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:37: error: 'endl' was not declared in this scope
   20 |                         cout<<"NO"<<endl;
      |                                     ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<memory.h>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:27:17: error: 'cout' was not declared in this scope
   27 |                 cout<<"NO"<<endl;
      |                 ^~~~
a.cc:27:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:27:29: error: 'endl' was not declared in this scope
   27 |                 cout<<"NO"<<endl;
      |                             ^~~~
a.cc:27:29: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:29:17: error: 'cout' was not declared in this scope
   29 |                 cout<<"Yes"<<endl;
      |                 ^~~~
a.cc:29:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:29:30: error: 'endl' was not declared in this scope
   29 |                 cout<<"Yes"<<endl;
      |                              ^~~~
a.cc:29:30: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include "iomanip"
#include "iostream"
#include "string"
#include "vector"
#define rep(i, to) for (ll i = 0; i < (to); ++i)
#define rep1(i, to) for (ll i = 1; i <= (to); ++i)
#define all(vec) vec.begin(), vec.end()
#define unless(cond) if (!(cond))
using namespace std;
typedef long long ll;
template <typename T>
using V = vector<T>;

template <typename T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}

template <typename T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}

template <typename T>
void drop(const T& x) {
  cout << x << endl;
  exit(0);
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);

  ll N;
  cin >> N;
  V<ll> as(N);
  for (auto& a : as) cin >> a;

  sort(all(as));

  rep(i, N - 1) {
    if (as[i] == as[i + 1]) {
      drop("NO");
    }
  }

  cout << "YES" << endl;
}


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

#pragma GCC optimize("Ofast")
#include<stdio.h>
int main()
{
    int num;
    scanf("%d", &num);
    int* a = new int[num];
  	for(int i = 0; i < num; i++)
    {
        scanf("%d", &a[i]);
    }
  	for(int i=0;i<num;i++){
      for(int j=0;j<i;j++){
        if(a[i]==a[j]){
          printf("NO\n");
          goto end;
        }
      }
    }
  	printf("YES\n");
  	end: return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:14: error: 'new' undeclared (first use in this function)
    7 |     int* a = new int[num];
      |              ^~~
main.c:7:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:18: error: expected ',' or ';' before 'int'
    7 |     int* a = new int[num];
      |                  ^~~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int N;
  cin>>N;
  int old=0;
  for(int i=0;i<N;){
    int a;
    cin>>a;
    if(a != old) {old=a;i++;}
  }
  if(i==N-1) cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:6: error: 'i' was not declared in this scope
   12 |   if(i==N-1) cout<<"YES"<<endl;
      |      ^
Language: Java

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

public class C154 {

	public static void main(String[] args) {

		int n;

		Scanner sc = new Scanner(System.in);

		n = sc.nextInt();

		HashSet<Integer> hs = new HashSet<Integer>();

		boolean flag = false;
		String ans = "";

		for (int i = 1; i <= n; i++) {

			int tmp = sc.nextInt();

			if (hs.contains(tmp)) {
				flag = true;
				break;
			} else {
				hs.add(tmp);
			}
		}

		if (flag) {
			ans = "NO";
		} else {
			ans = "YES";
		}

		System.out.println(ans);

	}

}


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

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


int main(){
    int n; cin >> n;
    vector<int> v(n+1);
    rep(i, n) cin >> v[i];
    sort(v.begin(), v.end());
    bool ans = false;
    rep(i, n){
        if(v[i] == v[i+1]){
            ans = true;
            break;
        }
    }
    if(ans) cout << "NO"; else cout << "YES";
}

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


import java.util.*;

public class Main{
    public static void main(String args[])
    {
    	boolean ans=true;
        Scanner sc=new Scanner(System.in);     
        int size=sc.nextInt();
        int elements[]=new int[ size];
        for(int i=0;i<size;i++)
        {
        	elements[i]=sc.nextInt();
        	   	
        }
        Arrays.sort(elements);
        for(int j=size-1;j>0;j--)
        {
        if(elements[j]==elements[j-1])
        {
        	ans=false;
        	break;
        }
        }
        
        if(ans)
       System.out.println("YES");
        else
        	System.out.println("NO");
        	
        
        
        
        
        
    }


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

#include <iostrean>
using namespace std;
int main(){
  int N;
  cin>>N;
  int old=0;
  for(int i=0;i<N;){
    int a;
    cin>>a;
    if(a != old) {old=a;i++;}
  }
  if(i==N-1) cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
  return 0;
}

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

#include <bits/stdc++.h>
#define N 1000000000
using namespace std;
int f[N+5],i;
int main()
{
	cin>>n;
	while(n--)
	{
		scanf("%d",i);
		f[i]++;
	}
	for(i=0;i<=N;i++)
		if(f[i]>1)
		{
			printf("YES");
			return 0;
		}
	printf("NO");
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |         cin>>n;
      |              ^
      |              yn
Language: C++

#include<bits.stdc++.h>
using namespace std;
int main() 
{ 
    set<int> s; 
    int n;
    cin>>n;
    for(int i=0;i<n;i++)
    {
      int a;
      cin>>a;
      s.insert(a);
    }
    if (s.size()==n) { 
        cout << "YES"; 
    } 
    else { 
        cout << "NO"; 
    } 
  
    return 0; 
} 

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

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


int n;
int a[10000005];


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

Compiler output:
a.cc: In function 'int main()':
a.cc:20:25: error: expected primary-expression before '}' token
   20 |                         }
      |                         ^
a.cc:19:39: error: expected ';' before '}' token
   19 |                                 return
      |                                       ^
      |                                       ;
   20 |                         }
      |                         ~
Language: C++

#include<stdio.h>
main(){
  int n,i,flg;
  long a[20000];
  
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%ld ",&a[i]);
  }
  
  flg = 0;
  for(i=0;i<n-1;i++){
    for(j=i+1;j<n;j++){
      if(a[i] == a[j]){
        flg = 1;
      }
    }
  }
  if(flg == 0){
    printf("YES");
  }else{
    printf("NO");
  }
}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:13:9: error: 'j' was not declared in this scope
   13 |     for(j=i+1;j<n;j++){
      |         ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> N;
      |   ^~~
a.cc:5:3: error: 'vector' was not declared in this scope
    5 |   vector<int> A(N);
      |   ^~~~~~
a.cc:5:10: error: expected primary-expression before 'int'
    5 |   vector<int> A(N);
      |          ^~~
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   rep(i,N){
      |       ^
a.cc:7:3: error: 'rep' was not declared in this scope
    7 |   rep(i,N){
      |   ^~~
a.cc:11:7: error: 'A' was not declared in this scope
   11 |  sort(A.begin(), A.end());
      |       ^
a.cc:11:2: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |  sort(A.begin(), A.end());
      |  ^~~~
      |  short
a.cc:17:16: error: 'cout' was not declared in this scope; did you mean 'count'?
   17 |   if(count==0) cout << "YES" << endl;
      |                ^~~~
      |                count
a.cc:17:33: error: 'endl' was not declared in this scope
   17 |   if(count==0) cout << "YES" << endl;
      |                                 ^~~~
a.cc:18:8: error: 'cout' was not declared in this scope; did you mean 'count'?
   18 |   else cout << "NO" << endl;
      |        ^~~~
      |        count
a.cc:18:24: error: 'endl' was not declared in this scope
   18 |   else cout << "NO" << endl;
      |                        ^~~~
Language: C++

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

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:13:9: error: 'j' was not declared in this scope
   13 |     for(j=i+1;j<n;j++){
      |         ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
	string ans="YES";
	int N;
	long int A[200000];
	cin >> N;
	//vector<int> X(10000),L(100000);
	for (int i = 0; i < N; i++) {
		cin >> A[i];
	}

	sort(A, A + N);

	for (int i = 0; i < N; i++) {
		if (A[i] == A[i + 1]) {
			ans = "NO";
			continue;
		}
	}

	cout << ans << endl;
}

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

#include<stdio.h>
#include<map>
using namespace std;
map<long long int ,int>a;
int main()
{
    int n,x=0;
    long long int b;
    scanf("%d",&n);
    for(int i=0;i<n;i++)
         {scanf("%lld",&b);
         if(a[b]==0)a[b]=1;
           else x=1;}
           if(x)printf("NO\n");
             else printf("YES\n");


}


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

#include<iostream>
#include<stdio.h>
#include <vector>
#include <algorithm>
using namespace std;
#define SIZE_OF_ARRAY(a) (sizeof(a)/sizeof(a[0]))

int main(){
  int n;
  long long a[200000];
  cin>>n;
  for(int i=0;i<n;i++)
    cin>>a[i];
  sort( a,a+n);
    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:15:10: error: 'i' was not declared in this scope
   15 |     if(a[i]==a[i-1]){
      |          ^
a.cc: At global scope:
a.cc:20:3: error: 'cout' does not name a type
   20 |   cout<<"YES"<<endl;
      |   ^~~~
a.cc:21:3: error: expected unqualified-id before 'return'
   21 |   return 0;
      |   ^~~~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

#include<iostream>
#include<cmath>
#include<string>
#include<algorithm>
#include <iomanip>
#include<sstream>
using namespace std;
bool z[1000000003];
int main()
{
    bool p;
    int n, i, a;
    while (cin >> n )
    {
        p = 0;
        memset(z, 0, 1000000003);
        while (n--)
        {
            cin >> a;
            if (z[a] == 1)
                p = 1;
           z[a]++;
        }
           if (p == 1)
               cout << "NO" << '\n';
           else cout << "YES" << '\n';
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'memset' was not declared in this scope
   16 |         memset(z, 0, 1000000003);
      |         ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include <iomanip>
  +++ |+#include <cstring>
    6 | #include<sstream>
a.cc:22:15: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
   22 |            z[a]++;
      |            ~~~^
Language: C

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

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

	scanf("%d", &index);

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

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: unknown type name 'bool'
    7 |         bool nums[200000] = {};
      |         ^~~~
main.c:4:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    3 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    4 |
Language: C++

#include <bits/stdc++.h> 
using namespace std;
#define rep(i, N) for(int i=0; i<N; i++)
typedef long long ll;
#define dump(x) cerr<<#x<<"="<<x<<endl

int main() {
    int n; cin >> n;
    vector<ll> a(n);
    rep(i, n) cin >> a.at(i);

    vector<bool> used(100000010, false);
    rep(i, n){
        if(!used.at(a.at(i))){
            used.at(a.at(i)) = true;
        }
        else{
            cout << "NO" << endl; 
            return 0;
        }
    }

    cout << "YES" << endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:23:27: error: expected '}' at end of input
   23 |     cout << "YES" << endl;
      |                           ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int c[200005];
int main(){
  int a,b;
  cin>>a;
  for(int i=0;i<a;i++){
    cin>>b;
    c[i]=c;
    for(int j=0;j<i;j++)
      if(c[i]==c[j]){
        cout<<"NO";
        return 0;
      }
  }
  cout<<"YES";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: invalid conversion from 'int*' to 'int' [-fpermissive]
    9 |     c[i]=c;
      |          ^
      |          |
      |          int*
Language: C

#include <stdio.h>

int compar(const void *p1, const void *p2);

int main()
{
	int i,n,flag = 1;
	
	scanf("%d",&n);
	
	int a[n];
	
	for(i = 0;i < n;i++)
	{
		scanf("%d",&a[i]);
	}
	
	qsort(a,n,sizeof(int),int (*compar)(const void *, const void*));
	
	for(i = 0;i < n;i++)
	{
		if(a[i] == a[i+1])
		{
			flag = 0;
			break;
		}
	}
	
	printf("%s\n",flag == 1?"Yes":"No");
	
	return 0;
}

int compar(const void *a, const void *b)
{
	return *(int*)b-*(int*)a;
}

Compiler output:
main.c: In function 'main':
main.c:18:9: error: implicit declaration of function 'qsort' [-Wimplicit-function-declaration]
   18 |         qsort(a,n,sizeof(int),int (*compar)(const void *, const void*));
      |         ^~~~~
main.c:18:31: error: expected expression before 'int'
   18 |         qsort(a,n,sizeof(int),int (*compar)(const void *, const void*));
      |                               ^~~
Language: C++

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

#include <stdio.h>

void swap(int* a, int* b)
{
    int t = *a;
    *a = *b;
    *b = t;
}

int partition (int array[], int l, int r) {
    int pivot = array[r];
    int i = (l - 1);

    for (int j = l; j <= r - 1; j++) {
        if (array[j] <= pivot) {
            i++;
            swap(&array[i], &array[j]);
        }
    }
    swap(&array[i + 1], &array[r]);
    return (i + 1);
}

void quickSort(int array[], int l, int r) {
    if (l < r) {
        int pivot = partition(array, l, r);
        quickSort(array, l, pivot - 1);
        quickSort(array, pivot + 1, r);
    }
}



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

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

  for(int i=0;i<N;i++){
       cin >> A[i];
   }
  
   quickSort(A, 0, sizeof(A) / sizeof(A[0]) - 1);
  
   // 出力
   int before = -99999;
  
   for(int i=0;i<N;i++){
       if(before == N[i])  {
           cout << "NO" << endl;
           return 0;
       }
   }
   cout << "YES" << endl;

   return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:58:22: error: invalid types 'int[int]' for array subscript
   58 |        if(before == N[i])  {
      |                      ^