criyle/codenet-compile-errors huggingface dataset:
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());


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


void func(string s,string t){
	int l1=sz(s),l2=sz(t);
	if(l1>l2)
	return false;
	for(int i=0;i<=l2-l1;++i){
		bool fg=true;
		for(int j=0;j<l1;++j){
			if(s[j]!=t[j+i]){
				fg=false;
			}
		}
		if(fg)
		return fg;
	}
	return false;
}



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

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 func(std::string, std::string)':
a.cc:21:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
   21 |         return false;
      |                ^~~~~
a.cc:30:24: error: return-statement with a value, in function returning 'void' [-fpermissive]
   30 |                 return fg;
      |                        ^~
a.cc:32:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
   32 |         return false;
      |                ^~~~~
a.cc: In function 'void solve()':
a.cc:52:3: error: 'mp' was not declared in this scope
   52 |   mp<int,int>mp;
      |   ^~
a.cc:6:13: error: expected primary-expression before 'long'
    6 | #define int long long
      |             ^~~~
a.cc:52:6: note: in expansion of macro 'int'
   52 |   mp<int,int>mp;
      |      ^~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
  int N;
  int d[100];
  int count = 0;
  cin >> N;
  for(int i=0;i<N;++i){
    cin >> d[i];
  }
  sort(d, d+N);
  mochi = 0;
  for(int i=0;i<N;++i){
    if (mochi != d[i]) {
      ++count;
      mochi = d[i];
    }
  }
  cout << count;
  
  return 0;
}

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

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
  int N;
  int d[100];
  int count = 0;
  cin >> N;
  for(int i=0;i<N;++i){
    cin >> d[i];
  }
  sort(d, d+N);
  mochi = 0;
  for(int i=1;i<N;++i){
    if (mochi != d[i]) {
      ++count;
      mochi = d[i];
    }
  }
  cout << count;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'mochi' was not declared in this scope
   13 |   mochi = 0;
      |   ^~~~~
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);
  }
  
  vector<int> num(N) = {0};
  
  for (int i = 0; i < N; i++){
    num.at(d.at(i)-1)++;
  }
  
  int k;
  
  for (int i = 0; i < N; i++){
    if(num.at(i)) k++;
  }
  
  cout << k << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: expected ',' or ';' before '=' token
   12 |   vector<int> num(N) = {0};
      |                      ^
Language: C++

#include<bits/stdc++.h>  
using namespace std;
 
int main(){
  int N;
  map<int,int> Mochi;
  for (int i = 0; i < N; i++){
    int tmp;
    cin >> tmp;
   Mochi[tmp]
  }
  cout << Mochi.size() << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected ';' before '}' token
   10 |    Mochi[tmp]
      |              ^
      |              ;
   11 |   }
      |   ~
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 kagami;
  kagami = 0 ;
  for ( int i = 0 ; i < N ; i ++){
    if (vec.at(i) > vec.at(i+1)){
      kagami ++;
    }
    else {
      continue
    }
  }
    cout << kagami << endl;
  }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:22:15: error: expected ';' before '}' token
   22 |       continue
      |               ^
      |               ;
   23 |     }
      |     ~
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 kagami;
  kagami = 0 ;
  for ( int i = 0 ; i < N ; i ++){
    if (vec.at(i) > vec.at(i+1)){
      kagami ++;
    }
    else {
      continue
    }
  }
    cout << kagami << endl;
  }
  

Compiler output:
a.cc:1:25: error: missing terminating > character
    1 | #include <bits/stdc++.h)
      |                         ^
a.cc:1:10: fatal error: bits/stdc++.h): No such file or directory
    1 | #include <bits/stdc++.h)
      |          ^
compilation terminated.
Language: C++

#include <iostream>

using namespace std;

int main(void)
{
    int N, d[101], i, count=0;

    cin >> N;

    for(i=1; i<=N; i++){
        cin >> d[i];
    }

    sort(d, d+N+1);

    if(N==1){
        cout << 1 << endl;
    }

    else{
        for(i=0; i<N-1; i++){
            if(d[i] == d[i+1]){
                count++;
            }
        }

        cout << N-count << endl;
    }

    return 0;
}

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

#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>());
  
  ans=1;
  for(int i=1; i<n; i++) {
    if(a[i]!=a[i-1]) ans++;
  }
  
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: 'N' was not declared in this scope
    8 |   for(int i=0; i<N; i++) cin >> a[i];
      |                  ^
a.cc:12:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |   ans=1;
      |   ^~~
      |   abs
Language: C++

#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>());
  
  ans=1;
  for(int i=1; i<n; i++) {
    if(a[i]!=a[i-1]) ans++;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: 'N' was not declared in this scope
    8 |   for(int i=0; i<N; i++) cin >> a[i];
      |                  ^
a.cc:12:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |   ans=1;
      |   ^~~
      |   abs
Language: C++

#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>());
  
  ans=1;
  for(int i=1; i<N; i++) {
    if(a[i]!=a[i-1]) ans++;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: 'N' was not declared in this scope
    8 |   for(int i=0; i<N; i++) cin >> a[i];
      |                  ^
a.cc:12:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |   ans=1;
      |   ^~~
      |   abs
a.cc:13:18: error: 'N' was not declared in this scope
   13 |   for(int i=1; i<N; i++) {
      |                  ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
	int n;cin>>n;
    vector<int> a(n);
    for(int i = 0; n > i; i++){
    	cin>>a[i];
    }
    sort(a.begin(),a.end());
    a.erase(unique(a.begin(),a.end()),a.end);
}
        

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: no matching function for call to 'std::vector<int>::erase(__gnu_cxx::__normal_iterator<int*, std::vector<int> >, <unresolved overloaded function type>)'
   12 |     a.erase(unique(a.begin(),a.end()),a.end);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = int; _Alloc = std::allocator<int>; iterator = std::vector<int>::iterator; const_iterator = std::vector<int>::const_iterator]'
 1536 |       erase(const_iterator __position)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = int; _Alloc = std::allocator<int>; iterator = std::vector<int>::iterator; const_iterator = std::vector<int>::const_iterator]'
 1564 |       erase(const_iterator __first, const_iterator __last)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:52: note:   no known conversion for argument 2 from '<unresolved overloaded function type>' to 'std::vector<int>::const_iterator'
 1564 |       erase(const_iterator __first, const_iterator __last)
      |                                     ~~~~~~~~~~~~~~~^~~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: redeclaration of 'int d'
    6 |   int d=1;
      |       ^
a.cc:5:9: note: 'int d' previously declared here
    5 |   int N,d;
      |         ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: redeclaration of 'int d'
    6 |   int d=1;
      |       ^
a.cc:5:9: note: 'int d' previously declared here
    5 |   int N,d;
      |         ^
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: redeclaration of 'int d'
    6 |   int d=1;
      |       ^
a.cc:5:9: note: 'int d' previously declared here
    5 |   int N,d;
      |         ^
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   for(i=0;i<N;i++){
      |       ^
a.cc:14:7: error: 'i' was not declared in this scope
   14 |   for(i=0;i<(N-1);i++){
      |       ^
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,a) for(int i=0;i<a;i++)
using namespace std;
int main(){
    int n;
    cin>>n;
    map m<int,int>;
    rep(i,n){
        int enter;
        cin>>enter;
        m[enter]=0;
    }
    cout<<m.size()<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected initializer before '<' token
    7 |     map m<int,int>;
      |          ^
a.cc:11:9: error: 'm' was not declared in this scope
   11 |         m[enter]=0;
      |         ^
a.cc:13:11: error: 'm' was not declared in this scope
   13 |     cout<<m.size()<<endl;
      |           ^
Language: C++

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

int main() {
  int N;
  int dan=0;
  cin>>N;
  vector<int>card(N);
  for(int i=0; i<N; i++){
    cin>>d.at(i);
  }
  //昇順に並び替える
  for(int i=0; i<N; i++){
    for(int j=i+1; j<N; j++){
      if(d.at(i)>d.at(j)){
        swap(d.at(i),d.at(j));
      }
    }
  }
  //並び替え終了
  for(int i=0; i<N; i++){
    if(d.at(i)=d.at(i+1)){
      continue;
    }
    dan++;
  } 
  cout<<dan<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: 'd' was not declared in this scope
   10 |     cin>>d.at(i);
      |          ^
a.cc:15:10: error: 'd' was not declared in this scope
   15 |       if(d.at(i)>d.at(j)){
      |          ^
a.cc:22:8: error: 'd' was not declared in this scope
   22 |     if(d.at(i)=d.at(i+1)){
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    int N,unradi = 0,ans = 0;
  cin >> N;
  vector<int> radi(N);
  for(int i = 0; i < N; i++){
  	cin >> radi[i];
  } 
  reverse(radi.begin());
  unradi = radi[N-1];
  ans++;
  for(int i = N; i > 0; i--){
    if(unradi > radi[i]){
  	  unradi = radi[i];
      ans++;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: no matching function for call to 'reverse(std::vector<int>::iterator)'
   11 |   reverse(radi.begin());
      |   ~~~~~~~^~~~~~~~~~~~~~
In file included 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/bits/stl_algo.h:1083:5: note: candidate: 'template<class _BIter> void std::reverse(_BIter, _BIter)'
 1083 |     reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
      |     ^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1083:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note: candidate: 'template<class _ExecutionPolicy, class _BidirectionalIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::reverse(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator)'
  249 | reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last);
      | ^~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note:   candidate expects 3 arguments, 1 provided
Language: C++

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

int main(){
  int N,a,cnt,max;
  max = 0;
  cnt = 0;
  cin >> N;
  vector <int> moti;
  for(int i = 0;i<N;i++){
   	cin >> a;
    moti.push_back(a);
  }
  sort(moti.begin(),moti.end());
    for(int i = 0;i < moti.size() -1;i++){
    	if(max < moti.at(i)){
        	max = moi.at(i);
          	cnt++;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:23: error: 'moi' was not declared in this scope; did you mean 'moti'?
   17 |                 max = moi.at(i);
      |                       ^~~
      |                       moti
Language: C++

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

int main(){
  int N,a,cnt,max;
  max = 0;
  cnt = 0;
  cin >> N;
  vector <int> moti;
  for(int i = 0;i<N;i++){
   	cin >> a;
    moti.push_back(a);
  }
  sort(moti.begin(),moti.end())
    for(int i = 0;i < moti.size();i++){
    	if(max < moti.at(i)){
        	max = moi.at(i);
          	cnt++;
        }
    }
}

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

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

int main(){
  int N,a,cnt,max;
  max = 0;
  cnt = 0;
  cin >> N;
  vector <int> moti;
  for(int i = 0;i<N;i++){
   	cin >> a;
    moti.push_back(a);
  }
  sort(moti.begin(),moti.end())
    for(int i = 0;i < moti.size() -1;i++){
    	if(max < moti.at(i)){
        	max = moi.at(i);
          	cnt++;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:32: error: expected ';' before 'for'
   14 |   sort(moti.begin(),moti.end())
      |                                ^
      |                                ;
   15 |     for(int i = 0;i < moti.size() -1;i++){
      |     ~~~                         
a.cc:15:19: error: 'i' was not declared in this scope
   15 |     for(int i = 0;i < moti.size() -1;i++){
      |                   ^
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 num[110]={0};
  for (int i=0;i<N;++i){
    num[d[i]]++;
  }
  int res =0;
  for (inti=1;i<=100;++i){
    if (num[i]>0){
      ++res;
    }
  }
  cout << res <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: 'inti' was not declared in this scope; did you mean 'int'?
   15 |   for (inti=1;i<=100;++i){
      |        ^~~~
      |        int
a.cc:15:15: error: 'i' was not declared in this scope
   15 |   for (inti=1;i<=100;++i){
      |               ^
Language: C++

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

int main() {
  //宣言
  int N;
  vector<int> D;
  int ans =0;
  
  //入力
  cin >> N;
  D = vector<int>(N);
  for(int i=0;i<N;i++){
  cin >> D.at(i);
  }
  
  //処理
  sort((D.begin(),D.end());
  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:18:16: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::begin() [with _Tp = int; _Alloc = std::allocator<int>; iterator = std::vector<int>::iterator]', declared with attribute 'nodiscard' [-Wunused-result]
   18 |   sort((D.begin(),D.end());
      |         ~~~~~~~^~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:873:7: note: declared here
  873 |       begin() _GLIBCXX_NOEXCEPT
      |       ^~~~~
a.cc:18:27: error: expected ')' before ';' token
   18 |   sort((D.begin(),D.end());
      |       ~                   ^
      |                           )
a.cc:21:28: error: expected ';' before 'ans'
   21 |     if(D.at(i) != D.at(i+1)ans++;
      |                            ^~~
      |                            ;
a.cc:22:3: error: expected primary-expression before '}' token
   22 |   }
      |   ^
a.cc:21:34: error: expected ')' before '}' token
   21 |     if(D.at(i) != D.at(i+1)ans++;
      |       ~                          ^
      |                                  )
   22 |   }
      |   ~                               
a.cc:22:3: error: expected primary-expression before '}' token
   22 |   }
      |   ^
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++){
    int di;
    cin >> di;
    D.at(i)=di;
  }
  sort(D.begin(), D.end());
  
  int sum=0;
  

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

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

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

    vector<int> num(110);
    for (int i = 0; i < N; i++) {
        num.at(d.at(i)) ++;
    }

    int res = 0;
    for (int i = 0; i < num.size(); i++) {
        if (num.at(i)) res++;
    }

    cout << res << endl;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> N;
      |     ^~~
a.cc:8:5: error: 'vector' was not declared in this scope
    8 |     vector<int> d(N);
      |     ^~~~~~
a.cc:8:12: error: expected primary-expression before 'int'
    8 |     vector<int> d(N);
      |            ^~~
a.cc:9:40: error: 'd' was not declared in this scope
    9 |     for (int i = 0; i < N; ++i) cin >> d.at(i);
      |                                        ^
a.cc:12:12: error: expected primary-expression before 'int'
   12 |     vector<int> num(110);
      |            ^~~
a.cc:14:9: error: 'num' was not declared in this scope; did you mean 'enum'?
   14 |         num.at(d.at(i)) ++;
      |         ^~~
      |         enum
a.cc:14:16: error: 'd' was not declared in this scope
   14 |         num.at(d.at(i)) ++;
      |                ^
a.cc:18:25: error: 'num' was not declared in this scope; did you mean 'enum'?
   18 |     for (int i = 0; i < num.size(); i++) {
      |                         ^~~
      |                         enum
a.cc:22:5: error: 'cout' was not declared in this scope
   22 |     cout << res << endl;
      |     ^~~~
a.cc:22:20: error: 'endl' was not declared in this scope
   22 |     cout << res << endl;
      |                    ^~~~
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 cnt=0;
  for(int i=0;i<n-1;i++){
  if(!(vec.at(i)==vec.a(i+1)))cnt++;}
  cout <<cnt <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: 'class std::vector<int>' has no member named 'a'; did you mean 'at'?
   13 |   if(!(vec.at(i)==vec.a(i+1)))cnt++;}
      |                       ^
      |                       at
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 cnt=0;
  for(int i=0;i<n-1;i++){
  if(!(vec.at(i)==vec.ai(i+1)))cnt++;}
  cout <<cnt <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:30: error: expected ';' before 'int'
   10 |   sort(vec.begin(),vec.end())
      |                              ^
      |                              ;
   11 |     int cnt=0;
      |     ~~~                       
a.cc:13:23: error: 'class std::vector<int>' has no member named 'ai'; did you mean 'at'?
   13 |   if(!(vec.at(i)==vec.ai(i+1)))cnt++;}
      |                       ^~
      |                       at
a.cc:13:32: error: 'cnt' was not declared in this scope; did you mean 'int'?
   13 |   if(!(vec.at(i)==vec.ai(i+1)))cnt++;}
      |                                ^~~
      |                                int
a.cc:14:10: error: 'cnt' was not declared in this scope; did you mean 'int'?
   14 |   cout <<cnt <<endl;
      |          ^~~
      |          int
Language: C++

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

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

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

#include <iostream>
#include <cstdio>
#include <set>
using  namespace std;
#define ll long long 
const int maxx = 105;
int a[maxx];
set<int> s;
int main()
{
	
	int n;
	cin>>n;
	for(int i=1;i<a=n;i++)
	{
		cin>>a[i];
		s.insert(a[i]);
	}	
	cout<<s.size()<<endl; 
	
	
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |         for(int i=1;i<a=n;i++)
      |                     ~^~
a.cc:14:22: error: lvalue required as left operand of assignment
Language: C

#include <stdio.h>

int main(int argc, char **argv)
{
  int n, c[100] = {0};
  scanf("%d", &n);
  int ans = 0;
  
  for(i=0; i<n;++i){
    int d;
    scanf("%d", &d);
    c[d] = 1;
  }
  for(i=0; i<n;++i){
    ans += c[i];
  }
  printf("%d\n", ans);
}


Compiler output:
main.c: In function 'main':
main.c:9:7: error: 'i' undeclared (first use in this function)
    9 |   for(i=0; i<n;++i){
      |       ^
main.c:9:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main(){
  int N,i,a=1;
  cin >> N; //5
  vector <int> d(N); 
  
  for(i=0; i<N; i++){
  cin >> d.at(i); // 3 5 12 8 12
  }
  
  sort(d.begin(),d.end());   // 3 5 8 12 12
  reverse(d.begin(),d.end()); // 12 12 8 5 3
  
  for(i=1; i<N; i++){
    
   if(d.at(i) == d.at(i-1)){
    a = a;
   }
   else if(d.at(i)< d.at(i-1)){
    a++;
  }
    
  cout << a << endl;
  
return 0;
}


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

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

int n, d[110], lay = 1;
int main() {
    cin >> n;
    for (int i = 1; i <= n; i++)
    {
        cin >> d[i];
    }
    for (int i = 0; i < count; i++)
    {
        if (d[i] < d[i + 1])
        {
            lay++;
        }
        
    }
    cout << lay << endl;
    
    cin.get();
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<'
   11 |     for (int i = 0; i < count; i++)
      |                     ~~^~~~~~~
Language: C++

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

int main (){
  int a;
  cin >> a;
  int b[110];
  for(int i =0;i<a;i++){
    cin >> b[i];
  }
  sort(b,b+a);
  
  int c,e;
  int c = 0;
  int e = b[0];
  
  for(int i =0;i<a;i++){
    
    if( b[i] > e){
      e = b[i];
      c ++;
    }
  }
  
  cout << c << endl;
}
      
  
 


Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: redeclaration of 'int c'
   14 |   int c = 0;
      |       ^
a.cc:13:7: note: 'int c' previously declared here
   13 |   int c,e;
      |       ^
a.cc:15:7: error: redeclaration of 'int e'
   15 |   int e = b[0];
      |       ^
a.cc:13:9: note: 'int e' previously declared here
   13 |   int c,e;
      |         ^
Language: C++

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

int main (){
  int a;
  cin >> a;
  int b[110];
  for(int i =0;i<a;i++){
    cin >> b[i];
  }
  sort(b,b+a);
  int c,e;
  int c =0;
  int e = b[0];
  
  for(int i =0;i<a;i++){
    
    if( b[i] > e){
      e = b[i];
      c ++;
    }
  }
  
  cout << c << endl;
}
      
  
 


Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: redeclaration of 'int c'
   13 |   int c =0;
      |       ^
a.cc:12:7: note: 'int c' previously declared here
   12 |   int c,e;
      |       ^
a.cc:14:7: error: redeclaration of 'int e'
   14 |   int e = b[0];
      |       ^
a.cc:12:9: note: 'int e' previously declared here
   12 |   int c,e;
      |         ^
Language: Java

package atcoder;

import java.util.Scanner;



//＊標準入力について
//単語の場合はnext()
//整数の場合はnextInt()
//文字列（1行）の場合はnextLine()

//問題url
//https:atcoder.jp/contests/abc085/tasks/abc085_b
public class ABC985 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int total = sc.nextInt();
		int d;
		
		//＊解法
		//「異なる大きさの餅がいくつあるか」という問題に読み換えることができる。
		//餅の総数が最大１００個、大きさも１〜１００までの整数なので、
		//１００個の要素をもつ配列(Aとする)を作り、
		//順番に餅の大きさを見て、餅の大きさと等しいAの要素番号に１を入れる。
		//全ての餅を見終わった後に、配列Aの要素を全て足すと、異なる餅の数になる。
		
		int[] kata = new int[100];
		
		for (int i=0;i<total;i++) {
			d=sc.nextInt();
			kata[d]=1;
		}
		int sum=0;
		for(int j=0; j<100;j++) {
			sum=sum+kata[j];
		}
		System.out.println(sum); 
	}	
}


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: reference to 'count' is ambiguous
   11 |     if(c<d)count++;
      |            ^~~~~
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:4:5: note:                 'int count'
    4 | int count=0;
      |     ^~~~~
a.cc:13:9: error: reference to 'count' is ambiguous
   13 |   cout<<count<<endl;
      |         ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:4:5: note:                 'int count'
    4 | int count=0;
      |     ^~~~~
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 sum = 1;
  for(int i = 0; i < N-1; i++){
    if (vec.at(i) > vec.at(i+1)){
      sum++
    }
   }
    
    cout << sum << endl;
  }
      
       
      


Compiler output:
a.cc: In function 'int main()':
a.cc:20:12: error: expected ';' before '}' token
   20 |       sum++
      |            ^
      |            ;
   21 |     }
      |     ~
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 sum = 0;
  for(int i = 0; i<N; i++){
    if (vec.at(i) > vec.at(i+1) {
      sum++
    }
   }
    
    cout << sum << endl;
  }
      
       
      


Compiler output:
a.cc: In function 'int main()':
a.cc:19:32: error: expected ')' before '{' token
   19 |     if (vec.at(i) > vec.at(i+1) {
      |        ~                       ^~
      |                                )
a.cc:22:4: error: expected primary-expression before '}' token
   22 |    }
      |    ^
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[i];
  }
      
    sort(vec.begin(), vec.end());
    reverse(vec.begin(), vec.end());

  int sum = 0;
  for(int i = 0; i<N; i++){
    if (vec.at(i) > vec.at(i+1) {
      sum++
    }
    
    cout << sum << endl;
  }
      
       
      


Compiler output:
a.cc: In function 'int main()':
a.cc:19:32: error: expected ';' before '{' token
   19 |     if (vec.at(i) > vec.at(i+1) {
      |                                ^~
      |                                ;
a.cc:23:24: error: expected ')' before ';' token
   23 |     cout << sum << endl;
      |                        ^
      |                        )
a.cc:19:8: note: to match this '('
   19 |     if (vec.at(i) > vec.at(i+1) {
      |        ^
a.cc:24:4: error: expected '}' at end of input
   24 |   }
      |    ^
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);
  
  for (int i = 0; i < N; i++) {
		cin >> vec[i];
    
    sort(vec.begin(), vec.end());
    reverse(vec.begin(), vec.end());

  int sum = 0;
  for(int i = 0; i<N; i++){
    if (vec.at(i-1) == vec.at(i)) {
      continue;
    }
    
    else{
      sum++;
    }
  }
    
    cout << sum << endl;
  }
      
       
      


Compiler output:
a.cc: In function 'int main()':
a.cc:28:4: error: expected '}' at end of input
   28 |   }
      |    ^
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);
    sort(vec.begin(), vec.end());
    reverse(vec.begin(), vec.end());

  int sum = 0;
  for(i=0; i<N; i++){
    if (vec.at(i-1) == vec.at(i)) {
      continue;
    }
    
    else{
      sum++;
    }
  }
    
    cout << sum << endl;
  }
      
       
      

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; i++){
      |       ^
Language: Java

import java.util.*;

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

Compiler output:
Main.java:9: error: cannot find symbol
            numSet.add(sc.nextInt);
                         ^
  symbol:   variable nextInt
  location: variable sc of type Scanner
1 error
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(i);
    }

    sort(d.rbegin(), d.rend());
    d.erase(unique(d.begin(), d.end()), d.end());
    cout << d.size() << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: no match for call to '(std::vector<int>) (int&)'
   10 |         cin >> d(i);
      |                ~^~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

int main()
{
    int N;
    std::cin >> N;
    std::vector<int> d(N);

    for (int i = 0; i < N; i++) std::cin >> d[i];

    std::sort(std::begin(d), std::end(d));

    int ans = 1;
    int b = d[0];
    for (int i = 1; i < N; i++) {
            if (b < d[i]) {
                b = d[i];
                ans++;
            }
        }
    }

    std::cout << ans << std::endl;

    return 0;
}

Compiler output:
a.cc:25:10: error: 'cout' in namespace 'std' does not name a type
   25 |     std::cout << ans << std::endl;
      |          ^~~~
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:27:5: error: expected unqualified-id before 'return'
   27 |     return 0;
      |     ^~~~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: expected ';' before 'for'
   12 |   M = di[0]
      |            ^
      |            ;
   13 |   for(int i=0; i<N; i++){
      |   ~~~       
a.cc:13:16: error: 'i' was not declared in this scope; did you mean 'di'?
   13 |   for(int i=0; i<N; i++){
      |                ^
      |                di
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 count = 1;
  for ( int j = 0; j < N-1; j++){
    if(vec.at(j) > vec.at(j+1)){
      count++;
    }
    else if {
      break;
    }
  }
  cout << count << endl;
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:22:13: error: expected '(' before '{' token
   22 |     else if {
      |             ^
      |             (
Language: C++

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

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


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 < X; i++)
      |       ^
a.cc:11:7: error: 'i' was not declared in this scope
   11 |   for(i = 0; i < (X - 1); i++){
      |       ^
Language: C++

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

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


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 < X; i++)
      |       ^
a.cc:12:7: error: 'i' was not declared in this scope
   12 |   for(i = 0; i < (X - 1); i++){
      |       ^
Language: C++

#include <bits/stdc++.h>
#include <cstdlib>  // abs() for integer 驍ｨ・ｶ陝・ｽｾ陋滂ｽ､雎弱ｅ・∫ｹｧ繝ｻ笆ｽ
#include <cmath>    // abs() for float, and fabs()
#include <algorithm>
#include <vector>
#include <string>
#define rep(i,n) for(int i = 0; i < (n);i++)
#define SORT(a) sort((a).begin(),(a).end())
#define REV(a) reverse((a).begin(),(a).end())
using namespace std;
#define INF 2000000000
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
#define che(a,string) cout<<"//"<<string <<"=="<<(a)<<"//" <<endl;

int main(){
  int N ;
  int d[110];
  cin >> N;
  rep(i,N) cin>>d[i];

  set<int> values;
  rep(i,N){
    values.insert(d[i]);
  }
  cout<<values.size()<<endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:26:29: error: expected '}' at end of input
   26 |   cout<<values.size()<<endl;
      |                             ^
a.cc:16:11: note: to match this '{'
   16 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<algorithm>
using namaspace std;

int main(){
    int N, a[N], count=1;
    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]) coutn++;
    }
    cout << count << endl;
    return 0;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namaspace'
    3 | using namaspace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |     cin >> N;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:5: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
    9 |     sort(a, a+N);
      |     ^~~~
      |     std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:11:26: error: 'coutn' was not declared in this scope; did you mean 'count'?
   11 |         if(a[i]!=a[i+1]) coutn++;
      |                          ^~~~~
      |                          count
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |     cout << count << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |     cout << count << endl;
      |                      ^~~~
      |                      std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main() {
  int n;
  cin >> n;
  int m;
  set<int> d;
  for(int i=0; i<n; i++){
    cin >> m;
    d.push(m);
  }
  cout << d.size() << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: 'class std::set<int>' has no member named 'push'
   11 |     d.push(m);
      |       ^~~~
Language: C++

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

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

    set<int> values; // insert するときに重複を取り除いてくれます
    for (int i = 0; i < N; ++i) {
        values.insert(d[i]); // 挿入します
    }

    // set のサイズを出力します
    rep(i,values.size())cout << values[i] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'i' was not declared in this scope
   17 |     rep(i,values.size())cout << values[i] << endl;
      |         ^
a.cc:17:5: error: 'rep' was not declared in this scope
   17 |     rep(i,values.size())cout << values[i] << endl;
      |     ^~~
Language: C++

+-- 15 行:"include" --------------------------------------------------------------------------------------------------------------using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
#define reps(i,n) for(int i=1;i<=(n);++i)
#define all(x) (x).begin(),(x).end()
#define pii pair<int,int>
#define int long long
#define setout(n,x) setw(n) << setfill(x)
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;
const long long mod = 1000000007;


signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    vector<int> d(n);
    rep(i,n){
        cin >> d[i];
    }
    sort(all(d));
    int cnt = 1;
    rep(i,n-1){
        cnt += (d[i] < d[i+1]);
    }
    cout << cnt << '\n';
    return 0;
}



Compiler output:
a.cc:1:1: error: expected unqualified-id before '+' token
    1 | +-- 15 行:"include" --------------------------------------------------------------------------------------------------------------using namespace std;
      | ^
a.cc: In function 'int main()':
a.cc:14:5: error: 'cin' was not declared in this scope
   14 |     cin.tie(0);
      |     ^~~
a.cc:15:5: error: 'ios' has not been declared
   15 |     ios::sync_with_stdio(false);
      |     ^~~
a.cc:18:5: error: 'vector' was not declared in this scope
   18 |     vector<int> d(n);
      |     ^~~~~~
a.cc:6:13: error: expected primary-expression before 'long'
    6 | #define int long long
      |             ^~~~
a.cc:18:12: note: in expansion of macro 'int'
   18 |     vector<int> d(n);
      |            ^~~
a.cc:20:16: error: 'd' was not declared in this scope
   20 |         cin >> d[i];
      |                ^
a.cc:22:14: error: 'd' was not declared in this scope
   22 |     sort(all(d));
      |              ^
a.cc:4:17: note: in definition of macro 'all'
    4 | #define all(x) (x).begin(),(x).end()
      |                 ^
a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   22 |     sort(all(d));
      |     ^~~~
      |     short
a.cc:27:5: error: 'cout' was not declared in this scope
   27 |     cout << cnt << '\n';
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
  int n;
  cin>>n;
  vector<int> v(n);
  rep(i,n){
    cin>>v.at(i);
  }
  sort(v.begin(), v.end(), std::greater<int>());
  int s=1;
  rep(j,n-1){
    if(v.at(i)>v.at(i+1)){
      s++;
    }
    else{
      cout<<s;
      return 0;
    }
  }
  cout<<s;
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: 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;
  set<int> v{n};
  for(int i=0;i<n;i++) cin>>v[i];
  cout<<v.size()<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:30: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int')
    6 |   for(int i=0;i<n;i++) cin>>v[i];
      |                              ^
Language: C++

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

int main(){
  int N; cin>>N;
  set<int> a;
  for(int i=0;i<N;i++){
    cin>>a.at(i);
  }
   cout<<a.size()<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'class std::set<int>' has no member named 'at'
    8 |     cin>>a.at(i);
      |            ^~