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

#include<iostream>
#include<string>
#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);
  }
  set<int> s;
  for(int i=0;i<N;i++){
    s.insert(a.at(i));
  }
  if(s.size()==N) cout<<"YES";
  else cout<<"NO";
  return 0;
}
    
  


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'set' was not declared in this scope
   14 |   set<int> s;
      |   ^~~
a.cc:4:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
    3 | #include<vector>
  +++ |+#include <set>
    4 | 
a.cc:14:7: error: expected primary-expression before 'int'
   14 |   set<int> s;
      |       ^~~
a.cc:16:5: error: 's' was not declared in this scope
   16 |     s.insert(a.at(i));
      |     ^
a.cc:18:6: error: 's' was not declared in this scope
   18 |   if(s.size()==N) cout<<"YES";
      |      ^
Language: C++

#include<iostream>
#include<string>
#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);
  }
  int s=0;
  for(int i=0;i<N;i++){
    for(int j=0;j<N;j++){
      if(i!=j&&a.at(i)==a.at(j)){
        s++
      }
    }
  }
  if(s!=0) cout<<"No"<<endl;
  else cout<<"No"<<endl;
}
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: expected ';' before '}' token
   18 |         s++
      |            ^
      |            ;
   19 |       }
      |       ~
Language: C++

/*dismint|jjc*/
#include <bits/stdc++.h>
using namespace std;
#define forl(V, S, E) for(int V = S; V < E; V++)
#define ford(V, S, E) for(int V = S; V >= E; V--)
#define fore(E, X) for(auto &E:X)
#define println(X) cout << X << endl
#define printe(X) for(auto &E:X) cout << E << " "; cout << endl
typedef unordered_map<int, unordered_set<int>> graph;
typedef long long ll;

int main() {
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	int n; cin >> n;
	unordered<int> check; forl(i, 0, n) { int a; cin >> a; check.insert(a); }
	if(check.size() != n) println("NO");
	else println("YES");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'unordered' was not declared in this scope
   15 |         unordered<int> check; forl(i, 0, n) { int a; cin >> a; check.insert(a); }
      |         ^~~~~~~~~
a.cc:15:19: error: expected primary-expression before 'int'
   15 |         unordered<int> check; forl(i, 0, n) { int a; cin >> a; check.insert(a); }
      |                   ^~~
a.cc:15:64: error: 'check' was not declared in this scope
   15 |         unordered<int> check; forl(i, 0, n) { int a; cin >> a; check.insert(a); }
      |                                                                ^~~~~
a.cc:16:12: error: 'check' was not declared in this scope
   16 |         if(check.size() != n) println("NO");
      |            ^~~~~
Language: C++

#include<iostream>
using namespace std;
int n,a[200000];
int main(){
	cin>>n;
	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]){
			cout<<"No";
			return 0;
		}
	}
	cout<<"Yes";
	return 0;
}

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

#include<stdio.h>
#include<algorithm>
using namespace std;
int A[210000];
int main(){
  int n;
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>A[i];
  }
  sort(A,A+n);
  for(int i=0;i<n-1;i++){
    if(A[i]==A[i+1]){
      cout<<"NO\n";
      return 0;
    }
  }
  cout<<"YES\n";
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin>>n;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<algorithm>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:14:7: error: 'cout' was not declared in this scope
   14 |       cout<<"NO\n";
      |       ^~~~
a.cc:14:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:3: error: 'cout' was not declared in this scope
   18 |   cout<<"YES\n";
      |   ^~~~
a.cc:18:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
int m;
int n[m+10];
int main()
{
    cin >> m;
    for(int i = 1; i <=m; i++)
    {
        cin >> n[i];
    }
    for(int i = 1; i < m; i++)
        for(int j=i+1; j <= m; j++)
            if(n[i] == n[j])
            {
                cout << "No";
                return 0;
            }
    cout << "Yes";
    return 0;
}

Compiler output:
a.cc:4:8: error: size of array 'n' is not an integral constant-expression
    4 | int n[m+10];
      |       ~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int m,n[m+10];
int main()
{
    cin >> m;
    for(int i = 1; i <=m; i++)
    {
        cin >> n[i];
    }
    for(int i = 1; i < m; i++)
        for(int j=i+1; j <= m; j++)
            if(n[i] == n[j])
            {
                cout << "No";
                return 0;
            }
    return 0;
}

Compiler output:
a.cc:3:10: error: size of array 'n' is not an integral constant-expression
    3 | int m,n[m+10];
      |         ~^~~
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:38: error: expected ';' before 'j'
    9 |   for(i=0; i<n-1; i++) for(j=i+1; j<n j++) if(a[i]==a[j]) oi==0;
      |                                      ^~
      |                                      ;
Language: C++

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

int main(){
  int n;
  cin >> n;
  vector<int> a(n);
  for(int i=0;i<n;i++){
    cin >> a[i];
  }
  sort(a.begin(),a.end());
  bool can=true;
  for(int i=0;i<n-1;i++){
    if(a[i]==a[i+1]){
      can=false;
    }
  }
  if(can) cout << "Yes" << endl;
  else cout << "No" << endl;
}

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

#include<stdio.h>
#include<algorithm>
using namespace std;
int a[210000];
int main(void){
  int n;
  scanf("%d",&n);
  for(int loop=0;loop<n;loop++){
    scanf("%d",a+loop);
  }
  sort(a,a+n);
  for(int loop=0;loop<n-1;loop+){
    if(a[i]==a[loop+1]){
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:32: error: expected primary-expression before ')' token
   12 |   for(int loop=0;loop<n-1;loop+){
      |                                ^
a.cc:13:10: error: 'i' was not declared in this scope
   13 |     if(a[i]==a[loop+1]){
      |          ^
Language: Java

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long[] an = new long[n];
		String answer = "YES";
		for (int i = 0; i < n; i++) {
			an[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < n; j++) {
				if (an[i] == an[j]&&i!=j) {
					answer = "NO";
				}
			}

		}
		System.out.print(answer);
	}
}

Compiler output:
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc  = new Scanner(System.in);
		
		int n = sc.nextInt();
		int[] an = new int[n];
		String answer = "YES";
		for (int i = 0;i<n;i++) {
			an[i] = sc.nextInt();
			for(int j = 1;j<i;j++) {
				if(an[j]==an[i]) {
					answer= "NO";
				}
			}
		}
		System.out.print(answer);
	}

}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

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

int main(){
	// sengen
	map<int , int> mp;
	int n;
	// nyuryoku
	cin >> n;
	for(int i=0;i<n;i++){
		int k;
		cin >> k;
		mp[k]++;
	}
	// keisan
	int mx=0;
	for(auto x:mp){
		mx = max(mx,mp.second);
	}
	// syutsuryoku
	if(mx == 1){
		cout << "Yes";
	}else{
		cout << "No";
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:32: error: 'class std::map<int, int>' has no member named 'second'
   18 |                 mx = max(mx,mp.second);
      |                                ^~~~~~
Language: C++

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

int main(){
	// sengen
	map<int , int> mp;
	int n;
	// nyuryoku
	cin >> n;
	for(int i=0;i<n;i++){
		int k;
		cin >> k;
		map[k]++;
	}
	// keisan
	int mx=0;
	for(auto x:mp){
		mx = max(mx,mp.second);
	}
	// syutsuryoku
	if(mx == 1){
		cout << "Yes";
	}else{
		cout << "No";
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: conflicting declaration 'auto k'
   13 |                 map[k]++;
      |                     ^
a.cc:11:21: note: previous declaration as 'int k'
   11 |                 int k;
      |                     ^
a.cc:13:23: error: expected initializer before '++' token
   13 |                 map[k]++;
      |                       ^~
a.cc:18:32: error: 'class std::map<int, int>' has no member named 'second'
   18 |                 mx = max(mx,mp.second);
      |                                ^~~~~~
Language: C++

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

int main (void){
  long long int n = 0;

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

  cout << "YES\n";

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: 'i' was not declared in this scope
   13 |   for(i = 0;i < n - 1;i++){
      |       ^
a.cc:15:21: error: expected ';' before '}' token
   15 |       cout << "NO\n"
      |                     ^
      |                     ;
   16 |     }
      |     ~
Language: C++

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

int main() {
    int N;

    //Nをまず受け取る
    cin >> N;

    //N要素の配列のメモリを確保
    vector<int> A(N);
    for(int i = 0; i < N; ++i) {
        cin >> A[i];
    }

    //配列をソート O(NlogN)
    sort(A.begin(),A.end());

    //横同士を確認 O(N)
    for(int i = 0; i + 1 < 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:18:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 |     sort(A.begin(),A.end());
      |     ^~~~
      |     short
Language: C

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define lop(i, n) for(i=0; i<n; i++)

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

int main()
{
	int n, i;
	scanf("%d", &n);
	int A[n];
	lop(i, n){
		scanf("%d", &A[i]);
	}
	
	qsort(A, n, sizeof(int), compare_int);
	
	for(i=0; i<n-1; i++){
		if(A[i]==A[i+1]{ )printf("NO"); return 0; }
	} 
	
	printf("YES");
	
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:32: error: expected ')' before '{' token
   23 |                 if(A[i]==A[i+1]{ )printf("NO"); return 0; }
      |                   ~            ^
      |                                )
main.c:23:59: error: expected expression before '}' token
   23 |                 if(A[i]==A[i+1]{ )printf("NO"); return 0; }
      |                                                           ^
main.c: At top level:
main.c:26:16: error: expected declaration specifiers or '...' before string constant
   26 |         printf("YES");
      |                ^~~~~
main.c:28:1: error: expected identifier or '(' before 'return'
   28 | return 0;
      | ^~~~~~
main.c:29:1: error: expected identifier or '(' before '}' token
   29 | }
      | ^
Language: C++

import collections
N = int(input())
A = list(map(int,input().split()))
c= collections.Counter(A)
if len(c)==N:
    print('YES')
else:
    print('No')

Compiler output:
a.cc:6:11: warning: multi-character character constant [-Wmultichar]
    6 |     print('YES')
      |           ^~~~~
a.cc:8:11: warning: multi-character character constant [-Wmultichar]
    8 |     print('No')
      |           ^~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import collections
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

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


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: missing template arguments before '(' token
    6 |   map(int,int) num;
      |      ^
a.cc:6:7: error: expected primary-expression before 'int'
    6 |   map(int,int) num;
      |       ^~~
a.cc:6:11: error: expected primary-expression before 'int'
    6 |   map(int,int) num;
      |           ^~~
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i = 0; i < n; i++) {
      |       ^
a.cc:10:8: error: 'num' was not declared in this scope; did you mean 'enum'?
   10 |     if(num.count(x)) {
      |        ^~~
      |        enum
Language: C++

#include<iostream>
using namespace std;
#define int long long int
signed main(){
  int n;
  cin>>n;
  int a[n];
  for(int i=0;i<n;i++)	cin>>a[i];
  sort(a,a+n);
  for(int i=1;i<n;i++){
    if(a[i]==a[i-1]){
      cout<<"No"<<endl;
      return 0;
    }
  }
  cout<<"Yes"<<endl;
  return 0;
}

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

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

int main()
{
	int N,i,j = 0;
	int A[200000];

	cin >> N;

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

	for (i = 0; i < N; i++) {
		j = i;
		for (j; j < N; j = j + 2) {

			if (A[i] == A[j + 1]) {
				cout << "NO";
				return 0;
			}

		}

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

				if (A[i] == A[j + 1]) {
					cout << "NO";
					return 0;
				}

			}




	}

	cout << "YES";

}

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

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

int main()
{
  ll n;
  cin>>n;
  
  
  set<ll>s;
  for(ll i=0,a;i<n;i++)cin>>a,s.insert(a);
  
  cout<<(s.size==n?"YES":"NO");
  
  
 
  
  
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: invalid use of member function 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::size() const [with _Key = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<long long int>; size_type = long unsigned int]' (did you forget the '()' ?)
   14 |   cout<<(s.size==n?"YES":"NO");
      |          ~~^~~~
      |                ()
Language: C++

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

int main(){
  long long N;
  cin >> N;
  bool flag=true;
  vector<int>A(N);
  for(int i=0;i<N;i++){
    cin >> A.at(i);
  }
  sort(A.begin(),A.end());

  for(int i=0;i<N-1;i++){
    if(A.at(i)==A.at(i+1)){
      flag=false;
      break;
    }
  }
  if(flag){
    cout << "YES" << endl;
  }
  else{
    cout << "NO" <<endl;
  }
}


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

#include <iostream>
using namespace std;
typedef long long ll;
int main(){
  ll N;
  cin >> N;
  ll A[N];
  bool flag = false;
  for(int i=0;i<N;++i) cin >> A[i];
  sort(A,A+N);
  for(int j=0;j<(N-1);++j) {
    if(A[j]==A[j+1]) {
      flag = true;
      break;
    }
  }
  if(flag==true) cout << "NO";
  if(flag==false) cout << "YES";
}


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

import java.util.*;
import java.io.*;
import java.math.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean chk = true;
        HashMap<Integer,Integer> map = new HashMap<Integer,Integer>();
        for(int i = 0; i < n; i++){
            int a = sc.nextInt();
            if(map.containsKey(a)){
                chk = false;
                break;
            }else{
                map.put(a,1);
            }
        }
    if(chk){
        System.out.println("YES");
    }else{
        System.out.println("NO");
    }
}

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

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

int main(){
    int n;
    cin>>n;
    vector<int>a(n);
    int m=0;
    for(int i=0; i<n; i++){
        cin>>a.at(i);
        m=max(m,a.at(i));
    }
    v[m+1];
    for(int i=0; i<n; i++){
        v.at(a.at(i))++;
    }

    for(int i=0; i<m+1; i++){
        if(v.at(i)>=2) {
            cout<<"NO"<<endl;
            return 0;
        }
    }
    cout<<"YES"<<endl;
}

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

n = int(input())
a = sorted(map(int, input().split()))

x = 0

for i in range(n-1):
    if a[i] == a[i+1]:
        x += 1
        break
    else:
        x += 0
        
if x == 0:
    print('Yes')
else:
    print('No')

Compiler output:
a.cc:14:11: warning: multi-character character constant [-Wmultichar]
   14 |     print('Yes')
      |           ^~~~~
a.cc:16:11: warning: multi-character character constant [-Wmultichar]
   16 |     print('No')
      |           ^~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int N;
 scanf("%d", &N);
  bool t=true
  
  int A[N];
  for (int i=0; i<N; i++) scanf("%d", &A[i])
sort(A,A+N);
  for (int i=0; i<N-1; i++){
    if (A[i]==A[i+1]) t=false
  }
  if (t) printf ("YES\n");
    else printf ("NO\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'int'
    9 |   int A[N];
      |   ^~~
a.cc:10:40: error: 'A' was not declared in this scope
   10 |   for (int i=0; i<N; i++) scanf("%d", &A[i])
      |                                        ^
a.cc:13:9: error: 'A' was not declared in this scope
   13 |     if (A[i]==A[i+1]) t=false
      |         ^
a.cc:13:30: error: expected ';' before '}' token
   13 |     if (A[i]==A[i+1]) t=false
      |                              ^
      |                              ;
   14 |   }
      |   ~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N;
  cin>>N;
  int A[i];
  for (int i=0; i<N; i++) cin>>A[i];
  bool t=false;
  for (int i=0; i<N; i++){
    for (int j=i; j<N; j++){
      if (A[i]==A[j]){
        t=true;}}}
  if (t) cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'i' was not declared in this scope
    6 |   int A[i];
      |         ^
a.cc:7:32: error: 'A' was not declared in this scope
    7 |   for (int i=0; i<N; i++) cin>>A[i];
      |                                ^
a.cc:11:11: error: 'A' was not declared in this scope
   11 |       if (A[i]==A[j]){
      |           ^
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>

using namespace std;

long long z[200000000000];
int n,m;
int main(){
	bool flag=0;
cin>>n;
for(int i=0;i<n;i++){cin>>m;z[i]=m;
}
sort(z,z+n);
for(int i=0;i<n-1;i++){if(z[i]==z[i+1])flag=1;
}
if(flag==1)cout<<"NO";
else cout<<"YES";
return 0;
} 

Compiler output:
/tmp/ccQnvvB2.o: in function `main':
a.cc:(.text+0xf): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccQnvvB2.o
a.cc:(.text+0x31): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccQnvvB2.o
a.cc:(.text+0x49): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccQnvvB2.o
a.cc:(.text+0x6e): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccQnvvB2.o
a.cc:(.text+0x79): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccQnvvB2.o
a.cc:(.text+0xee): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccQnvvB2.o
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
#include<map>
using namespace std;
int main(){
  int n;cin>>n;
  map<int,int> mp;
  for(int i=0;i<n;i++){
    int a;cin>>a;
    mp[a]++;
  }
  for(auto it=mp.begin();it!=mp.end();it++){
    if(it->second()==2){
      cout<<"No"<<endl;
      return 0;
    }
  }
  cout<<"Yes"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: expression cannot be used as a function
   12 |     if(it->second()==2){
      |        ~~~~~~~~~~^~
Language: C++

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

int main(){
  int n;
  std::cin >> n;
  std::vector<int> v;
  string s;
  for (int i = 0; i < n; i++) {
    std::cin >> v.at(i);
  }
  v = sort(v.begin(), v.end());
  for (int j = 0; j < n-1; j++) {
    if (v.at(i) == v.at(i+1)) {
      s = "NO";
      break;
    }
    else{
      s = "YES";
    }
  }
  std::cout << s << '\n';
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'void')
   12 |   v = sort(v.begin(), v.end());
      |                              ^
In file included from /usr/include/c++/14/vector:72,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
  210 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note:   no known conversion for argument 1 from 'void' to 'const std::vector<int>&'
  211 |     operator=(const vector<_Tp, _Alloc>& __x)
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66:
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note:   no known conversion for argument 1 from 'void' to 'std::vector<int>&&'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |                 ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]'
  788 |       operator=(initializer_list<value_type> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   no known conversion for argument 1 from 'void' to 'std::initializer_list<int>'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:14:14: error: 'i' was not declared in this scope
   14 |     if (v.at(i) == v.at(i+1)) {
      |              ^
Language: C++

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

int main(){
  int n;
  cin >> n;
  vector<int> arr(n);
  bool judge = true;
  for (int i = 0; i < n; i++)
    cin >> arr.at(i);
  for (int i = 0; i < n; i++){
    for (int j = (i+1); j < n; j++){
      if (arr.at(i) == arr.at(j)){
        judge = false;
        break;
      }
    }
    if (!judge){
      break;
    }
  }
  
  if (judge)
    cout << YES << endl;
  else
    cout << NO << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:13: error: 'YES' was not declared in this scope
   24 |     cout << YES << endl;
      |             ^~~
a.cc:26:13: error: 'NO' was not declared in this scope
   26 |     cout << NO << endl;
      |             ^~
Language: C++

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

int main ()
{
	int n;
  	vector<int> a(n);
  	for (int i = 0; i < n; i++)
    {
    	int c = 0;
      	cin >> a.at(i);
    }
  	for (int i = 0; i < n - 1; i++)
    {
    	for (int j = i + 1; j < n; j++)
        {
        	if (a.at(i) == a.at(j))
            {
            	c++;
            }
        } 
      	if (c > 0)
        {
        	break;
        }
    }
  	if (c > 0)
    {
    	cout << "NO" << endl;
    }
  	else
    {
    	cout << "YES" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: 'c' was not declared in this scope
   19 |                 c++;
      |                 ^
a.cc:22:13: error: 'c' was not declared in this scope
   22 |         if (c > 0)
      |             ^
a.cc:27:13: error: 'c' was not declared in this scope
   27 |         if (c > 0)
      |             ^
Language: C++

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

int main(){
  int n;
  cin>>n;
  set<int>st;
  vector<int>array(n);
  rep(i,n)cin>>array[i];
  ok=true;
  rep(i,n){
    if(st.count(array[i]))ok=false;
    st.insert(array[i]);
  }
  if(ok)cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
}
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'ok' was not declared in this scope
   11 |   ok=true;
      |   ^~
Language: C++

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

int main(){
  int n;
  cin>>n;
  set<int>st;
  
  int cnt=0;
  
  vector<long long>a(n);
  rep(i,n)cin>>a[i];
  bool ok=true;
  while(st.count(a[cnt])!=0){
    ok=false
  }
  if(ok)cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: expected ';' before '}' token
   16 |     ok=false
      |             ^
      |             ;
   17 |   }
      |   ~
Language: C++

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

int main(){
  int n;
  cin>>n;
  set<int>st;
  
  int cnt=0;
  
  vector<int>a(n);
  rep(i,n)cin>>a[i];
  bool ok=true;
  while(st.count(a[cnt])!=0){
    ok=false
  }
  if(ok)cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: expected ';' before '}' token
   16 |     ok=false
      |             ^
      |             ;
   17 |   }
      |   ~
Language: C++

//
//  main.cpp
//  Study
//
//  Created by 佐々木勇星 on 2020/03/12.
//  Copyright © 2020 佐々木勇星. All rights reserved.
//

#include <iostream>
#include <vector>
#include <cmath>
#include <sstream>
#include <iomanip>
#include <algorothm>

using namespace std;


int main(int argc, const char * argv[]) {
    
    int n;
    
    cin >> n;
    
    int a[n];
    
    
    
    string ans = "YES";
    
    for(int i=0; i<n; i++)
    {
        cin >> a[i];
        
    }
    
    std::sort(a, a+n);
    
    for(int i=0; i<n; i++)
    {
        if(a[i] == a[i+1])
        {
            ans = "NO";
            break;
        }
    }
        

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


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

//
//  main.cpp
//  Study
//
//  Created by 佐々木勇星 on 2020/03/12.
//  Copyright © 2020 佐々木勇星. All rights reserved.
//

#include <iostream>
#include <vector>
#include <cmath>
#include <sstream>
#include <iomanip>

using namespace std;


int main(int argc, const char * argv[]) {
    
    int n;
    
    cin >> n;
    
    int a[n];
    
    
    
    string ans = "YES";
    
    for(int i=0; i<n; i++)
    {
        cin >> a[i];
        
    }
    
    std::sort(a, a+n);
    
    for(int i=0; i<n; i++)
    {
        if(a[i] == a[i+1])
        {
            ans = "NO";
            break;
        }
    }
        

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


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:36:10: error: 'sort' is not a member of 'std'; did you mean 'sqrt'?
   36 |     std::sort(a, a+n);
      |          ^~~~
      |          sqrt
Language: C++

//
//  main.cpp
//  Study
//
//  Created by 佐々木勇星 on 2020/03/12.
//  Copyright © 2020 佐々木勇星. All rights reserved.
//

#include <iostream>
#include <vector>
#include <cmath>
#include <sstream>
#include <iomanip>

using namespace std;


int main(int argc, const char * argv[]) {
    
    int n;
    
    cin >> n;
    
    int a[n];
    
    
    
    string ans = "YES";
    
    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";
            break;
        }
    }
        

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


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

import java.util.*;

public class Main
{
	public static void main(String args[])
	{
		int a;
		Scanner sc=new Scanner(System.in);
		a=sc.nextInt();
		int c=0;
		int b[]=new int[a];
		for(int i=0;i<a;i++)
		{
			b[i]=sc.nextInt();
		}
		Arrays.sort(b);
		for(int j=0;j<a-1;j++)
		{
			if(b[j]==b[j+1])
			{ c=c+1; }
		}
		if(c>0)
		{System.out.println("No");}
		else
		{System.out.printlna("Yes");}
	
	}
}

Compiler output:
Main.java:25: error: cannot find symbol
		{System.out.printlna("Yes");}
		           ^
  symbol:   method printlna(String)
  location: variable out of type PrintStream
1 error
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> v(n);
      |   ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include<algorithm>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> v(n);
      |          ^~~
a.cc:9:12: error: 'v' was not declared in this scope
    9 |     cin >> v[i];
      |            ^
a.cc:10:8: error: 'v' was not declared in this scope
   10 |   sort(v.begin(),v.end());
      |        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define Hello ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(0);

int main()
{
  Hello;
  
  set<int> a;
  long long int b,c;
  cin>>b;
  
  for(int i=0; i<b; i++)
  {
    cin>>c;
    a.insert(c);
  }
  
  int d=a.size();
  
  if(d==b)  cout<<"YES";
  else  cout<<"NO";
  
  return 0;
}#include<bits/stdc++.h>
using namespace std;
#define Hello ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(0);

int main()
{
  Hello;
  
  set<int> a;
  long long int b,c;
  cin>>b;
  
  for(int i=0; i<b; i++)
  {
    cin>>c;
    a.insert(c);
  }
  
  long long int d=a.size();
  
  if(d==b)  cout<<"YES";
  else  cout<<"NO";
  
  return 0;
}

Compiler output:
a.cc:25:2: error: stray '#' in program
   25 | }#include<bits/stdc++.h>
      |  ^
a.cc:25:3: error: 'include' does not name a type
   25 | }#include<bits/stdc++.h>
      |   ^~~~~~~
a.cc:29:5: error: redefinition of 'int main()'
   29 | int main()
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main()
      |     ^~~~
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    //ここから4行配列として数列を受け取る
    long a[] = new long[N];
    for(int i = 0; i < N; i++){
      a[i] = sc.nextInt();
    }
    //配列を降順に並び替える
    Arrays.sort(a, Comparator.reverseOrder());

    for(int i = 1; i < N; i++){
      if(a[i-1] == a[i]){
        System.out.println("NO");
        return;
      }
    }
    System.out.println("YES");
    return;
  }
}


Compiler output:
Main.java:13: error: no suitable method found for sort(long[],Comparator<T#1>)
    Arrays.sort(a, Comparator.reverseOrder());
          ^
    method Arrays.<T#2>sort(T#2[],Comparator<? super T#2>) is not applicable
      (inference variable T#2 has incompatible bounds
        equality constraints: long
        upper bounds: Object)
    method Arrays.<T#3>sort(T#3[],int,int,Comparator<? super T#3>) is not applicable
      (cannot infer type-variable(s) T#3
        (actual and formal argument lists differ in length))
  where T#1,T#2,T#3 are type-variables:
    T#1 extends Comparable<? super T#1>
    T#2 extends Object declared in method <T#2>sort(T#2[],Comparator<? super T#2>)
    T#3 extends Object declared in method <T#3>sort(T#3[],int,int,Comparator<? super T#3>)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: Java

import java.util.Arrays;
import java.util.Comparator;

public class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    //ここから4行配列として数列を受け取る
    Integer a[] = new Integer[N];
    for(int i = 0; i < N; i++){
      a[i] = sc.nextInt();
    }
    //配列を降順に並び替える
    Arrays.sort(a, Comparator.reverseOrder());

    for(int i = 1; i < N; i++){
      if(a[i-1] == a[i]){
        System.out.println("NO");
        break;
      }
      System.out.println("YES");
    }
  }
}


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

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

int main(){
  ll n;
  cin >> n;
  map<int,int> A;
  ll a;
  rep(i,n){
    cin >> a;
    A[a]++;
    if(A[a] > 1){
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'map' was not declared in this scope
    9 |   map<int,int> A;
      |   ^~~
a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    1 | #include <iostream>
  +++ |+#include <map>
    2 | #define rep(i,n) for(int i=0;i<(n);i++)
a.cc:9:7: error: expected primary-expression before 'int'
    9 |   map<int,int> A;
      |       ^~~
a.cc:13:5: error: 'A' was not declared in this scope
   13 |     A[a]++;
      |     ^
Language: C++

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

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


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

#include<bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef set<int> si;
int main()
{
    cin.tie(NULL);
    ios::sync_with_stdio(false);    
    ll s;
    cin>>s;
    vi ax(s);
    for (int i = 0; i < s; ++i)
    {   int d;
        cin>>d;
        ax[i]=d;
    }
    sort(ax.begin(),ax.end());
    for (int i = 0; i < s; ++i)
    {
        if(ax[i]==ax[i+1]){
            cout<<"NO"<<endl;
            return 0;
         }
    }
    cout<<"YES"<<endl;
    return 0;
        

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'll' was not declared in this scope
    9 |     ll s;
      |     ^~
a.cc:10:10: error: 's' was not declared in this scope; did you mean 'si'?
   10 |     cin>>s;
      |          ^
      |          si
Language: C++

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

int main()
{
  clrscr() ;
  int N, x;
  cout<<"Enter N:" ;
  cin>>N ;
  int elm[N] ;
  for(int m=0; m<N; m++)
  { cout<<"\n"<<"Enter element A("<<m+1<<") :"
    cin>>elm[m] ;
  }
  for(int i=0; i<N; i++)
  { for(int j=i+1; j<N; j++)
    { x=elm[i]-elm[j] ;
      if(x==0)
      { cout<<"NO" ;
        goto abc ;
      }
      else
      {continue ;
      }
    }
  }
  cout<<"YES" ;
  abc:
 getch() ;  
 return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'clrscr' was not declared in this scope
    6 |   clrscr() ;
      |   ^~~~~~
a.cc:12:47: error: expected ';' before 'cin'
   12 |   { cout<<"\n"<<"Enter element A("<<m+1<<") :"
      |                                               ^
      |                                               ;
   13 |     cin>>elm[m] ;
      |     ~~~                                        
a.cc:29:2: error: 'getch' was not declared in this scope; did you mean 'getc'?
   29 |  getch() ;
      |  ^~~~~
      |  getc
Language: C++

#include<iostream>
#include<conio>
#include<process>
using namespace std ;

int main()
{
  clrscr() ;
  int N, x;
  cout<<"Enter N:" ;
  cin>>N ;
  int elm[N] ;
  for(int m=0; m<N; m++)
  { cout<<"\n"<<"Enter element A("<<m+1<<") :"
    cin>>elm[m] ;
  }
  for(int i=0; i<N; i++)
  { for(int j=i+1; j<N; j++)
    { x=elm[i]-elm[j] ;
      if(x==0)
      { cout<<"NO" ;
        goto abc ;
      }
      else
      {continue ;
      }
    }
  }
  cout<<"YES" ;
  abc:
 getch() ;  
 return 0 ;
}

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

#include<iostream>
#include<conio.h>
#include<process.h>
using namespace std ;

int main()
{
  clrscr() ;
  int N, x;
  cout<<"Enter N:" ;
  cin>>N ;
  int elm[N] ;
  for(int m=0; m<N; m++)
  { cout<<"\n"<<"Enter element A("<<m+1<<") :"
    cin>>elm[m] ;
  }
  for(int i=0; i<N; i++)
  { for(int j=i+1; j<N; j++)
    { x=elm[i]-elm[j] ;
      if(x==0)
      { cout<<"NO" ;
        goto abc ;
      }
      else
      {continue ;
      }
    }
  }
  cout<<"YES" ;
  abc:
 getch() ;  
 return 0 ;
}

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define rep2(i,x,n) for(int i=x; i<(n); i++)
#define ALL(n) begin(n),end(n)
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
const long long INF = numeric_limits<long long>::max();
using ll=long long int;
using ppi=pair<ll,ll>;
using pql =priority_queue<ll, vector<ll>, greater<ll>>;
using pq=priority_queue<ll>;

int main()
{
 int n;cin>>n;
 int a[n];
 rep(i,n){
     cin>>a[i];
 }
 sort(a.begin(),a.end());
 rep(i,n-1){
     if(a[i]==a[i+1]){
         cout<<"Np"<<endl;
         return 0;
     }
 }
 cout<<"Yes"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: request for member 'begin' in 'a', which is of non-class type 'int [n]'
   20 |  sort(a.begin(),a.end());
      |         ^~~~~
a.cc:20:19: error: request for member 'end' in 'a', which is of non-class type 'int [n]'
   20 |  sort(a.begin(),a.end());
      |                   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
int N;
  cin >> N;
  int vec[200010];
  for(int i = 0; i < N; i++){
   cin >> vec[i]; 
  }
  bool ans = 1;
    for(int i = 0; i < N; i++){
    for(int j = 0; j < N; j++){
int check = 0;
      if(vec[i] == vec[j]) check++;
  }
      if(check != 1) ans = 0;
  }
  if(ans = 1) cout << "YES" << endl;
  else cout << "NO" << endl;
  
  
}

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

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

int main()
{ int N, x ;
  cout<<"Enter 'N':" ;
  cin>>N ;
  int elm[N]
  for(int i=0; i<N; i++)
  { cout<<"\n"<<"Enter A"<<i+1<<" element:" ;
    cin>>elm[i] ;
  }
  for(int i=0; i<N; i++)
    for(int j=i+1; j<N; j++)
    { x=elm[i]-elm[j] ;
      if(x==0)
      {cout<<"\n"<<"NO" ;
       exit() ;
      }
      else
      { continue ;
      }
    }
  cout<<"\n"<<"YES" ;
  return 0;
}

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

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

using ll = long long; 

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

  set <int> A;
  int a;
  bool YES = true;
  for (int i=0; i<N; ++i){
    cin >> a;
    if (A.count(a)){
      YES = false;
      break;
    }
    A.insert(a);
  }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:23:5: warning: capture of variable 'std::cout' with non-automatic storage duration
   23 |     cout << "YES" <<endl;
      |     ^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::ostream std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:23:9: error: expected ',' before '<<' token
   23 |     cout << "YES" <<endl;
      |         ^~~
      |         ,
a.cc:23:10: error: expected identifier before '<<' token
   23 |     cout << "YES" <<endl;
      |          ^~
a.cc:23:25: error: expected ']' before ';' token
   23 |     cout << "YES" <<endl;
      |                         ^
      |                         ]
a.cc: In lambda function:
a.cc:23:25: error: expected '{' before ';' token
a.cc: At global scope:
a.cc:25:3: error: expected unqualified-id before 'else'
   25 |   else {
      |   ^~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

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

int main(){
  int n;
  string ans = "NO";
  cin >> n;
  vector<int> vec(n);
  for(int i=0;i<n;i++){
    cin >> vec.at(i);}
  for(int i=0;i<n;i++){
    for(int j=i+1;j<n;j++){
      if(vec.at(i)==vec.at(j)){
        ans = "YES"}
    }
  }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: expected ';' before '}' token
   14 |         ans = "YES"}
      |                    ^
      |                    ;
a.cc:16:4: error: expected '}' at end of input
   16 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main(){
  int n; cin >> n;
  long long int a[200000 + 10];
  for(int i = 0; i < n; i++){
    scanf("%lld", &a[i]);
  }
  sort(a, a + n);
  for(int i = 0; i < n; i++){
    if(a[i] == a[i + 1]){
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
}


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

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

int N;
int A[1000000005];
set<int> st;

void input()
{
    cin >> N;

    for (int i = 0; i < N; i++) {
        int ai;
        cin >> ai;
        st.insert(ai);
    }
}

int main()
{
    input();

    if (st.size() == N)
        cout << "YES" << endl;
    else
        cout << "NO" << endl;

    return 0;
}


Compiler output:
/tmp/ccFLQOOP.o: in function `input()':
a.cc:(.text+0x4a): relocation truncated to fit: R_X86_64_PC32 against symbol `st' defined in .bss section in /tmp/ccFLQOOP.o
/tmp/ccFLQOOP.o: in function `main':
a.cc:(.text+0x75): relocation truncated to fit: R_X86_64_PC32 against symbol `st' defined in .bss section in /tmp/ccFLQOOP.o
/tmp/ccFLQOOP.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0xfc): relocation truncated to fit: R_X86_64_PC32 against symbol `st' defined in .bss section in /tmp/ccFLQOOP.o
a.cc:(.text+0x115): relocation truncated to fit: R_X86_64_PC32 against symbol `st' defined in .bss section in /tmp/ccFLQOOP.o
collect2: error: ld returned 1 exit status
Language: C

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxm=2e5+5;
int a[4][4] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
int n;
int ffind(int i,int j){
    return (n/4)*(i/4)+j/4;
}
int main(){
    ios::sync_with_stdio(0);
    cin>>n;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            cout<<ffind(i,j)*16+a[i%4][j%4]<<' ';
        }
        cout<<endl;
    }
    return 0;
}
————————————————
版权声明：本文为CSDN博主「我到底在干嘛」的原创文章，遵循 CC 4.0 BY-SA 版权协议，转载请附上原文出处链接及本声明。
原文链接：https://blog.csdn.net/weixin_44178736/article/details/100075000

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

#include <cstdio>

#include <unordered_set>



using namespace std;



int main()

{

    constexpr int NUM_SIZE = 2001;

    int n, num[NUM_SIZE];

    unordered_set<int> exist;

    scanf("%d", &n);

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

        scanf("%d", num+i);

    }



    int lidx = 1;

    for (; (lidx <= n) && (exist.count(num[lidx]) == 0); ++lidx) {

        exist.emplace(num[lidx]);

    }



    auto result = n;

    int ridx = n;

    for (--lidx; lidx >= 0; --lidx) {

        for (; (ridx > 0) && (exist.count(num[ridx]) == 0); --ridx) {

            exist.emplace(num[ridx]);

        }

        result = min(result, ridx - lidx);

        exist.erase(num[lidx]);

    }

    printf("%d\n", result);

    

    return 0;

}

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