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

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

int main(){
  int N;
  cin >> N;
  vector<int> d(N)
  for(int i=0;i<N;i++)
    cin >> d.at(i);
  sort(d.begin(),d.emd());
  int count = 1;
  for(int i=0;i<N-1;i++){
    if(d.at(i)<d.at(i+1))
      count++;
  }
  cout << count << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'for'
    8 |   for(int i=0;i<N;i++)
      |   ^~~
a.cc:8:15: error: 'i' was not declared in this scope
    8 |   for(int i=0;i<N;i++)
      |               ^
a.cc:10:20: error: 'class std::vector<int>' has no member named 'emd'; did you mean 'end'?
   10 |   sort(d.begin(),d.emd());
      |                    ^~~
      |                    end
Language: C++

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

int main(){
  int N;
  int count = 0;
  cin >> N;
  vector<int> d(N);
  rep(i,N)
    cin >> d(i);
  
  vector<int> zeros(N,0);
  while(d!=zeros){
  	int max = 0;
  	rep(i,N){
      if(max<d(i))
        max = d(i);
  	}
	rep(i,N){
      if(d(i)==max)
        d(i) = 0;
    }
  count++;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: no match for call to '(std::vector<int>) (int&)'
   12 |     cin >> d(i);
      |            ~^~~
a.cc:18:15: error: no match for call to '(std::vector<int>) (int&)'
   18 |       if(max<d(i))
      |              ~^~~
a.cc:19:16: error: no match for call to '(std::vector<int>) (int&)'
   19 |         max = d(i);
      |               ~^~~
a.cc:22:11: error: no match for call to '(std::vector<int>) (int&)'
   22 |       if(d(i)==max)
      |          ~^~~
a.cc:23:10: error: no match for call to '(std::vector<int>) (int&)'
   23 |         d(i) = 0;
      |         ~^~~
Language: C++

#include <set>
#include <bit/stdc++.h>
using namespace std;
int main(){
  //int型のsetの宣言
  set <int> S;
  
  int N;
  cin >> N;
  
  for(int i = 0;i < N;i++) {
    int d;
    cin >> d;
    S.insert(d);
  }
  cout << S.size() << end;
}


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

#include <set>
using namespace std;
int main(){
  //int型のsetの宣言
  set <int> S;
  
  int N;
  cin >> N;
  
  for(int i = 0;i < N;i++) {
    int d;
    cin >> d;
    S.insert(d);
  }
  cout << S.size() << end;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin >> N;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <set>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:15:3: error: 'cout' was not declared in this scope
   15 |   cout << S.size() << end;
      |   ^~~~
a.cc:15: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 main(){
  int N;
  cin >> N;
  vector<int> d(N);
  
  for(int i=0; i<N; i++){
    cin >> d.at(i);
  }
  
  sort(d.gebin(),d.end());
  int ans=0;
  for(int i=0;i<N-1;i++){
    if(d.at(i)!=d.at(i+1)){
      ans++;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: 'class std::vector<int>' has no member named 'gebin'
   13 |   sort(d.gebin(),d.end());
      |          ^~~~~
Language: C++

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

int main(){
  int N;
  cin >> N;
  vector<int> d(N);
  
  for(int i=0; i<N; i++){
    cin >> d.at(i);
  }
  
  sort(d.gebin(),d.end());
  int ans;
  for(int i=0;i<N-1;i++){
    if(d.at(i)!=d.at(i+1)){
      ans++;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: 'class std::vector<int>' has no member named 'gebin'
   13 |   sort(d.gebin(),d.end());
      |          ^~~~~
Language: C++

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

int main(){
   int N;
  cin>>N;
  vector<int>vec(101)
  for(int i=0;i<N;i++){
     int d;
    cin>>d;
    vec.at(d)=1;
  }
  int step=0;
  for(int j=0;j<101;j++){
     step +=vec.at(j);
  }
  cout<<step;
}

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

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

int main() {
  int N;
  vector<int> d(N);
  
  for (int i = 0; i < N; i++) {
    cin >> d.at(i);
  }
  
  sort (d.begin(), d.end());
  reverse (d.begin(), d.end());
  
  int r = 0;
  
  for (int i = 0; i < N - 1; i++) {
    if (d.at(i) > d.at(i + 1)) r++
      else break;
  }
  cout << r << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:35: error: expected ';' before 'else'
   18 |     if (d.at(i) > d.at(i + 1)) r++
      |                                   ^
      |                                   ;
   19 |       else break;
      |       ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
   int N;
   cin>>N;
  vector<int>vec(N);
  for(int i=0;i<N,i++){
    for(int j=0;j<N;j++){
     for(int k=1;k<N;k++){
        if(vec.at(j)==vec.at(k)){
           continue;
        }
       cin>>vec.at(i) ;
     }
  }
}
  sort(vec.begin(),vec.end());
  reverse(vec.begin(),vec,end());
  cout<<vec.size();
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before ')' token
    8 |   for(int i=0;i<N,i++){
      |                      ^
      |                      ;
a.cc:19:30: error: no matching function for call to 'end()'
   19 |   reverse(vec.begin(),vec,end());
      |                           ~~~^~
In file included from /usr/include/c++/14/bits/algorithmfwd.h:39,
                 from /usr/include/c++/14/bits/stl_algo.h:59,
                 from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/initializer_list:99:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
   99 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
/usr/include/c++/14/initializer_list:99:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/range_access.h:74:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:74:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:85:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:85:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:106:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/usr/include/c++/14/bits/range_access.h:106:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/valarray:1249:5: note: candidate: 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1249 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/valarray:1249:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/valarray:1265:5: note: candidate: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/valarray:1265:5: note:   candidate expects 1 argument, 0 provided
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int n;
	cin>>n;
	int a[n],smt,x;
	smt=2147483647;
	x=0;
	for(int b=1;b<=n;b++){
		cin>>a[b];
	}
	for(int c=1;c<=n;c++){
		for(int d=1;d<=n;d++){
			smt=a[d];
			else if(a[d]==smt){
				a[d]=2147483647;
			}
		}
		a[num]=2147483647;
		smt=2147483647;
	}
	for(int f=1;f<=n;f++){
		if(a[f]!=2147483647){
			x++; 
		}
	}
	cout<<x<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: 'else' without a previous 'if'
   16 |                         else if(a[d]==smt){
      |                         ^~~~
a.cc:20:19: error: 'num' was not declared in this scope; did you mean 'enum'?
   20 |                 a[num]=2147483647;
      |                   ^~~
      |                   enum
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int n;
	cin>>n;
	int a[n],smt,x;
	smt=2147483647;
	x=0;
	for(int b=1;b<=n;b++){
		cin>>a[b];
	}
	for(int c=1;c<=n;c++){
		for(int d=1;d<=n;d++){
			smt=a[d];
			else if(a[d]==smt){
				a[d]=2147483647;
			}
		}
		a[num]=2147483647;
		smt=2147483647;
	}
	for(int f=1;f<=n;f++){
		if(a2[f]!=2147483647){
			x++; 
		}
	}
	cout<<x<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: 'else' without a previous 'if'
   16 |                         else if(a[d]==smt){
      |                         ^~~~
a.cc:20:19: error: 'num' was not declared in this scope; did you mean 'enum'?
   20 |                 a[num]=2147483647;
      |                   ^~~
      |                   enum
a.cc:24:20: error: 'a2' was not declared in this scope; did you mean 'a'?
   24 |                 if(a2[f]!=2147483647){
      |                    ^~
      |                    a
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int n;
	cin>>n;
	int a[n],smt,num,x;
	smt=2147483647;
	x=0;
	for(int b=1;b<=n;b++){
		cin>>a[b];
	}
	for(int c=1;c<=n;c++){
		for(int d=1;d<=n;d++){
		    if(a[d]==smt){
				a[d]=2147483647;
			}
		}
		a2[c]=smt;
		a[num]=2147483647;
		smt=2147483647;
	} 
	for(int f=1;f<=n;f++){
		if(a2[f]!=2147483647){
			x++; 
		}
	}
	cout<<x<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: 'a2' was not declared in this scope; did you mean 'a'?
   19 |                 a2[c]=smt;
      |                 ^~
      |                 a
a.cc:24:20: error: 'a2' was not declared in this scope; did you mean 'a'?
   24 |                 if(a2[f]!=2147483647){
      |                    ^~
      |                    a
Language: C++

#include<iostream>
#include<set>
using namespace std;
int main()　{
	int n;
  	int a[n+10];
  	cin >> n;
  	for(int i; i < n; i++) cin >> a[i];
  	set<int> values;
  	for(int i = 0; i < n; i++) {
		values.insert(d[i]);
    }
  
  	cout << values.size() << endl;
  
}


Compiler output:
a.cc:4:11: error: extended character 　 is not valid in an identifier
    4 | int main()　{
      |           ^
a.cc:4:11: error: expected initializer before '\U00003000'
    4 | int main()　{
      |           ^~
Language: C++

#include<iostream>
#include<set>
using namespace std;
int main()　{
	int n;
  	int a[n+10];
  	cin >> n;
  	for(int i; i < n; i++) cin >> a[i];
  	set<int> values;
  	for(int i = 0; i < N; i++) {
		values.insert(d[i]);
    }
  
  	cout << values.size() << endl;
  
}

Compiler output:
a.cc:4:11: error: extended character 　 is not valid in an identifier
    4 | int main()　{
      |           ^
a.cc:4:11: error: expected initializer before '\U00003000'
    4 | int main()　{
      |           ^~
Language: C++

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

int main() {
  int N;
  cin >>N;
  vector<int> vec(N);
  for(int i = 0;i<N;i++){
    cin>>vec.at(i);
  }
  sort(vec.begin(),vec.end());
  reverse(vec.begin(),vec.end())
  int ans =1;
  for(int i = 1;i<N;i++){
    if(vec.at(i)<vec.at(i-1)){
      ans +=1;
    }
    else{
      break;
    }
  }
  cout >> ans >>endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:33: error: expected ';' before 'int'
   12 |   reverse(vec.begin(),vec.end())
      |                                 ^
      |                                 ;
   13 |   int ans =1;
      |   ~~~                            
a.cc:16:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |       ans +=1;
      |       ^~~
      |       abs
a.cc:22:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |   cout >> ans >>endl;
      |           ^~~
      |           abs
Language: C++

#include <iostream>
using namespace std;

int main(){
    int N;
    int d[110];
    int res = 0;
    cin>> N;
    for(int i = 0;i<N;i++){
        cin>>d[i];
    }
    int num[110]={0};
    for(int i=0;i<N;i++){
        num[d[i]]++;
    }
    for(int i=1;i<=100;i++){
        if(num[i])res++
    }
    cout<<res<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:24: error: expected ';' before '}' token
   17 |         if(num[i])res++
      |                        ^
      |                        ;
   18 |     }
      |     ~
Language: C++

#include <iostream>
using namespace std;

int main{
    int N;
    int d[110];
    int res = 0;
    cin>> N;
    for(int i = 0;i<N;i++){
        cin>>d[i];
    }
    int num[110]={0};
    for(int i=0;i<N;i++){
        num[d[i]]++;
    }
    for(int i=1;i<=100;i++){
        if(num[i])res++
    }
    cout<<res<<endl;
}

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:5: error: expected primary-expression before 'int'
    5 |     int N;
      |     ^~~
a.cc:5:5: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:8:5: error: 'cin' does not name a type
    8 |     cin>> N;
      |     ^~~
a.cc:9:5: error: expected unqualified-id before 'for'
    9 |     for(int i = 0;i<N;i++){
      |     ^~~
a.cc:9:19: error: 'i' does not name a type
    9 |     for(int i = 0;i<N;i++){
      |                   ^
a.cc:9:23: error: 'i' does not name a type
    9 |     for(int i = 0;i<N;i++){
      |                       ^
a.cc:13:5: error: expected unqualified-id before 'for'
   13 |     for(int i=0;i<N;i++){
      |     ^~~
a.cc:13:17: error: 'i' does not name a type
   13 |     for(int i=0;i<N;i++){
      |                 ^
a.cc:13:21: error: 'i' does not name a type
   13 |     for(int i=0;i<N;i++){
      |                     ^
a.cc:16:5: error: expected unqualified-id before 'for'
   16 |     for(int i=1;i<=100;i++){
      |     ^~~
a.cc:16:17: error: 'i' does not name a type
   16 |     for(int i=1;i<=100;i++){
      |                 ^
a.cc:16:24: error: 'i' does not name a type
   16 |     for(int i=1;i<=100;i++){
      |                        ^
a.cc:19:5: error: 'cout' does not name a type
   19 |     cout<<res<<endl;
      |     ^~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
int N, ans;
  ans = 0;
  cin >> N;
  vector<int> mochi(110);
  for(int i = 0; i < N; i++){
    cin >> mochi.at(i);
  }
  vector<int> backets(110);
  for(int i = 0; i < N; i++){
   backets.at(mocho.at(i))++; 
  }
  for(int i = 0; i < N; i++){
   if(backets.at(i) > 0){
    ans++; 
   }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: 'mocho' was not declared in this scope; did you mean 'mochi'?
   14 |    backets.at(mocho.at(i))++;
      |               ^~~~~
      |               mochi
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
int N, ans;
  ans = 0;
  cin >> N;
  vector<int> mochi(110)
  for(int i = 0; i < N; i++){
    cin >> mochi.at(i);
  }
  vector<int> backets(110);
  for(int i = 0; i < N; i++){
   backets.at(mocho.at(i))++; 
  }
  for(int i = 0; i < N; i++){
   if(backets.at(i) > 0){
    ans++; 
   }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'for'
    9 |   for(int i = 0; i < N; i++){
      |   ^~~
a.cc:9:18: error: 'i' was not declared in this scope
    9 |   for(int i = 0; i < N; i++){
      |                  ^
a.cc:14:15: error: 'mocho' was not declared in this scope; did you mean 'mochi'?
   14 |    backets.at(mocho.at(i))++;
      |               ^~~~~
      |               mochi
Language: C++

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

int main() {
  int n;
  cin >> n;
  vector<int> vec(n);
  for (int i = 0;i<n;i++) {
    cin >> vec.at(i);
  }
  sort (vec.begin(),vec.end());
  int x = 0;
  for (int i=0;i<n-1;i++) {
    if (vec.at(i) == vec.at(i+)) {
      x++;
    }
    else {}
  }
  cout << vec.size()-x << endl;
}
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:14:31: error: expected primary-expression before ')' token
   14 |     if (vec.at(i) == vec.at(i+)) {
      |                               ^
Language: C++

#include <bits/stdc++.h>//方針：異なる物の数＝＝N-同じ数
using namespace std;

int main() {
  int N;
  cin >> N;
  int d[N]
  
  for(int i=0;i<N;i++){
    cin >> d[i];
  }
//sortしたい
  for(int s=0;s<N;s++){
    for(int t=s+1;t<N;t++){
      if(d[t]<d[s]){
      	int k = d[s];
          d[s]= d[t];
          d[t]= k;
      }
    }
  }//小さい順にソートできた
  int k = 0;
  for(int s=0;s<N-1;s++){
    if(d[s]==d[s+1])
      k++;
  }
  
	cout << N-k << endl;
        
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected initializer before 'for'
    9 |   for(int i=0;i<N;i++){
      |   ^~~
a.cc:9:15: error: 'i' was not declared in this scope
    9 |   for(int i=0;i<N;i++){
      |               ^
a.cc:15:10: error: 'd' was not declared in this scope
   15 |       if(d[t]<d[s]){
      |          ^
a.cc:24:8: error: 'd' was not declared in this scope
   24 |     if(d[s]==d[s+1])
      |        ^
Language: C++

#include <bits/stdc++.h>//方針：異なる物の数＝＝N-同じ数
using namespace std;

int main() {
  int N;
  cin >> N;
  
  for(int i=0;i<N;i++){
    int d[i];
    cin >> d[i];
  }
//sortしたい
  for(int s=0;s<N;s++){
    for(int t=s+1;t<N;t++){
      if(d(t)<d(s)){
      	int k = d[s];
          d[s]= d[t];
          d[t]= k;
      }
    }
  }//小さい順にソートできた
  int k = 0;
  for(int s=0;s<N-1;s++){
    if(d[s]==d[s+1])
      k++;
  }
  
	cout << N-k << endl;
        
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: 'd' was not declared in this scope
   15 |       if(d(t)<d(s)){
      |          ^
a.cc:24:8: error: 'd' was not declared in this scope
   24 |     if(d[s]==d[s+1])
      |        ^
Language: C++

#include <bits/stdc++.h>//方針：異なる物の数＝＝N-同じ数
using namespace std;

int main() {
  int N;
  cin >> N;
  
  for(i=0;i<N;i++){
    int d[i];
    cin >> d[i];
  }
//sortしたい
  for(int s=0;s<N;s++){
    for(int t=s+1;t<N;t++){
      if(d(t)<d(s)){
      	int k = d[s];
          d[s]= d[t];
          d[t]= k;
      }
    }
  }//小さい順にソートできた
  int k = 0;
  for(int s=0;s<N-1;s++){
    if(d[s]==d[s+1])
      k++;
  }
  
	cout << N-k << endl;
        
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   for(i=0;i<N;i++){
      |       ^
a.cc:10:12: error: 'd' was not declared in this scope
   10 |     cin >> d[i];
      |            ^
a.cc:15:10: error: 'd' was not declared in this scope
   15 |       if(d(t)<d(s)){
      |          ^
a.cc:24:8: error: 'd' was not declared in this scope
   24 |     if(d[s]==d[s+1])
      |        ^
Language: C++

// バケット法による解
#include <iostream>
using namespace std;

int main() {
    int N;
    int d[110];
    cin >> N;
    for (int i = 0; i < N; ++i) cin >> d[i];
  
  int a[110]= {0};
  for(int i=0;i<n;++i){
     a[d[i]]+= 1;
  }
  int res=0;
  for(int i=1;i<=n;++i){
    if(a[i]>0)res++;
  }
  
    cout << res << endl;
}

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

#include<iostream>
#include <bits/stdc++.h>

using namespace std;

int main()
{
  int n;
  cin >> n  ;
  int a[n];  
  for(int i=0;i<n;i++)cin >> a[i] ;
  
  sort(a,a+n,greater<int>()) ; //decreasing
  int count = 1;
  for(int i=1;i<n;++i){
    if(a[i]==a[i-1])
      continue;
    else
      ++count;
  }
   cout << count << "\n"
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: expected ';' before 'return'
   21 |    cout << count << "\n"
      |                         ^
      |                         ;
   22 |     return 0;
      |     ~~~~~~
Language: C++

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

#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep3(i,m,n) for(int (i)=m;(i)<=(n);(i)++)
#define rep3rev(i,m,n) for(int (i)=m;(i)>=(n);(i)--)
#define all(a) (a.begin()),(a.end())
#define rall(a) (a.rbegin()),(a.rend())
#define fi first
#define se second

typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef pair<int, int> pii;

void Main()
{
	int n;
  	cin >> n;
  	vi a(n);
	rep(i,n) cin >> a[i];
  	sort(all(a));
  	cnt = 1;
	rep(i,n-1) {
		if(a[i] != a[i+1]) cnt++;
    }
    cout << cnt << endl;
	return;
}

int main()
{
	cin.tie(nullptr);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(15);
	Main();
	return 0;
}


Compiler output:
a.cc: In function 'void Main()':
a.cc:24:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
   24 |         cnt = 1;
      |         ^~~
      |         int
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<int> d(N);
  for (int i= 0; i < N; i++) {
    cin >> d.at(i);
  }
  sort(a.begin(), a.end());
  reverse(a.begin(), a.end());
  
  int count = 0;
  int tmp;
  for (int i = 0; i < N; i++) {
    if (tmp == d.at(i)) count++;
    tmp = d.at(i);
  }
  cout << N - count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: 'a' was not declared in this scope
   11 |   sort(a.begin(), a.end());
      |        ^
Language: Java

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

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<Integer> num = new HashSet<>();
        for(int i = 0; i < N; i++) {
            int di = sc.nextInt();
            num.add(di);
        }
        System.out.println(num);
    }

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

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

int main() {
  int N;
  int M=N;
  cin >> N;
  
  vector<int> a(N);
  for (i=0; i<N; i++)
    cin >> a.at(i);
  sort(a.begin(), a.end());
  reverse(a.begin(), a.end());
  for (int i=0; i<N-1 ; i++) {
    if (a.at(i) == a.at(i+1))
      M--;
  }
  
  cout << M << endl;

}


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

int main()
{
  int N;
  int d[110];
  cin >> N;
  for (int i = 0; i < N; i++)
  {
    cin >> d[i];
  }
  int num[110] = {0}; //　バケット
  for (int i = 0; i < N; i++)
  {
    num[d[i]]++;
  }
  
  int res = 0;
  for (int i = 1; i <= 100; i++) //1~100
  {
    if (num[i])
    {
      res++;
    }
  }
  cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> N;
      |   ^~~
a.cc:24:3: error: 'cout' was not declared in this scope
   24 |   cout << res << endl;
      |   ^~~~
a.cc:24:18: error: 'endl' was not declared in this scope
   24 |   cout << res << endl;
      |                  ^~~~
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);
  
  sort(A.begin(),A.end());
  reverse(A.begin(),A.end());
  
  int count=1;
  for(int i=0;i<N;i++){
    if(i!=0){
      if(A.at(i)<A.at(i-1))
        count++
    }
  }
  
  cout<<count<<endl;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:19:16: error: expected ';' before '}' token
   19 |         count++
      |                ^
      |                ;
   20 |     }
      |     ~
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);
  
  for(int i=0;i<N;i++){
    for(int j=0;j<N;j++){
      int t;
      if(j!=0){
        if(A.at(j)>A.at(j-1)){
          t=A.at(j-1);
          A.at(j-1)=A.at(j);
          A.at(j)=t;
        }
      }
    }
    
  }
  int count=0;
  
  for(int j=0;j<N;j++){
    if(j!=0){
      if(A.at(j)>A.at(j-1))
        count++;
    }
  }
  
  cout<<count<<endl;

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

#include<bits/stdc++.h>
using namespace std;
 
int main(){
  int N;
  cin >> N;
  vector<int> vec(N);
  int counter = 0;
  
  for(int i = 0; i < vec.size();i++) cin >> vec.at(i);
  
  vector<int> mochi(*max_elemnt(vec.begin(),vec.end()));
  
  for (int i = 0; i < vec.size(); i++){
    mochi.at(vec.at(i)-1)++;
  }
  
  for(int i = 0; i < mochi.size(); i++){
    if(mochi.at(i) > 0){
      counter++;
    }
  }
  
  cout << counter << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: 'max_elemnt' was not declared in this scope
   12 |   vector<int> mochi(*max_elemnt(vec.begin(),vec.end()));
      |                      ^~~~~~~~~~
Language: C++

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

int main(){
  int N;
  cin >> N;
  vector<int> vec(N);
  int counter = 0;
  
  for(int i = 0; i < vec.size();i++) cin >> vec.at(i);
  
  vector<int> mochi(max_elemnt(vec.begin(),vec.end()));
  
  for (int i = 0; i < vec.size(); i++){
    mochi.at(vec.at(i)-1)++;
  }
  
  for(int i = 0; i < mochi.size(); i++){
    if(mochi.at(i) > 0){
      counter++;
    }
  }
  
  cout << counter << endl;
}

  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: 'max_elemnt' was not declared in this scope
   12 |   vector<int> mochi(max_elemnt(vec.begin(),vec.end()));
      |                     ^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int a[100];

 int main() {
   int N;
   cin >> N;
   
   for (int i = 0; i < N;i++) {
     cin >> a[i];
   }
   
   sort(a, a+N);
   reverse(a, a+N);
   
   int A = 0;
   for (int i = 0;i < N;i++) {
      if (a[i] != a[i+1]) {
        A += a[i]
      }
     else {
       A = A
     }
   }
   cout << A << endl;
   return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: expected ';' before '}' token
   19 |         A += a[i]
      |                  ^
      |                  ;
   20 |       }
      |       ~           
a.cc:22:13: error: expected ';' before '}' token
   22 |        A = A
      |             ^
      |             ;
   23 |      }
      |      ~
Language: C++

#include <iostream>
#include <algorithm>
#include <functional>

using namespace std;

int main(){
    int N;
    int d[100];
    cin >> N;
    for(int i=0; i<N; i++)cin >> d[i];

    sort(d,d+N, greater<int>());
    int max = 1000000;
    int ct = 0;
    for(int i=0; i<N; i++){
        if (d[i]<max){
            ct++;
            max = d[i];
    }    
    cout << ct << endl;

}

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

#include <iostream>
using namespace std;

int main() {
    int N;
    vector<int> d(N);
    cin >> N;
    for (int i = 0; i < N; ++i) cin >> d.at(i);

    vector<int> num(N) = {0};  // バケット
    for (int i = 0; i < N; ++i) {
        num.at(d.at(i))++;  // d[i] が 1 個増える
    }

    int res = 0;  // 答えを格納
    for (int i = 1; i <= 100; ++i) {  // 1 <= d[i] <= 100 なので 1 から 100 まで探索
        if (num.at(i)) {  // 0 より大きかったら
            ++res;
        }
    }
    cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'vector' was not declared in this scope
    6 |     vector<int> d(N);
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:6:12: error: expected primary-expression before 'int'
    6 |     vector<int> d(N);
      |            ^~~
a.cc:8:40: error: 'd' was not declared in this scope
    8 |     for (int i = 0; i < N; ++i) cin >> d.at(i);
      |                                        ^
a.cc:10:12: error: expected primary-expression before 'int'
   10 |     vector<int> num(N) = {0};  // バケット
      |            ^~~
a.cc:12:9: error: 'num' was not declared in this scope; did you mean 'enum'?
   12 |         num.at(d.at(i))++;  // d[i] が 1 個増える
      |         ^~~
      |         enum
a.cc:12:16: error: 'd' was not declared in this scope
   12 |         num.at(d.at(i))++;  // d[i] が 1 個増える
      |                ^
a.cc:17:13: error: 'num' was not declared in this scope; did you mean 'enum'?
   17 |         if (num.at(i)) {  // 0 より大きかったら
      |             ^~~
      |             enum
Language: C++

#include <iostream>
using namespace std;

int main() {
  int n; cin >> n;
  int a[110];
  for(int i=0; i<n; i++) {
    cin >> a[i];
  };

  int step = 1;
  sort(a, a+n);
  for(int i=0; i<n; i++) {
    if (i+1 == n) break;
    if (a[i] < a[i+1]) ++step;
  };

  cout << step << 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, a+n);
      |   ^~~~
      |   short
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  vector<int> A(N);
  for(int i=0;i<N;i++){
    cin >> A[i];
  }
  sort(A.begin(),A.end(), greater<int>());
  int count =1;
  for(int i=1;i<N;I++){
    if(A[i] < A[i-1])count++;
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'I' was not declared in this scope
   12 |   for(int i=1;i<N;I++){
      |                   ^
Language: Java

import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    Set<Integer> num = new Hashset<>();
    for(int i=0;i<N;i++){
      int di = sc.nextInt();
      num.add(di);
    }
    System.out.println(num.size());
  }
}

Compiler output:
Main.java:7: error: cannot find symbol
    Set<Integer> num = new Hashset<>();
                           ^
  symbol:   class Hashset
  location: class Main
1 error
Language: Java

import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int[] d = new int[N];
    int totall = 0;
    for(int i=0;i<N;i++){
      d[i] = sc.nextInt();
      if(d[i] == d[i-1]){
        d[i] = 0;
      }
      if(d[i] == 0){
        total ++;
      }
    }
    System.out.println(total);
  }
}

Compiler output:
Main.java:15: error: cannot find symbol
        total ++;
        ^
  symbol:   variable total
  location: class Main
Main.java:18: error: cannot find symbol
    System.out.println(total);
                       ^
  symbol:   variable total
  location: class Main
2 errors
Language: C

#include <stdio.h>
int main () 
{
int n,x,i,j=0;
int count = 1;
int d[110];

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

while(1)
{
    int max = 0;
    for(i=j;i<n;i++)
    {    
        if(max<d[i])
        {
            max = d[i];
            x = i;
        }
    }
    tmp = d[j];
    d[j] = d[x];
    d[x] = tmp;
    j++;
    if(j == n-1)
    break;
}

for(i=0;i<n-1;i++)
{
    if(d[i]!=d[i+1])
    {
        count++;
    }
}
printf("%d",count);

}

Compiler output:
main.c: In function 'main':
main.c:25:5: error: 'tmp' undeclared (first use in this function)
   25 |     tmp = d[j];
      |     ^~~
main.c:25:5: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

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

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		set s = new HashSet<>();
		
		for (int i = 0; i < n; i++) {
			s.add(sc.nextInt());
		}
		
		System.out.println(s.size());
	}
}


Compiler output:
Main.java:10: error: cannot find symbol
		set s = new HashSet<>();
		^
  symbol:   class set
  location: class Main
1 error
Language: Java

import java.util.Scanner;
import java.util.Arrays;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int[] d = new int[N];
		for (int i = 0; i < N; i++) {
			d[i] = nextInt();
		}
		
		Arrays.sort(d);
		
		int cnt = 0;
		int prev = 0;
		for (int i : d) {
			if (prev < i) {
				cnt++;
			}
			prev = i;
		}
		
		System.out.println(cnt);
	}
}


Compiler output:
Main.java:11: error: cannot find symbol
			d[i] = nextInt();
			       ^
  symbol:   method nextInt()
  location: class Main
1 error
Language: Java

import java.util.*;
public class B {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int[]d = new int[n];
		for(int i = 0; i < n; i++) {
			d[i] = stdIn.nextInt();
		}
		
		Arrays.sort(d);
		int cnt = 1;
		for(int i = 0; i < n-1; i++) {
			if(d[i]!=d[i+1]) {
				cnt++;
			}
		}
		System.out.println(cnt);
	}

}


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

using namespace std;
int static fast = [](){
  ios::sync_with_stdio(false);
  cin.tie(0); cout.tie(0); return 0;
}();
// freopen("input.txt", "r", stdin);
 
int main() {
	int n, d;
  	cin >> n;
  	set<int> ans;
  	for(int i = 0; i < n; i++) {
    	cin >> d;
      	ans.insert(d);
    }
  	cout << ans.size() << endl;
    return 0;
}
 

Compiler output:
a.cc: In lambda function:
a.cc:3:3: error: 'ios' has not been declared
    3 |   ios::sync_with_stdio(false);
      |   ^~~
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin.tie(0); cout.tie(0); return 0;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:4:15: error: 'cout' was not declared in this scope
    4 |   cin.tie(0); cout.tie(0); return 0;
      |               ^~~~
a.cc:4:15: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc: In function 'int main()':
a.cc:10:9: error: 'cin' was not declared in this scope
   10 |         cin >> n;
      |         ^~~
a.cc:10:9: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:9: error: 'set' was not declared in this scope
   11 |         set<int> ans;
      |         ^~~
a.cc:1:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
  +++ |+#include <set>
    1 | using namespace std;
a.cc:11:13: error: expected primary-expression before 'int'
   11 |         set<int> ans;
      |             ^~~
a.cc:14:9: error: 'ans' was not declared in this scope
   14 |         ans.insert(d);
      |         ^~~
a.cc:16:9: error: 'cout' was not declared in this scope
   16 |         cout << ans.size() << endl;
      |         ^~~~
a.cc:16:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:17: error: 'ans' was not declared in this scope
   16 |         cout << ans.size() << endl;
      |                 ^~~
a.cc:16:31: error: 'endl' was not declared in this scope
   16 |         cout << ans.size() << endl;
      |                               ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include <iostream>
#include <sstream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <memory>
#include <complex>
#include <numeric>
#include <cstdio>
#include <iomanip>
#include <random>

#define REP(i,m,n) for(int i=int(m);i<int(n);i++)
#define RREP(i,m,n) for(int i=int(n)-1;i>=int(m);--i)
#define EACH(i,c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())
//#define int long long

#ifdef LOCAL
#define DEBUG(s) cout << (s) << endl
#define dump(x)  cerr << #x << " = " << (x) << endl
#define BR cout << endl;
#else
#define DEBUG(s) do{}while(0)
#define dump(x) do{}while(0)
#define BR 
#endif
using namespace std;

using UI = unsigned int;
using UL = unsigned long;
using LL = long long;
using ULL = unsigned long long;
using VI = vector<int>;
using VVI = vector<VI>;
using VLL = vector<LL>;
using VVLL = vector<VLL>;
using VS = vector<string>;
using PII = pair<int,int>;
using VP = vector<PII>;

void solve() {
    int n;
    cin >> n;
    VI d(n);
    REP(i,0,n) cin >> d[i];
    sort(all(d));
    int ans = 1;
    REP(i,1,n) if (d[i] > d[i-1]) ++cnt;
    cout << ans << endl;
}

signed main() {
    solve();
    
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:59:37: error: 'cnt' was not declared in this scope; did you mean 'int'?
   59 |     REP(i,1,n) if (d[i] > d[i-1]) ++cnt;
      |                                     ^~~
      |                                     int
Language: C++

#include <iostream>
#include <algorithm>
#include <string> 
#include <math.h>
#include <set>
#include <vector>
#define rep(i,n) for(int i=0; i< (int)(n); ++i)
using namespace std;


int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int n;
	cin >> n;
	int d[110];
	rep(i,n) cin >> d[i];

	int num[110] = 0;
	rep(i,n)


	rep(i,n) num[d[i]]++;


    int res = 0;
	rep(i,n) {
		if(num) res++;
	} 
	cout << res <<  "\n";
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:20:24: error: array must be initialized with a brace-enclosed initializer
   20 |         int num[110] = 0;
      |                        ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string> 
#include <math.h>
#include <vector>
#define rep(i,N) for(int i=0; i< (int)(n); i++)
using namespace std;


int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int N;
	int d[110];
	cin >> N;
	rep(i,N) cin >> d[i];

	int num[110] = {0};
	rep(i,N) num[d[i]]++;

	int res = 0;
	for(int i=1; i<=N; i++){
		if(num[i]) res++;
	}
	cout << res << "/n";

} 



Compiler output:
a.cc: In function 'int main()':
a.cc:6:40: error: 'n' was not declared in this scope
    6 | #define rep(i,N) for(int i=0; i< (int)(n); i++)
      |                                        ^
a.cc:16:9: note: in expansion of macro 'rep'
   16 |         rep(i,N) cin >> d[i];
      |         ^~~
a.cc:6:40: error: 'n' was not declared in this scope
    6 | #define rep(i,N) for(int i=0; i< (int)(n); i++)
      |                                        ^
a.cc:19:9: note: in expansion of macro 'rep'
   19 |         rep(i,N) num[d[i]]++;
      |         ^~~
Language: C++

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


int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int N;
	int d[110];
	cin >> N;
	rep(i,n) cin >> d[i];

	int num[110] = {0};
	rep(i,n) num[d[i]]++;

	int res = 0;
	for(int i=1; i<=N; i++){
		if(num[i]) res++;
	}
	cout << res << "/n";

} 



Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: 'n' was not declared in this scope
   16 |         rep(i,n) cin >> d[i];
      |               ^
a.cc:6:40: note: in definition of macro 'rep'
    6 | #define rep(i,n) for(int i=0; i< (int)(n); i++)
      |                                        ^
a.cc:19:15: error: 'n' was not declared in this scope
   19 |         rep(i,n) num[d[i]]++;
      |               ^
a.cc:6:40: note: in definition of macro 'rep'
    6 | #define rep(i,n) for(int i=0; i< (int)(n); i++)
      |                                        ^
Language: C++

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


int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int N;
	int d[110];
	cin >> N;
	rep(i,n) cin >> d[i];

	int num[110] = {0};
	rep(i,n) num[d[i]]++;

	int res = 0;
	for(int i=1; i<=N; i++){
		if(num[i]) res++;
	}
	cout << res << "/n";

} 



Compiler output:
a.cc: In function 'int main()':
a.cc:6:34: error: expected primary-expression before 'int'
    6 | #define rep(i,n) for(int i=0; i< int n; i++)
      |                                  ^~~
a.cc:16:9: note: in expansion of macro 'rep'
   16 |         rep(i,n) cin >> d[i];
      |         ^~~
a.cc:6:34: error: expected ';' before 'int'
    6 | #define rep(i,n) for(int i=0; i< int n; i++)
      |                                  ^~~
a.cc:16:9: note: in expansion of macro 'rep'
   16 |         rep(i,n) cin >> d[i];
      |         ^~~
a.cc:6:34: error: expected primary-expression before 'int'
    6 | #define rep(i,n) for(int i=0; i< int n; i++)
      |                                  ^~~
a.cc:16:9: note: in expansion of macro 'rep'
   16 |         rep(i,n) cin >> d[i];
      |         ^~~
a.cc:6:34: error: expected ')' before 'int'
    6 | #define rep(i,n) for(int i=0; i< int n; i++)
      |                     ~            ^~~
a.cc:16:9: note: in expansion of macro 'rep'
   16 |         rep(i,n) cin >> d[i];
      |         ^~~
a.cc:16:13: error: 'i' was not declared in this scope
   16 |         rep(i,n) cin >> d[i];
      |             ^
a.cc:6:41: note: in definition of macro 'rep'
    6 | #define rep(i,n) for(int i=0; i< int n; i++)
      |                                         ^
a.cc:6:34: error: expected primary-expression before 'int'
    6 | #define rep(i,n) for(int i=0; i< int n; i++)
      |                                  ^~~
a.cc:19:9: note: in expansion of macro 'rep'
   19 |         rep(i,n) num[d[i]]++;
      |         ^~~
a.cc:6:34: error: expected ';' before 'int'
    6 | #define rep(i,n) for(int i=0; i< int n; i++)
      |                                  ^~~
a.cc:19:9: note: in expansion of macro 'rep'
   19 |         rep(i,n) num[d[i]]++;
      |         ^~~
a.cc:6:34: error: expected primary-expression before 'int'
    6 | #define rep(i,n) for(int i=0; i< int n; i++)
      |                                  ^~~
a.cc:19:9: note: in expansion of macro 'rep'
   19 |         rep(i,n) num[d[i]]++;
      |         ^~~
a.cc:6:34: error: expected ')' before 'int'
    6 | #define rep(i,n) for(int i=0; i< int n; i++)
      |                     ~            ^~~
a.cc:19:9: note: in expansion of macro 'rep'
   19 |         rep(i,n) num[d[i]]++;
      |         ^~~
Language: C++

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


int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int N;
	int d[110];
	cin >> N;
	rep(i,n) cin >> d[i];

	int num[110] = {0};
	rep(i,n) num[d[i]]++;

	int res = 0;
	for(int i=1; i<=N; i++){
		if(num[i]) res++;
	}
	cout << res << "/n";

} 



Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: 'n' was not declared in this scope
   16 |         rep(i,n) cin >> d[i];
      |               ^
a.cc:6:38: note: in definition of macro 'rep'
    6 | #define rep(i,n) for(int i=0; i< int(n); i++)
      |                                      ^
a.cc:19:15: error: 'n' was not declared in this scope
   19 |         rep(i,n) num[d[i]]++;
      |               ^
a.cc:6:38: note: in definition of macro 'rep'
    6 | #define rep(i,n) for(int i=0; i< int(n); i++)
      |                                      ^
Language: C

n = int(input())
a = set()

for i in range(n):
  b = int(input())
  a.add(b)

print(len(a))


Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n = int(input())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:5: error: expected expression before 'int'
    1 | n = int(input())
      |     ^~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int n,ans;
    cin>>n;
    vector<int>d(n+1);
    int i=0;
    while(i<n){
        cin>>d.at(i);
    }
    d(0)=0;
    sort(d.begin(),d.end());
    ans=i=0;
    while(i<n+1){
        if(d.at(i)<d.at(i+1)){
            ans++;
        }
    }
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'vector' was not declared in this scope
    7 |     vector<int>d(n+1);
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:7:12: error: expected primary-expression before 'int'
    7 |     vector<int>d(n+1);
      |            ^~~
a.cc:10:14: error: 'd' was not declared in this scope
   10 |         cin>>d.at(i);
      |              ^
a.cc:12:5: error: 'd' was not declared in this scope
   12 |     d(0)=0;
      |     ^
a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |     sort(d.begin(),d.end());
      |     ^~~~
      |     short
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define mfill(x,y) memset(x,y,sizeof(x))
#define all(v) v.begin(), v.end()
#define y0 y12345
#define y1 y54321

#ifdef LOCAL
#define debug(...) fprintf(stderr,__VA_ARGS__)
#else
#define debug(...) 42
#endif

using ul = unsigned long;
using ll = long long;
using P = pair<int, int>;
using vint = vector<int>;
template<class T>bool chmax(T &a, const T &b){if(a<b){a=b;return 1;}return 0;}
template<class T>bool chmin(T &a, const T &b){if(a>b){a=b;return 1;}return 0;}

vint dx = {-1, 0, 1, 0}, dy = {0, -1, 0, 1};
vint dx8 = {-1, -1, -1, 0, 1, 1, 1, 0}, dy8 = {-1, 0, 1, 1, 1, 0, -1, -1};

int main() {
	cin.tie(0);
   	ios::sync_with_stdio(false);
	debug("debug test\n");
   	int n,m;cin>>n;
	vint d(100);
	rep(i, n){
		int a;cin>>a;
		d[a-1]++;
	}
	int ans = 0;
	rep(i, 100){
		if(d[i] > 0)ans++;
	}
	cout << ans << endl;
	return 0;
}
a

Compiler output:
a.cc:43:1: error: 'a' does not name a type
   43 | a
      | ^
Language: C++

//do not think about past and stay in this moment
//organize and work - Abhinav IIITA
#include <bits/stdc++.h>
#include <ctime>
using namespace std;
#define int long long
#define ld long double
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(),(v).end() 
const ld pi = acos(-1.0);
const int day[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());


// -----------------------------------------------------------------------




// -----------------------------------------------------------------------

int arr[3000000];
void input(int n){
	for(int i=0;i<n;++i)
	cin>>arr[i];
}

// -----------------------------------------------------------------------



void solve(){
	int n;
  cin>>n;
  mp<int,int>mp;
  while(n--)
  {
    int tp;
    cin>>tp;
    mp[tp]++;
  }
  cout<<mp.size();
  
	
	
		
}


// -----------------------------------------------------------------------


int32_t main()
{
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); 	
	int t=1;
	//cin>>t;
	while(t--)
	solve();
	return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:35:3: error: 'mp' was not declared in this scope
   35 |   mp<int,int>mp;
      |   ^~
a.cc:6:13: error: expected primary-expression before 'long'
    6 | #define int long long
      |             ^~~~
a.cc:35:6: note: in expansion of macro 'int'
   35 |   mp<int,int>mp;
      |      ^~~