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

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

int main()
{
    int A;
    int B[210000];
    cin >> A;
    for(int i=0; i < A ;i++){
        cin >> B[i];
    }
    std::sort(B, A+B);
    int flag = 0;
    for(int i=0;i < A-1 ;i++){
            if (B[i] == B[i+1]){
                cout << "NO" << endl;
                flag = 1;
                break;
            }
        }
        if(flag == 0) cout << "YES" << endl;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   14 |     std::sort(B, A+B);
      |          ^~~~
      |          qsort
Language: C

#include <stdio.h>
 
int main(){
  int N, num;
  
  scanf("%d", &N);
  for(int i=0; i<N; i++){
    scanf("%d", num[i]);
    for(int j=0; j<i; j++){
      if(num[j]==num[i]){
        printf("NO");
        return 0;
      }
    }
  }
  printf("YES");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:20: error: subscripted value is neither array nor pointer nor vector
    8 |     scanf("%d", num[i]);
      |                    ^
main.c:10:13: error: subscripted value is neither array nor pointer nor vector
   10 |       if(num[j]==num[i]){
      |             ^
main.c:10:21: error: subscripted value is neither array nor pointer nor vector
   10 |       if(num[j]==num[i]){
      |                     ^
Language: C

#include <stdio.h>
 
int main(){
  int N, num;
  
  scanf("%d", &N);
  for(int i=0; i<N; i++){
    scanf("%d", &num[i]);
    for(int j=0; j<i; j++){
      if(num[j]==num[i]){
        printf("NO");
        return 0;
      }
    }
  }
  printf("YES");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:21: error: subscripted value is neither array nor pointer nor vector
    8 |     scanf("%d", &num[i]);
      |                     ^
main.c:10:13: error: subscripted value is neither array nor pointer nor vector
   10 |       if(num[j]==num[i]){
      |             ^
main.c:10:21: error: subscripted value is neither array nor pointer nor vector
   10 |       if(num[j]==num[i]){
      |                     ^
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:8:20: error: subscripted value is neither array nor pointer nor vector
    8 |     scanf("%d", num[i]);
      |                    ^
main.c:10:13: error: subscripted value is neither array nor pointer nor vector
   10 |       if(num[j]==num[i]){
      |             ^
main.c:10:21: error: subscripted value is neither array nor pointer nor vector
   10 |       if(num[j]==num[i]){
      |                     ^
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];
    }
    
    string ans="YES";
    sort(a,a+n);

    for(int i=1;i<n;i++){
        if(a[i-1]==a[i]){
            ans="NO";
            break;
        }
    }

    
    cout << ans << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   14 |     sort(a,a+n);
      |     ^~~~
      |     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];
    }
    
    string ans="YES";
    sort(a,a+n,greater<int>());

    for(int i=1;i<n;i++){
        if(a[i-1]==a[i]){
            ans="NO";
            break;
        }
    }

    
    cout << ans << endl;
    
    return 0;
}

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

#include<stdio.h>
void main()
{
  int n,i,j,c=0,t;
	//int n;
  scanf("%d",&n);
  int a[n];
  for (i=0;i<n;i++)
  { scanf("%d",&a[i]);}
  for (i=0;i<n;i++)
  {
    for (j=i+1;j<=n;j++)
    {
    	if (a[i]>a[j])
        {   t=a[i];
        a[i]=a[j];
        a[j]=t;}
      
    }
    
  }
  for (i=0;i<n;i++)
  {
    
    	if (a[i]==a[i+1])
        {    c=1;
         break;}
      
    }
    
  }
  
  if (c!=0)
    {printf("NO");
   }
  else
    printf("YES");
  
}


Compiler output:
main.c:33:3: error: expected identifier or '(' before 'if'
   33 |   if (c!=0)
      |   ^~
main.c:36:3: error: expected identifier or '(' before 'else'
   36 |   else
      |   ^~~~
main.c:39:1: error: expected identifier or '(' before '}' token
   39 | }
      | ^
Language: C++

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

int main(){
  int N;
  vector<int> A(N);
  cin >> N;
  for(int i, = 0;  i < N; i++){
    int j;
    i != j;
    cin >> A.at(i);
    if(A.at(i) != A.at(j)){
    cout << "YES" << endl;
    }
    else{
    cout << "NO" << endl;
    }
  }
}


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

#include <iostream>
#include <string>
#include <stdio.h>
using namespace std;
 
int main(){
  	int n;
  	string str,a,ans;
  	cin >> n;
  	for (int i = 0; i < n; i++) {
	cin >> a;
    str += a;
	}
  	ans = "YES";
	for(int i = 0; i < n; ++i){
    char ch1 = str[i];
   		for(int ii = 0; ii < n; ++ii){
   	 	char ch2 = str[ii];
          if (ch1 == ch2);
          ans = "NO";
          break;
   		 }     
    }
	
    cout << ans << endl;
    return 0;
}
10000000 10000000

Compiler output:
a.cc:28:1: error: expected unqualified-id before numeric constant
   28 | 10000000 10000000
      | ^~~~~~~~
Language: C

#include <stdio.h>

int main(){
   int n,flag=0;
   int a[200000];
   scanf("%d",&n);
   for(int i = 0;i < n;i++){
      scanf("%d",&a[i]);
   }
   for(int i = 0;i < n;i++){
      for(int j = i + 1;j < n;j++){
         //printf("%d %d\n",a[i],a[j]);
         if(a[i] == a[j]){
            flag = 1;
            break;
         }
      }
      if(flag == 1)break;
   }
   if(flag == 1)printf("No");
   else (flag == 0)printf("Yes");
}

Compiler output:
main.c: In function 'main':
main.c:21:20: error: expected ';' before 'printf'
   21 |    else (flag == 0)printf("Yes");
      |                    ^~~~~~
      |                    ;
Language: C++

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


int main(){

    int N, K;
    cin >> N >> K;
    int vec[N];
    //vector<int> vec(N);

    for (int i=0; i<N; i++){
        //cin >>vec.at(i);        
        cin >> vec[i]
    }
    int max=-100;
    //index=0;
    for (int i=0; i<(N-K+1); i++){
        int sum=0;
        for (int j=0; j<K; j++){
            sum += (float(vec[i+j]+1))/2;
        }
        if (sum>max){
            max=sum;
        }
    }
    cout << max <<endl;

    return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:22: error: expected ';' before '}' token
   15 |         cin >> vec[i]
      |                      ^
      |                      ;
   16 |     }
      |     ~
Language: C++

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

int main(){
  int N;
  vector<int> A(N);
  cin >> N;
  for(int i, j = 0; i != j; i < N; i++){
    cin >> A.at(i);
    if(A.at(i) != A.at(j)){
    cout << "YES" << endl;
    }
    else{
    cout << "NO" << endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:34: error: expected ')' before ';' token
    8 |   for(int i, j = 0; i != j; i < N; i++){
      |      ~                           ^
      |                                  )
a.cc:8:36: error: 'i' was not declared in this scope
    8 |   for(int i, j = 0; i != j; i < N; i++){
      |                                    ^
Language: C++

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

int main(){
    int N;
    cin >> N;
    vector<int> V(N), W(N);
    for(int i = 0; i < N; i++){
        cin >> V.at(i);
    }
    //入力終了
    bool A = true;
    for(int i = 0; i < N; i++){
        if(find(V.begin(),V.end(),i) !== V.end()){
            A = false;
            break;
        }
    }
    //以下出力
    if(A == true){
        cout << "YES" << endl;
    }
    else{
        cout << "NO" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:40: error: expected primary-expression before '=' token
   14 |         if(find(V.begin(),V.end(),i) !== V.end()){
      |                                        ^
Language: C++

#pragma GCC optimize("Ofast")

// #define _GLIBCXX_DEBUG

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

#define rep(i,n) for(long long i=0;i<(long long)(n);i++)
#define REP(i,k,n) for(long long i=k;i<(long long)(n);i++)
#define all(a) a.begin(),a.end()
// #define NP next_permutation;
#define pb push_back
#define eb emplace_back
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
#define ub(v,k) (upper_bound(all(v),k)-v.begin())
#define fi first
#define se second
typedef long long ll;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> PP;
// typedef multiset<ll> S;
typedef priority_queue<ll> PQ;
typedef priority_queue<P,vector<P>,greater<P>> SPQ;
using vi=vector<ll>;
using vvi=vector<vi>;
// using vvvi=vector<vvi>;
/*
const ll inf=1001001001001001;
const int INF=1001001001;
const int mod=1000000007;
const double pi=3.14159265358979323846;
*/
template<class T> bool chmin(T&a,T b){if(a>b){a=b; return true;}return false;}
template<class T> bool chmax(T&a,T b){if(a<b){a=b; return true;}return false;}
// template<class T> void decimal(T a){cout<<fixed<<setprecision(a);}
template<class T> void out(T a){cout<<a<<endl;}

template<class T> void outp(T a){cout<<'('<<a.fi<<','<<a.se<<')'<<endl;}
template<class T> void outvp(T v){rep(i,v.size())outp(v[i]);}
template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<endl;}
template<class T> void outvv(T v){rep(i,v.size()){rep(j,v[i].size()){if(j)cout<<' ';cout<<v[i][j];}cout<<endl;}}

void YesNo(bool a){if(a) out("Yes"); else out("No");}
void yesno(bool a){if(a) out("yes"); else out("no");}
void YESNO(bool a){if(a) out("YES"); else out("NO");}
ll GCD(ll a,ll b){ll c; while(b!=0){c=a%b; a=b; b=c;} return a;}
ll LCM(ll a,ll b){return(a/GCD(a,b))*(b/GCD(a,b))*GCD(a,b);}
ll POW(ll a,ll b){ll c=1; while(b>0){if(b&1){c=a * c%mod;} a=a * a%mod; b>>=1;} return c;}
vi calc(ll x){vi res; while(x>0){res.eb(x%10); x/=10;} reverse(all(res)); return res;}

void solve() {
  ll n; cin>>n; vi A(n); rep(i,n) cin>>A[i];
  sort(all(A)); bool f=true;
  rep(i,n-1){
    if(A[i]==A[i+1]){
      f=false;
    }
  }
  YESNO(f);
}

signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  solve();
}


Compiler output:
a.cc: In function 'll POW(ll, ll)':
a.cc:48:54: error: 'mod' was not declared in this scope; did you mean 'modf'?
   48 | ll POW(ll a,ll b){ll c=1; while(b>0){if(b&1){c=a * c%mod;} a=a * a%mod; b>>=1;} return c;}
      |                                                      ^~~
      |                                                      modf
a.cc:48:68: error: 'mod' was not declared in this scope; did you mean 'modf'?
   48 | ll POW(ll a,ll b){ll c=1; while(b>0){if(b&1){c=a * c%mod;} a=a * a%mod; b>>=1;} return c;}
      |                                                                    ^~~
      |                                                                    modf
Language: C++

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

int main(){
  int N;
  vector<int> A(N);
  cin >> N;
  for(int i = 0; i < N; i++){
    cin >> A.at(i);
    if(A.at(i) != A.at!(i)){
    cout << "YES" << endl;
    }
    else{
    cout << "NO" << endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and '<unresolved overloaded function type>' to binary 'operator!='
   10 |     if(A.at(i) != A.at!(i)){
      |        ~~~~~~~ ^~ ~~~~
      |            |        |
      |            |        <unresolved overloaded function type>
      |            __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}
a.cc:10:23: error: expected ')' before '!' token
   10 |     if(A.at(i) != A.at!(i)){
      |       ~               ^
      |                       )
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <vector>
using namespace std;

int main(void)
{
	long long n;
	vector<long long> a;

	scanf("%lld", &n);
	a.resize(n);
	for (int i=0; i<n; i++){
		scanf("%lld", &a[i]);
	}

	sort(a.begin(), a.end());

	bool flag=false;
	int i=0;
	while(!flag && i<n-1){
		if (a[i] ==  a[i+1]){
			flag = true;
		}
		i++;
	}

	if (flag) printf("NO\n");
	else printf("YES\n");

	return 0;
}

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

#include <stdio.h>

int main()
{
	int n,i,j,k;
	scanf("%d",&n);
	int a[n];

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

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

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

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

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

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

int main(){
  int N;
  vector<int> A(N);
  cin >> N;
  for(int i = 0; i < N; i++){
    cin >> A.at(i);
  }
  if(A.at(i) != A.at(i)){
    cout << "YES" << endl;
  }
  else{
    cout << "NO" << endl;
  }
}

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

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

int main() {

  // 文字列
 int N;
 string A;  // 文字列変数を宣言
cin>>N;

int count = 0;
for (int i=0;i<A.size();i++){
    if(A.at(i)== 'N'){
        count++;
    
    }
}
  if (count==0){
   cout<<endl;
    cout<<"YES"<<endl;
    }
else{
    cout<<endl;
    cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <functional>
#include <algorithm>
#include <math.h>
#include <iomanip>
#include <vector>
#define ll long long
#define ALLv(a)  (a).begin(),(a).end()
#define ALL(a,n)  (a),(a)+n

#define INF 1010000000000000017LL
#define MOD 1000000007LL
#define EPS 1e-12
#define PI 3.14159265358979323846
//REPEAT
//------------------------------------------
#define FOR(i,m,n) for(int (i)=(m);(i)<(n); i++)
#define REP(i,n) for(int (i)=0;(i)<(n);(i)++)
#define REPS(i,x) for(int i=1;i<=(int)(x);i++)
#define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--)
#define RREPS(i,x) for(int i=((int)(x));i>0;i--)
#define WREP(i,in,j,jn) REP(i,in)REP(j,jn)
using namespace std;
//-------------------------------------------

int main(void){
	int N;cin>>N;
	ll A[N];REP(i,N)cin>>A[i];
	sort(ALL(i,N));
	bool ret=false;
	REP(i,N-1)if(A[i]==A[i+1])ret=true;
	cout<<(ret?"YES":"NO");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:18: error: 'i' was not declared in this scope
   29 |         sort(ALL(i,N));
      |                  ^
a.cc:9:20: note: in definition of macro 'ALL'
    9 | #define ALL(a,n)  (a),(a)+n
      |                    ^
Language: Java

import java.util.*;

public class C {
  public static void main(String[] args) {
    Scanner sc = new java.util.Scanner(System.in);
    int N = Integer.parseInt(sc.nextLine());
    String[] sNumbers = sc.nextLine().split(" ");
    Map<Integer, Integer> numbers = new HashMap<>();
    for (Integer i = 0; i < sNumbers.length; i++) {
      numbers.put(Integer.parseInt(sNumbers[i]), i);
    }
    if (numbers.size() == N) {
      System.out.println("YES");
    } else {
      System.out.println("NO");
    }
    System.gc();
  }
}


Compiler output:
Main.java:3: 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; 
  
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)
  {
	scanf("%d",&a);
    if (a<0)
      break;
    arr.push_back(&a);
  }
  if (areDistinct(arr)) { 
    printf("YES"); 
  } 
  else { 
    printf("NO"); 
  } 

  return 0; 
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:23:18: error: no matching function for call to 'push_back(int*)'
   23 |     arr.push_back(&a);
      |     ~~~~~~~~~~~~~^~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]' (near match)
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note:   conversion of argument 1 would be ill-formed:
a.cc:23:19: error: invalid conversion from 'int*' to 'std::vector<int>::value_type' {aka 'int'} [-fpermissive]
   23 |     arr.push_back(&a);
      |                   ^~
      |                   |
      |                   int*
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]' (near match)
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note:   conversion of argument 1 would be ill-formed:
a.cc:23:19: error: invalid conversion from 'int*' to 'std::vector<int>::value_type' {aka 'int'} [-fpermissive]
   23 |     arr.push_back(&a);
      |                   ^~
      |                   |
      |                   int*
Language: C++

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

int main() { /* ここに書く */
  long long m;
  m=100000000;
  vector<int>fos(m);
  int x,b,c;
  cin>>x;
  
  for(int i=0;x>i;){
    cin>>b;
    c=fos.at(b);
    
    if(c=!0){
      cout<<"No";
      break;}
    
    i++;
    
    if(i==x){
      cout<<"Yes";
      break;}
  }
  cout<<endl;
  }

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:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int>fos(m);
      |   ^~~~~~
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int>fos(m);
      |          ^~~
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin>>x;
      |   ^~~
a.cc:13:7: error: 'fos' was not declared in this scope
   13 |     c=fos.at(b);
      |       ^~~
a.cc:16:7: error: 'cout' was not declared in this scope
   16 |       cout<<"No";
      |       ^~~~
a.cc:22:7: error: 'cout' was not declared in this scope
   22 |       cout<<"Yes";
      |       ^~~~
a.cc:25:3: error: 'cout' was not declared in this scope
   25 |   cout<<endl;
      |   ^~~~
a.cc:25:9: error: 'endl' was not declared in this scope
   25 |   cout<<endl;
      |         ^~~~
Language: C

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

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

#include <iostream>
#include <string>
#include <vector>

int main(){
    int num, temp, is_dist=1;
    std::vector<int> a;

    // 入力
    std::cin >> num;

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

    for(int i=0; i<a.size; i++){
        for(int j=i+1; j<a.size(); j++){
            std::cout << i << ", " << j << "  " << a[i] << ", " << a[j] << std::endl;
            if(a[i] == a[j]) {
                is_dist = 0;
                break;
            }
        }
        if(is_dist == 0) break;
    }
    // std::cout << is_dist << std::endl;
    if(is_dist == 1) std::cout << "YES" << std::endl;
    else if(is_dist == 0) std::cout << "NO" << std::endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:22: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?)
   17 |     for(int i=0; i<a.size; i++){
      |                    ~~^~~~
      |                          ()
Language: Java

import java.util.*;
public class Past22{
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		double[] v = new double[N];
		double[] val = new double[N];
		double ave = 0;
		for(int i=0;i<N;i++){
			v[i] = sc.nextDouble();
		}
		Arrays.sort(v);
		ave = (v[0] + v[1])/2;
		if(N > 2){
			for(int i = 1; i < N-1; i++){
				ave = (ave + v[i+1])/2;
			}
		}
		System.out.println(ave);
	}
}

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

#include <bits/stdc++.h>

using namespace std;
 
int main()
{
 int n; cin>>n;
 int a[n];int b[n];
 int cnt=0;
 
for (size_t i = 0; i < n; i++)
 {
    cin>>a[i];
 }
 for(int i=0;i<n-1;i++)
{ 
for(int j=i+1,cnt=1;j<n;j++)
{
if(b[j]==-1 &&a[i]==a[j])
{
cnt++;
}
}
if(cnt>1&& a[i]==a[j]&&b[j]==a[i]) printf("YES");
else printf("NO");
return 0;
}}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:24:20: error: 'j' was not declared in this scope
   24 | if(cnt>1&& a[i]==a[j]&&b[j]==a[i]) printf("YES");
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  vector<int> A(N);
    for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
bool  a = false;
  for(int i = 0;i<N-1;i++){
    int s;
    s = A.at(i);
    for(int j = i + 1;j<N;j++){
      if(s == A.at(j)){
        a = true;
           if(a == true){
        break;
      }
    }
    if(a == true){
        break;
    }
  }
  if(a){
    cout << "NO" << endl;
  }
  else{
    cout << "YES" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:2: error: expected '}' at end of input
   31 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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

int main(){
  int n;
  cin >> n;
  int a[n];
  for (int i=1;i<=n;i++)
	cin >> a[i];
  for (int i=1;i<n;i++)
    for (int j=1;i<=n;j++)
      if (a[j]<a[i]){
        int t;
        t=a[j];
        a[j]=a[i];
        a[i]=t;}
  string m="YES";
  for (int i=1;i<n;i++)
    if (a[i]==a[i+1])
      m="NO";
  cout m;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:7: error: expected ';' before 'm'
   21 |   cout m;
      |       ^~
      |       ;
Language: C++

#include<stdio.h>
int main(void)
{  int a[0]=1;
    int i=0,n,j,k;
    scanf("%d",&n);

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:13: error: array must be initialized with a brace-enclosed initializer
    3 | {  int a[0]=1;
      |             ^
Language: C

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

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

Compiler output:
main.c: In function 'main':
main.c:17:41: error: expected ';' before '}' token
   17 |                                 return 0
      |                                         ^
      |                                         ;
   18 |                         }
      |                         ~
Language: C++

int main() {
  int N; cin >> N;
  vector<int>p(N); for (auto&& x : p)cin >> x;
  bool ans = true;
  for (int i = 1; i < N; i++) {
    for (int i2 = 0; i2 < i; i2++) {
      if (p[i] == p[i2]) {ans = false;}
    }
  }
  if (ans == true) { cout << "YES" << endl;}
  else { cout << "NO" << endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:10: error: 'cin' was not declared in this scope
    2 |   int N; cin >> N;
      |          ^~~
a.cc:3:3: error: 'vector' was not declared in this scope
    3 |   vector<int>p(N); for (auto&& x : p)cin >> x;
      |   ^~~~~~
a.cc:3:10: error: expected primary-expression before 'int'
    3 |   vector<int>p(N); for (auto&& x : p)cin >> x;
      |          ^~~
a.cc:3:36: error: 'p' was not declared in this scope
    3 |   vector<int>p(N); for (auto&& x : p)cin >> x;
      |                                    ^
a.cc:7:11: error: 'p' was not declared in this scope
    7 |       if (p[i] == p[i2]) {ans = false;}
      |           ^
a.cc:10:22: error: 'cout' was not declared in this scope
   10 |   if (ans == true) { cout << "YES" << endl;}
      |                      ^~~~
a.cc:10:39: error: 'endl' was not declared in this scope
   10 |   if (ans == true) { cout << "YES" << endl;}
      |                                       ^~~~
a.cc:11:10: error: 'cout' was not declared in this scope
   11 |   else { cout << "NO" << endl;}
      |          ^~~~
a.cc:11:26: error: 'endl' was not declared in this scope
   11 |   else { cout << "NO" << endl;}
      |                          ^~~~
Language: C++

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

int main() {
  // 100要素の配列で初期化
  int n;
  cin>>n;
  vector<int> vec(n);
string a="YES";
  // 100個の入力を受け取る
  for (int i = 0; i < n; i++) {
    cin >> vec.at(i);
  }
  sort (vec.begin(),vec.end());
for (int i=1;i<n;i++){
  if (vec.at(i)==vec.at(i-1))
    a=="NO"
    }
  cout <<a<<endl ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:12: error: expected ';' before '}' token
   17 |     a=="NO"
      |            ^
      |            ;
   18 |     }
      |     ~       
a.cc:17:6: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   17 |     a=="NO"
      |     ~^~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: request for member 'find' in 'c', which is of non-class type 'int [200005]'
   12 |     if(c.find(0,i-1,i)+c.find(i+1,a,i)!=0){
      |          ^~~~
a.cc:12:26: error: request for member 'find' in 'c', which is of non-class type 'int [200005]'
   12 |     if(c.find(0,i-1,i)+c.find(i+1,a,i)!=0){
      |                          ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long a[1000000100];
bool b[1000000100];
int n;
int main()
{
	cin>>n;
	
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];
	}
	for(int i=1;i<=n;i++)
	{
		if(b[a[i]]==0)
		{
			b[a[i]]=1;
		}
		else
		{
			cout<<"No";
			return 0;
		}
	}
	cout<<"Yes";
	return 0;
}

Compiler output:
/tmp/ccVEbdbd.o: in function `main':
a.cc:(.text+0xb): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccVEbdbd.o
a.cc:(.text+0x59): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccVEbdbd.o
a.cc:(.text+0x86): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccVEbdbd.o
a.cc:(.text+0xb0): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccVEbdbd.o
a.cc:(.text+0xe0): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccVEbdbd.o
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  
  vector<int> date(N);
  for(int i = 0; i < N ; i++)
    cin >> date.at(i);
  
  int count = 1;
  for (int i = 0; i < N-1; i++){
    for(int j = i+1; j < N ; j++){
      if(date.at(i) == date.at(j)){
        count = 0;
        break;
      }
      else
        count = 1;
    }
    if(count == 0)
      break;
  }
  if(count)
    cout << "Yes";
  
  else
    cout << "No";

Compiler output:
a.cc: In function 'int main()':
a.cc:29:18: error: expected '}' at end of input
   29 |     cout << "No";
      |                  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <stdlib.h>
#include <vector>
using namespace std;

int main(void)
{
	long long n;
	vector<long long> a;

	scanf("%lld", &n);
	a.resize(n);
	for (int i=0; i<n; i++){
		scanf("%lld", &a[i]);
	}

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

	if (flag) printf("NO\n");
	else printf("YES\n");

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'scanf' was not declared in this scope
   10 |         scanf("%lld", &n);
      |         ^~~~~
a.cc:27:19: error: 'printf' was not declared in this scope
   27 |         if (flag) printf("NO\n");
      |                   ^~~~~~
a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    2 | #include <vector>
  +++ |+#include <cstdio>
    3 | using namespace std;
a.cc:28:14: error: 'printf' was not declared in this scope
   28 |         else printf("YES\n");
      |              ^~~~~~
a.cc:28:14: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: Java

import java.util.*;

public class C {
  public static void main(String[] args) {
    Scanner sc = new java.util.Scanner(System.in);
    int N = Integer.parseInt(sc.nextLine());
    String[] sNumbers = sc.nextLine().split(" ");
    Map<Integer, Integer> numbers = new HashMap<>();
    for (int i = 0; i < sNumbers.length; i++) {
      numbers.put(Integer.parseInt(sNumbers[i]), i);
    }
    if (numbers.size() == N) {
      System.out.println("YES");
    } else {
      System.out.println("NO");
    }
  }
}


Compiler output:
Main.java:3: 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>
#include <iostream>
using namespace std;
typedef long long ll;

int main(){
  int n,k=0,cnt=0;
  cin >> n;
  vector<ll> a(n);
  for(int i=0;i<n;i++){
    cin >> a.at(i);
    cnt = max(cnt,a.at(i));
  }
  
  vector<int> c(cnt);
  for(int i=0;i<n;i++){
    c.at(a.at(i)-1)++;
    if(c.at(a.at(i)-1) >=2){
      k = -1;
      break;
    }
  }
  if(k==0) cout << "YES" << endl;
  else cout << "NO" << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: no matching function for call to 'max(int&, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&)'
   12 |     cnt = max(cnt,a.at(i));
      |           ~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:12:14: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'})
   12 |     cnt = max(cnt,a.at(i));
      |           ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:12:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   12 |     cnt = max(cnt,a.at(i));
      |           ~~~^~~~~~~~~~~~~
Language: C++

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

int main()
{
  int n, k;
  cin >> n >> k;
  
  vector<double> p(n - k + 1, 0);
  double temp, max = 0;
  
  for(int i = 0; i < n; i++){
    cin >> temp;
    temp = (temp+1) * 0.5; 
    for(int j = 0; j < k; j++){
      if(i - j >= 0 && i - j < p.size()){
        p.at(i - j) += temp;
      }
    }
    
    if(i > k - 1){
      if(a.at(i - k + 1) > max){
        max = a.at(i - k + 1);
      }
    }
  }
  
  cout << max << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:10: error: 'a' was not declared in this scope
   22 |       if(a.at(i - k + 1) > max){
      |          ^
Language: C

#include<stdio.h>
int main(void){
  /* long int n,a[200000],i,j,f;
  scanf("%ld",&n);
  for(i=0;i<n;i++){
    scanf("%ld",&a[i]);
  }
  for(i=0;i<n-1;i++){
    for(j=i+1;j<n;j=j+2){
      if(a[i]==a[j]||a[i]==a[j+1]){
	f++;
	break;
      }}
      if(f==1){
	break;
      }
    }
  if(f!=1){
    printf("YES\n");
  }else{
    printf("NO\n");
  }
  return 0;
  }*/

int n,a[200000],b[10000000000]=0,i,f;
scanf("%d",&n);
for(i=0;i<n;i++){
  scanf("%d",&a[i]);
 }
  
for(i=0;i<n;i++){
  b[a[i]]++;
  if(b[a[i]]==2){
    f++;
    break;
  }
 }
if(f!=1){
  printf("YES\n");
 }else{
  printf("NO\n");
 }
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:26:32: error: invalid initializer
   26 | int n,a[200000],b[10000000000]=0,i,f;
      |                                ^
Language: C++

import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val a = (0 until n).map {
        sc.next().toLong()
    }
 
    a.sorted()
    abc154c(a)
}
 
fun abc154c(a: List<Long>) {
    var ans = "YES"
    for (i in 0..a.size - 1) {
        var ai = a.get(i)
        if (i != a.indexOf(ai)) {
           ans = "NO" 
           break
        }
    }
 
    println(ans)
}

Compiler output:
a.cc:4:29: error: stray '`' in program
    4 |     val sc = Scanner(System.`in`)
      |                             ^
a.cc:4:32: error: stray '`' in program
    4 |     val sc = Scanner(System.`in`)
      |                                ^
a.cc:16:15: error: too many decimal points in number
   16 |     for (i in 0..a.size - 1) {
      |               ^~~~~~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:14:1: error: 'fun' does not name a type
   14 | fun abc154c(a: List<Long>) {
      | ^~~
Language: C++

#include <iostream>
#include <iostream>   // std::cout, std::endl;
#include <algorithm>  // std::unique
#include <vector>     // std::vector

using namespace std;

int main()
{
    int N;
    string d[110];
    string A;
    cin >> N;

for(int i=0; i<N; ++i) {

    cin >> d[i]
}

string G = d[0] +d[1]+d[2]+d[3]+d[4];

 G.erase(unique(G.begin(), G.end()), G.end());


     int a = G.size();

     string answer;

if (a ==5) {
answer= "YES";
}else{
    answer= "NO";
}

    cout << answer << endl;
}

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

#include <stdio.h>
#include <string.h>
  long n;
  long numbers[1000000000];
  long p=0;


int search(long key){
for(long i=0;i<p;i++){
if(numbers[i]==key)return 1;//Found
}

return 0;//Not found
}


int main(void)
{
 
scanf("%ld",&n);

int flg=0;

for(int i=0;i<n;i++){
    long tmp=0;
    scanf("%ld",&tmp);

    if(flg==0){
    if(search(tmp)==0){
        numbers[p]=tmp;
        p++;
    }else{
        flg=1;
    }
    }
}

if(flg==0){
    printf("YES");
}else{
    printf("NO");
}
  return 0;
}


Compiler output:
/tmp/ccmmQmmp.o: in function `search(long)':
a.cc:(.text+0x3e): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccmmQmmp.o
/tmp/ccmmQmmp.o: in function `main':
a.cc:(.text+0xc6): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccmmQmmp.o
a.cc:(.text+0xe4): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccmmQmmp.o
a.cc:(.text+0xef): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccmmQmmp.o
collect2: error: ld returned 1 exit status
Language: C++

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

int main() {
  // 100要素の配列で初期化
  int n;
  cin>>n;
  vector<int> vec(n);
string a="YES"
  // 100個の入力を受け取る
  for (int i = 0; i < n; i++) {
    cin >> vec.at(i);
  }
for (int i=0;i<n;i++){
  for(int j=0;j<i;j++){
    if (vec.at(i)==vec.at(j))
      a="NO";
    
    }
  cout <<a<<endl ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: expected ',' or ';' before 'for'
   11 |   for (int i = 0; i < n; i++) {
      |   ^~~
a.cc:11:19: error: 'i' was not declared in this scope
   11 |   for (int i = 0; i < n; i++) {
      |                   ^
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<stdio.h>
int main()
{
  long n,j,i;
  scanf("%ld",&n);
  long a[n];
  for(long i=0;i<n;i++)
  {
    scanf("%ld",&a[i]);
          }
  sort(a,a+n);
  for(i=0;i<n;i++)
  {
    if(a[i]==a[i+1])
       {
      	goto skip;
    }
         
  }
  if(i==n)
    printf("YES");
skip:
  printf("NO");
  
}
 


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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.List;

public class Main {
  public static void main(String[] args) {
	InputStreamReader isr = new InputStreamReader(System.in);
    BufferedReader br = new BufferedReader(isr);
    
    String inputLen = null;
    String inputArray = null;
    try{
      inputLen = br.readLine();
      inputArray = br.readLine();
    }catch(IOException e){
      e.printStackTrace();
    }
    int len = Integer.perseInt(inputLen);
    List<String> list = Arrays.asList(inputArray.split(" "));
    boolean result = false;
    for(int i = 0; len < i; i++){
      String target = list.get(i);
      list.set(i, null);
      if(list.indexOf(target) != -1){
        result = true;
        break;
      }
    }
    if(result){
	    System.out.println("YES");
    }else{
	    System.out.println("No");
    }
  }
}


Compiler output:
Main.java:20: error: cannot find symbol
    int len = Integer.perseInt(inputLen);
                     ^
  symbol:   method perseInt(String)
  location: class Integer
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.List;

public class Main {
  public static void main(String[] args) {
	InputStreamReader isr = new InputStreamReader(System.in);
    BufferedReader br = new BufferedReader(isr);
    
    String inputLen = null;
    String inputArray = null;
    try{
      inputLen = br.readLine();
      inputArray = br.readLine();
    }catch(IOException e){
      e.printStackTrace();
    }
    int len = Integer.PerseInt(inputLen);
    List<String> list = Arrays.asList(inputArray.split(" "));
    boolean result = false;
    for(int i = 0; len < i; i++){
      String target = list.get(i);
      list.set(i, null);
      if(list.indexOf(target) != -1){
        result = true;
        break;
      }
    }
    if(result){
	    System.out.println("YES");
    }else{
	    System.out.println("No");
    }
  }
}


Compiler output:
Main.java:20: error: cannot find symbol
    int len = Integer.PerseInt(inputLen);
                     ^
  symbol:   method PerseInt(String)
  location: class Integer
1 error
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: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.List;

public class Main {
  public static void main(String[] args) {
	InputStreamReader isr = new InputStreamReader(System.in);
    BufferedReader br = new BufferedReader(isr);
    
    String inputLen = null;
    String inputArray = null;
    try{
      inputLen = br.readLine();
      inputArray = br.readLine();
    }catch(IOException e){
      e.printStackTrace();
    }
    int len = PerseInt(inputLen);
    List<String> list = Arrays.asList(inputArray.split(" "));
    boolean result = false;
    for(int i = 0; len < i; i++){
      String target = list.get(i);
      list.set(i, null);
      if(list.indexOf(target) != -1){
        result = true;
        break;
      }
    }
    if(result){
	    System.out.println("YES");
    }else{
	    System.out.println("No");
    }
  }
}


Compiler output:
Main.java:20: error: cannot find symbol
    int len = PerseInt(inputLen);
              ^
  symbol:   method PerseInt(String)
  location: class Main
1 error
Language: C++

#include<stdio.h>
#include<iostream>
using namespace std;
int N[200001];
int main()
{
    int i,j,number,temp;
    while(cin>>number;){
        for(i=0;i<number;i++){
            cin>>N[i];
        }
        for(i=0;i<number;i++)
        {
            for(j=0;j<i;j++)
            if(N[i]==N[j]) {cout<<"No"<<endl;break;}
            if(j!=i) break;
        }
        if(i==number) cout<<"Yes"<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected ')' before ';' token
    8 |     while(cin>>number;){
      |          ~           ^
      |                      )
a.cc:8:23: error: expected primary-expression before ')' token
    8 |     while(cin>>number;){
      |                       ^