criyle/codenet-compile-errors huggingface dataset:
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 dan = 1;
    for (int i = 0; i < n - 1; i++) {
        if (vec.at(i) > vec.at(i + 1)) dan++;
    }

    cout << dan << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:31: error: no matching function for call to 'end()'
   10 |     sort(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: 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> 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
        for(int i=0; i<n; i++){
                       ^
  symbol:   variable n
  location: class Main
1 error
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){

    int num = 0;
    cin >> num;
    int moti[num];
    int count = 0;

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

    sort(moti, moti + num, greater<int>());

    int prev = moti[0];
    count++;



    for (int i = 0; i < num; i++) {
        if (moti[i] != prev) {
            count++;
            prev = moti[i];
        }
    }
    
    cout << count;
    



    return 0;
}

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

#include <iostream>
#include <string>

using namespace std;

int main(){

    int num = 0;
    cin >> num;
    int moti[num];
    int count = 0;

    for (int i = 0; i < num; i++) {
        cin >> moti[i];
    }
    sort(moti, moti + num, greater<int>());

    int prev = moti[0];
    count++;



    for (int i = 0; i < num; i++) {
        if (moti[i] != prev) {
            count++;
            prev = moti[i];
        }
    }
    
    cout << count;
    



    return 0;
}

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

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

int main() {
  int N;
  cin >> N;
  vector<int> vec(N);
  
  int count=0;
  for(int i=0; i<N; i++) {
    int x;
    cin >> x;
    
    for(int j=0; j<i+1; j++) {
      if(vec.at(j) == x) break;
      else {
        vec.at(j) = x;
        ++count;
    }
  }
  
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
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();
  
  for(int i=0; i<N; i++) {
    int x;
    cin >> x;
    
    for(int j=0; j<i+1; ++j) {
      if(vec.at(j) == x) break;
      else vec.at(j) = x;
    }
  }
  
  cout << vec.size() << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    7 |   vector<int> vec();
      |                  ^~
a.cc:7:18: note: remove parentheses to default-initialize a variable
    7 |   vector<int> vec();
      |                  ^~
      |                  --
a.cc:14:14: error: request for member 'at' in 'vec', which is of non-class type 'std::vector<int>()'
   14 |       if(vec.at(j) == x) break;
      |              ^~
a.cc:15:16: error: request for member 'at' in 'vec', which is of non-class type 'std::vector<int>()'
   15 |       else vec.at(j) = x;
      |                ^~
a.cc:19:15: error: request for member 'size' in 'vec', which is of non-class type 'std::vector<int>()'
   19 |   cout << vec.size() << endl;
      |               ^~~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<int> vec(N);
  
  for(int i=0; i<N; i++) {
    int x;
    cin >> x;
    
    for(int j=0; j<i; ++j) {
      if(vec.at(j) == x) break;
      else vec.at(j) = x;
    }
  }
  
  cout << vec.size() << endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
    1 | #incldue <bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incldue <bits/stdc++.h>
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> vec(N);
      |   ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | #incldue <bits/stdc++.h>
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> vec(N);
      |          ^~~
a.cc:14:10: error: 'vec' was not declared in this scope
   14 |       if(vec.at(j) == x) break;
      |          ^~~
a.cc:19:3: error: 'cout' was not declared in this scope
   19 |   cout << vec.size() << endl;
      |   ^~~~
a.cc:19:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:11: error: 'vec' was not declared in this scope
   19 |   cout << vec.size() << endl;
      |           ^~~
a.cc:19:25: error: 'endl' was not declared in this scope
   19 |   cout << vec.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 | #incldue <bits/stdc++.h>
Language: C++

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

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




Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   12 |     tmp = vec[0];
      |     ^~~
      |     tm
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());
    tmp = vec[0];
    for(int i = 0;i < N-1;i++){
       if(tmp != vec[i+1])
         ans++;
       tmp=vec[i+1];       
    }
    cout << ans << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   11 |     tmp = vec[0];
      |     ^~~
      |     tm
a.cc:14:10: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |          ans++;
      |          ^~~
      |          abs
a.cc:17:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |     cout << ans << endl;
      |             ^~~
      |             abs
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main() {
    int N;
    cin >> N;
    vector<int> ds(N);
    for (int i = 0; i < N; i++) {
        cin >> ds.at(i);
    }
    std::sort(ds.begin(), ds.end());
    int count = 0;
    for (int i = 0; i < ds.size(); i++) {
        if (i == 0) {
            count++;
        } else {
            if (ds.at(i -1) != ds.at(i)) {
                count += 1;
            }
        }
    }
    cout << count << endl;
    return 0;
}

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

#include <iostream>
#include <vector>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |     sort(ds.begin(), ds.end());
      |     ^~~~
      |     short
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.end());
  
  int a = 0;
  
  for (int i = 0; i < n; i++) {
    if (d.at(i) > 0) {
      x = d.at(i);
      a++;
    }
  }
  
  cout << a << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:7: error: 'x' was not declared in this scope
   19 |       x = d.at(i);
      |       ^
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.end());
  
  int a = 0;
  
  for (int i = 0; i < n; i++) {
    if (d.at(i) > 0) {
      x = d.at(i);
      a++;
    }
  }
  
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:7: error: 'x' was not declared in this scope
   19 |       x = d.at(i);
      |       ^
a.cc:24:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   24 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

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

int main() {
  int n,x=1;
  cin >> 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.begin());
  for(int i=1;i<n;i++){
    if(d(i)!=d(i-1)) x++;
  }
  cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: no match for call to '(std::vector<int>) (int&)'
   14 |     if(d(i)!=d(i-1)) x++;
      |        ~^~~
a.cc:14:15: error: no match for call to '(std::vector<int>) (int)'
   14 |     if(d(i)!=d(i-1)) x++;
      |              ~^~~~~
Language: C++

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

int main() {
  int n,x=0;
  cin >> 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.begin());
  for(int i=0;i<n;i++){
    if(d(i)-d(i+1)>0) x++;
  }
  cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: no match for call to '(std::vector<int>) (int&)'
   14 |     if(d(i)-d(i+1)>0) x++;
      |        ~^~~
a.cc:14:14: error: no match for call to '(std::vector<int>) (int)'
   14 |     if(d(i)-d(i+1)>0) x++;
      |             ~^~~~~
Language: C++

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

int main() {
  int n,x=0;
  cin >> 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.begin());
  for(int i=0;i<n;i++){
    if(d(i)>d(i+1)) x++;
  }
  cout << x << endl;
}


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

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
vector<int> kind;

int main(){
  int X,d;
  cin >> X;
  for(int i=0;i<X;i++){
    cin >> d;
    auto result = find(kind.begin(),kind.end(),d);
    if(result == kind.end())kind.push_back(d);
  }
  cout << kind.size() << endl;
  return 0;
}

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

macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}
fn main() {
    input! {
        n: u64,
        d: [usize; n],
    }
    use std::collections::HashSet;
    let uniq_n: HashSet<usize> = d.clone().drain(..).collect();
    println!("{}", uniq_n.len());
}

Compiler output:
a.cc:34:10: error: too many decimal points in number
   34 |         (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
      |          ^~~~~~~
a.cc:1:1: error: 'macro_rules' does not name a type
    1 | macro_rules! input {
      | ^~~~~~~~~~~
a.cc:18:1: error: 'macro_rules' does not name a type
   18 | macro_rules! input_inner {
      | ^~~~~~~~~~~
a.cc:28:1: error: 'macro_rules' does not name a type
   28 | macro_rules! read_value {
      | ^~~~~~~~~~~
a.cc:49:1: error: 'fn' does not name a type
   49 | fn main() {
      | ^~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: 'class std::set<int>' has no member named 'incert'; did you mean 'insert'?
   11 |     D.incert(a);
      |       ^~~~~~
      |       insert
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'vec' was not declared in this scope
   10 |  sort(vec.begin(), vec.end());
      |       ^~~
Language: C++

#include <iostream>
#include <set>

using namespace std;

int main(){
 	int n;
  	int temp;
  	set<int> nums;
  
  	cin >> n;
  	for(int i=0; i<n; i++){
      	cin >> tmp;
      	nums.insert(tmp);
    }
  
  	cout << nums.size() - 1;
  	
  	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: 'tmp' was not declared in this scope; did you mean 'temp'?
   13 |         cin >> tmp;
      |                ^~~
      |                temp
Language: C++

#include <iostream>
#include <set>

using namespace std;

int main(){
 	int n;
  	int temp;
  	set<int> nums;
  
  	cin >> n:
  	for(int i=0; i<n; i++){
      	cin >> tmp;
      	nums.insert(tmp);
    }
  
  	cout << nums.size() - 1;
  	
  	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: expected ';' before ':' token
   11 |         cin >> n:
      |                 ^
      |                 ;
a.cc:12:22: error: 'i' was not declared in this scope
   12 |         for(int i=0; i<n; i++){
      |                      ^
Language: C++

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

int main(){
    int n;
    int a=0;
    int count =0;
    cin>> n;
    vector <int> A(n);
    for(int i=0;i<n;++i){
        cin >> A[i];
    }
    for(int i=0;i<n;++i){
        if(a<A[i]){
            a=A[i]
            ++count; 
        }
        cout << count <<endl;
}

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

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

int main() {
    int N;
    int d[100];
    cin >> N;
    for (int i = 0; i < N; ++i) scanf("%d", &d[i]);

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

    // set のサイズを出力します
    printf("%d\n",values.size())
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:33: error: expected ';' before '}' token
   16 |     printf("%d\n",values.size())
      |                                 ^
      |                                 ;
   17 | }
      | ~
Language: C++

#include<iosream>
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 (int i = 1; i <= 100; ++i) {  
        if (num[i]) {  
            ++res;
        }
    }
    cout << res << endl;
}

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

#include <stdio.h>
int main(void){
  int i,n,c,a,k;
  scanf("%d\n",&n);
  int p[n];
  for(i=0;i<n;i++){
    scanf("%d\n",&p[i]);
    for(k=0;k<i;i++){
      if(p[i]==p[k]){
        f=1;
        break;
      }
    }
    if(f){
      c++;
      f=0;
      break;
    }
  }
  a=(sizeof p)-c;
  printf("%d\n",a);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:9: error: 'f' undeclared (first use in this function)
   10 |         f=1;
      |         ^
main.c:10:9: 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;
    cin >> n;
    vector<int> d(n);
    for (int i=0; i<n; i++){
        cin >> d.at(i);
    }
    int k=0;
    vector<int> t;
    t.at(0)=d.at(0);
    for (int j=0; j<n; j++){
            if (t.at(0) < d.at(j)){
                t.at(0)=d.at(j);
            }
    }
    for (;;){
        k++;
        t.at(k)=0;
        for (int j=0; j<n; j++){
            if (t.at(k) < d.at(j) && d.at(j) <= t.at(k-1)){
                t.at(k)=d.at(j);
            }
        }
        if (t.at(k-1)==t.at(k)){
            break;
        }
    }
    cout << k<< endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:31:22: error: expected '}' at end of input
   31 |     cout << k<< endl;
      |                      ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
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);
    }
    int k=0;
    vector<int> t;
    t.at(0)=d.at(0)
    for (int j=0; j<n; j++){
            if (t.at(0) < d.at(j)){
                t.at(0)=d.at(j);
            }
    }
    k+=1;
    for (;;){
        k++;
        for (int j=0; j<n; j++){
            if (t.at(k) < d.at(j) && d.at(j) <= t.at(k-1)){
                t.at(k)=d.at(j);
            }
        }
        if (t.at(k-1)==t.at(k)){
            k-=1;
            break;
        }
    }
    cout << k<< endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: expected ';' before 'for'
   13 |     t.at(0)=d.at(0)
      |                    ^
      |                    ;
   14 |     for (int j=0; j<n; j++){
      |     ~~~             
a.cc:14:19: error: 'j' was not declared in this scope
   14 |     for (int j=0; j<n; j++){
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  
  int N;
  cin >> N;
  
  ventor<int> d(N);
  
  for(int i = 0;i < N;i++) {
    cin >> d.at(i);
  }
  
  int answer = 0;
  for(int i = 0;i < N;i++) {
    int dan = d.at(i);
    int score = 1;
    
    for(int j = i;j < N;j++) {
      if(dan > d.at(j)) {
        score++;
        dan = d.at(j);
      }
    }
    
    answer = max(answer,score);
  }
  
  cout << answer << endl;
}
      
      

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'ventor' was not declared in this scope
    9 |   ventor<int> d(N);
      |   ^~~~~~
a.cc:9:10: error: expected primary-expression before 'int'
    9 |   ventor<int> d(N);
      |          ^~~
a.cc:12:12: error: 'd' was not declared in this scope
   12 |     cin >> d.at(i);
      |            ^
a.cc:17:15: error: 'd' was not declared in this scope
   17 |     int dan = d.at(i);
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  
  int N;
  cin >> N;
  
  ventor<int> d(N);
  
  for(int i = 0;i < N;i++) {
    cin >> d.at(i);
  }
  
  int answer = 0;
  for(int i = 0;i < N;i++) {
    int dan = d.at(i);
    int score = 1;
    
    for(int j = i;j < N;j++) {
      if(dan > d.at(j)) {
        score++;
        dan = d.at(j)
      }
    }
    
    answer = max(answer,score);
  }
  
  cout << answer << endl;
}
      
      

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'ventor' was not declared in this scope
    9 |   ventor<int> d(N);
      |   ^~~~~~
a.cc:9:10: error: expected primary-expression before 'int'
    9 |   ventor<int> d(N);
      |          ^~~
a.cc:12:12: error: 'd' was not declared in this scope
   12 |     cin >> d.at(i);
      |            ^
a.cc:17:15: error: 'd' was not declared in this scope
   17 |     int dan = d.at(i);
      |               ^
Language: C++

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

int main() {
  int N;
  cin >> N, S = 0;
  vector<int> vec(N + 1);
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  
  vec.at(N) = 0;
  sort(vec.begin(), vec.end());

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: 'S' was not declared in this scope
    6 |   cin >> N, S = 0;
      |             ^
Language: C++

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

int main() {
  int N;
  cin >> N, S = 0;
  vector<int> vec(N + 1);
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  
  vec.at(N) = 0;
  sort(vec.begin(), vec.end());

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: 'S' was not declared in this scope
    6 |   cin >> N, S = 0;
      |             ^
a.cc:16:34: error: 'P' was not declared in this scope
   16 |     if (vec.at(i) > vec.at(i+1)) P += 1;
      |                                  ^
a.cc:19:11: error: 'P' was not declared in this scope
   19 |   cout << P << endl;
      |           ^
Language: C++

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

int main() {
  int N;
  cin >> N, S = 0;
  vector<int> vec(N + 1);
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  
  vec.at(N) = 0;
  sort(vec.begin(), vec.end());

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: 'S' was not declared in this scope
    6 |   cin >> N, S = 0;
      |             ^
a.cc:16:13: error: expected unqualified-id before '(' token
   16 |     if (vec.(i) > vec.(i+1)) P += 1;
      |             ^
a.cc:16:23: error: expected unqualified-id before '(' token
   16 |     if (vec.(i) > vec.(i+1)) P += 1;
      |                       ^
a.cc:16:30: error: 'P' was not declared in this scope
   16 |     if (vec.(i) > vec.(i+1)) P += 1;
      |                              ^
a.cc:19:11: error: 'P' was not declared in this scope
   19 |   cout << P << 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);
  }
  
  vector<int> Count;
  Count.push_back(A.at(0))
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < Count.size(); j++) {
      if (Count.at(j) != A.at(i)) {
        Count.push_back(A.at(i));
      }
    }
  }
  cout << Count.size() << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: expected ';' before 'for'
   14 |   Count.push_back(A.at(0))
      |                           ^
      |                           ;
   15 |   for (int i = 0; i < n; i++) {
      |   ~~~                      
a.cc:15:19: error: 'i' was not declared in this scope
   15 |   for (int i = 0; i < n; i++) {
      |                   ^
Language: C++

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

int main(){
  int N,n;
  cin >> N;
  vector<int>vec(N);
  vector<int>vec_2(0);
  vector<int>vec_count(0);
  int count,count_2,c;

  for (int i_1 = 0; i_1 < N; i_1 ++) cin >> vec.at(i_1);

  for (int i_2 = 0; i_2 < N; i_2 ++){
    n = vec.at(0);
    count_2 = 0;
    for (int j_2_1 = 0; j_2_1 < N; j_2_1 ++){
      if (n < vec.at(j_2_1)) {
        n = vec.at(j_2_1);
        vec_count.push_back(j_2_1);//見つけた時の添字の値をログ
        count ++;
        count_2 ++;
      }
    }

    vec_2.push_back(n);//広義単調減少の順に並び替えたvec
    if(count_2 != 0){
      c = vec_count.at(count-1);//ログの最後の値を知りたい
      vec.at(c) = 0;
    }
    else vec.at(0) = 0;
  }
  
  int count_3 = 1;
  int d = vec_2.at(0);
  for (int i_3 = 1; i_3 < N; i_3 ++){
    if (d > vec_2.at(i_3)) {
      count_3 ++;
      d = vec_2.at(i_3)
    }
  }

  cout << count_3 << endl;

  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:24: error: expected ';' before '}' token
   39 |       d = vec_2.at(i_3)
      |                        ^
      |                        ;
   40 |     }
      |     ~
Language: Java

import java.util.*;
import java.io.*;

public class B85 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());

        int d[] = new int[n];
        for(int i = 0; i < n; i++){
            d[i] = Integer.parseInt(sc.next());
        }

        int num[] = new int [101];
        for(int i = 0; i < n; i++){
            num[d[i]]++;
        }

        int cnt = 0;
        for (int i = 0; i < 101; i++) {
            if(num[i] > 0){
                cnt++;
            }
        }

        System.out.println(cnt);
    }
}

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

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int n;
  int *d;
  cin>>n;
  d=new int[n];
  int count[100];
  for(i=0;i<100;i++){
    count[i]=0;
  }
  for(int i=0;i<n;i++){
    count[d[i]]++;
  }
  int ans=0;
  for(i=0;i<100;i++){
    if(count[i]!=0)ans++;
  }
  cout <<ans;
  return 0;
}

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

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

int main() {
    //餅の枚数の指定
    int N = 0;
    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 i = 1;i < N;i++){
        if(vec.at(i) != vec.at(i - 0)){
            count++;
        }
    }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: missing template arguments before '(' token
   10 |     vector(int) vec(N);
      |           ^
a.cc:10:12: error: expected primary-expression before 'int'
   10 |     vector(int) vec(N);
      |            ^~~
a.cc:12:16: error: 'vec' was not declared in this scope
   12 |         cin >> vec.at(i);
      |                ^~~
a.cc:14:10: error: 'vec' was not declared in this scope
   14 |     sort(vec.begin(),vec.end());
      |          ^~~
Language: C

#include <stdio.h>

int main(void)
{
	int n;
	
	scanf("%d",&n);
	
	int d[200];
	
	for(int i=0;i<n;i++){
		scanf("%d",&(d[i]));
	}
	
	}
	for(int i=0;i<n;i++){
		for(int j=i+1;j<n;j++){
			if(d[i]==d[j]){
				d[j]=0;
			}
		}
	}
	
	int count=0;
	
	for(int i=0;i<n;i++){
		if(d[i]!=0){
			count++;
		}
	}
	
	printf("%d\n",count);
	
	return 0;
}

Compiler output:
main.c:16:9: error: expected identifier or '(' before 'for'
   16 |         for(int i=0;i<n;i++){
      |         ^~~
main.c:16:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   16 |         for(int i=0;i<n;i++){
      |                      ^
main.c:16:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   16 |         for(int i=0;i<n;i++){
      |                          ^~
main.c:26:9: error: expected identifier or '(' before 'for'
   26 |         for(int i=0;i<n;i++){
      |         ^~~
main.c:26:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   26 |         for(int i=0;i<n;i++){
      |                      ^
main.c:26:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   26 |         for(int i=0;i<n;i++){
      |                          ^~
main.c:32:16: error: expected declaration specifiers or '...' before string constant
   32 |         printf("%d\n",count);
      |                ^~~~~~
main.c:32:23: error: expected declaration specifiers or '...' before 'count'
   32 |         printf("%d\n",count);
      |                       ^~~~~
main.c:34:9: error: expected identifier or '(' before 'return'
   34 |         return 0;
      |         ^~~~~~
main.c:35:1: error: expected identifier or '(' before '}' token
   35 | }
      | ^
Language: Java

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


Compiler output:
Main.java:8: error: incompatible types: int cannot be converted to String
			set.add(sc.nextInt());
			                  ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

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

int main() {
  
  int N;
  cin >> N;
  vector<int> d(N);
  vector<int> order(N , 1);
  int count = 1;
  
  for (int i = 0; i < N ; i++)
  {
   cin >> d.at(i); 
  }
  
  int max = 1;
  for (int i = 0 ; i < N ; i++)
  {
    for (int j = 0 ; j < N ; j++) {
      if (d.at(i) > d.at(j)) {
       d.at(j) = d.at(i)
       if (j != 0) count++;
       break;
      }
    }
  }
  
  cout << count << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: expected ';' before 'if'
   22 |        d.at(j) = d.at(i)
      |                         ^
      |                         ;
   23 |        if (j != 0) count++;
      |        ~~
Language: C++

#include <bits/stdc++.h>

using namespace std;
using llong = long long;
using P = pair<llong, llong>;

#define BE(x) x.begin(), x.end()

const llong inf = llong(1e18)+7;
const llong mod = 1e9+7;

int main(){
	llong N;
	vector<llong> d;

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

	sort(BE(d));
	uniqe(BE(d));
	cout << d.size() << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: 'uniqe' was not declared in this scope
   22 |         uniqe(BE(d));
      |         ^~~~~
Language: C++

#include <bits/stdc++.h>
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
//#define int long long
typedef long long ll;
using namespace std;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;
const pair<int,int> fd[] = {make_pair(1,0),make_pair(-1,0),make_pair(0,1),make_pair(0,-1)}; 


signed main(){
  int n;cin>>n;set<int> s;
  rep(i,n){
    int a;cin>>a;
    s.insert(a);
  }
  cout << set.size() << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:14: error: missing template arguments before '.' token
   19 |   cout << set.size() << endl;
      |              ^
Language: C++

#include <bits/stdc++.h>
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
//#define int long long
typedef long long ll;
using namespace std;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;
const pair<int,int> fd[] = {make_pair(1,0),make_pair(-1,0),make_pair(0,1),make_pair(0,-1)}; 


signed main(){
  int n;cin>>n;set<int> set;
  rep(i,n){
    int a;cin>>a;
    s.insert(a);
  }
  cout << set.size() << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 's' was not declared in this scope
   17 |     s.insert(a);
      |     ^
Language: C++

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: 'i' was not declared in this scope
   16 |     if (prev != rads.at(i))
      |                         ^
a.cc:18:20: error: 'i' was not declared in this scope
   18 |     prev = rads.at(i);
      |                    ^
Language: C++

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

int main(){
  int cnt = 1;
  int N;
  cin >> N;
  vector <int> rads(N);
  for (int i = 0; i < N; i++){
    cin >> rads.at(i);
  }
  
  sort(rads);
  int prev = rads.at(0);
  for (int j = 1; j < N; j++){
    if (prev != rads.at(i))
      cnt++;
    prev = rads.at(i);
  }
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: no matching function for call to 'sort(std::vector<int>&)'
   13 |   sort(rads);
      |   ~~~~^~~~~~
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:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 1 provided
a.cc:16:25: error: 'i' was not declared in this scope
   16 |     if (prev != rads.at(i))
      |                         ^
a.cc:18:20: error: 'i' was not declared in this scope
   18 |     prev = rads.at(i);
      |                    ^
Language: C++

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

int main(){
    int n,counter=1;
    cin >> n;
    vector<int> d(n);
    for(int i=0;i<n;i++) cin >> d.at(i);

    sort(d.begin(),d.end(),greater<int>());
    for(int i=0;i<n;i++){
        if(i == 0 || d.at(i) == d.at(i-1)) continue;
        counter++;
    }
    cout << counter << endl;
}


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

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

int main() {
  int N;
  cin >>N;
  vector mochi<int>(N);
  for (int i=0;i<N;i++){
    int answer=
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected initializer before '<' token
    7 |   vector mochi<int>(N);
      |               ^
a.cc:10:1: error: expected primary-expression before '}' token
   10 | }
      | ^
a.cc:10:2: error: expected '}' at end of input
   10 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostrem>
#include <algorithm>
#include <vector>
using namespace std;
int main(){
int N;
  int cnt=0;
  int elm=0
  cin >> N;
vector<int> d[N-1];
  for (int i=0;i<N;i++){
  cin d[i];
  }
  sort(d,d.begin(),d.end());
  for (int i=0;i<N;i++){
  if (d[i] > elm){
    cnt++;
    elm=d[i];
  }     
  }
  cout << cnt;
}
  

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

#include<iostream>

int main()
{
    int n;
    std::cin >> n;

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

    std::sort(d, d+n);
    int count = 0;
    int tmp = 0;
    count++;
    for(int i = 1; i < n; i++) {
        if(d[i-1] != d[i]) count++;
    }

    std::cout << count << std::endl;
    return 0;
}

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

#include <bits/stdc++.h>

using namespace std;


int main(){
  int n;
  cin>>n;
  int d[n];
  int kekka[n];
  for(int i=0;i<n;i++){
    cin>>d[i];}
  
  for(int j=0;j<n;j++){
    kekka.insert(d[j]);}
  cout<<kekka.size()<<endl;
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: request for member 'insert' in 'kekka', which is of non-class type 'int [n]'
   15 |     kekka.insert(d[j]);}
      |           ^~~~~~
a.cc:16:15: error: request for member 'size' in 'kekka', which is of non-class type 'int [n]'
   16 |   cout<<kekka.size()<<endl;
      |               ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;


int main(){
  int n;
  cin>>n;
  int d[n];
  int kekka[n];
  for(int i=0;i<n;i++){
    cin>>d[i];}
  
  for(int j=0;j<n;j++){
    kekka.insert(d[i]);}
  cout<<kekka.size()<<endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: request for member 'insert' in 'kekka', which is of non-class type 'int [n]'
   15 |     kekka.insert(d[i]);}
      |           ^~~~~~
a.cc:15:20: error: 'i' was not declared in this scope
   15 |     kekka.insert(d[i]);}
      |                    ^
a.cc:16:15: error: request for member 'size' in 'kekka', which is of non-class type 'int [n]'
   16 |   cout<<kekka.size()<<endl;
      |               ^~~~
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: two consecutive '[' shall only introduce an attribute before '[' token
   18 |     if(num[d[[j]]){
      |             ^
a.cc:18:13: error: expected ']' before '[' token
   18 |     if(num[d[[j]]){
      |             ^
      |             ]
a.cc:18:13: error: two consecutive '[' shall only introduce an attribute before '[' token
a.cc:18:13: error: expected ')' before '[' token
   18 |     if(num[d[[j]]){
      |       ~     ^
      |             )
Language: C

#include<stdio.h>

int main(){
  int N;
  scanf("%d",&N);
  
  int i,j,k,A[N];
 for(i=0i<N;i++)
   scanf("%d",&A[i]);
  
  for (i=0; i<N; ++i) {
    for (j=i+1; j<N; ++j) {
      if (A[i] > A[j]) {
        k =  A[i];
        A[i] = A[j];
        A[j] = k;
      }
    }
  }

  int ans=1;
  
  for(i=1;i<N;i++){
    if(A[i] != A[i-1])
      ans++;
  }
  printf("%d\n",ans);
  return 0;}
  

Compiler output:
main.c: In function 'main':
main.c:8:10: error: invalid operands to binary < (have 'complex int' and 'int')
    8 |  for(i=0i<N;i++)
      |          ^
main.c:8:16: error: expected ';' before ')' token
    8 |  for(i=0i<N;i++)
      |                ^
      |                ;
Language: C++

#include <iostream>
int main(){
 	int b[101]={},a,n,v=0;
 	std::cin>>n;
	while(n-->0){std::cin>>a;v+=max(1-b[a]++, 0);}
	std::cout <<v<<'\n';
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:37: error: 'max' was not declared in this scope; did you mean 'std::max'?
    5 |         while(n-->0){std::cin>>a;v+=max(1-b[a]++, 0);}
      |                                     ^~~
      |                                     std::max
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Language: C

#include<stdio.h>

int main(){
  int N, d[100], a, count = 0;
  
  scanf("%d", &N);
  for (int i = 0; i < N; i++){
    scanf("%d", a);
    for (int j = i - 1; j >= 0; j--){
      if(a < d[j]){
        d[j + 1] = d[j];
        if(j == 0){
          d[0] = a;
        }
      } else {
        d[j + 1] = a;
      }
    }
  }
  
  r = d[0];
  for (int i = 1; i < N; i++){
    if(r == d[i]){
      r = d[i];
    } else {
      count++;
    }
  }
  
  printf("%d\n");
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:3: error: 'r' undeclared (first use in this function)
   21 |   r = d[0];
      |   ^
main.c:21:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main(){
    int N;
    int d[110];
    cin>>N;
    for(int i=0;i<N;++i)cin>>d[i];
    sort(d,d+N,greater<int>());
    int counter=1;
    if(N==1){
        
    }
    else{
        for(int i=1;i<N;++i){
            if(d[i]!=d[i-1])counter+=1;
        }
        
    };
    cout<< counter <<endl;
    
}


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

#include<iostream>
#include<set>
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);
    set<int> values;
    for (int i = 0; i < n; ++i) {
        values.insert(a[i]);
    }
    cout << values.size() << endl;
    return 0;
}



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

#include<algorithm>
#include<iostream>
#include<functional>
using namespace std;
int main(){
  int num[200];
  int n,count,ans=0;
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>num[i];
  }
  sort(num,num+n);
  reverse(num,num+n)
  for(int j=0;j<n;j++){
    if(ans!=num[j]){
      count++;
    }
    ans=num[j];
  }
  cout<<count<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: expected ';' before 'for'
   13 |   reverse(num,num+n)
      |                     ^
      |                     ;
   14 |   for(int j=0;j<n;j++){
      |   ~~~                
a.cc:14:15: error: 'j' was not declared in this scope
   14 |   for(int j=0;j<n;j++){
      |               ^