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

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

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

    set<int> values; 
    for (int i = 0; i < N; ++i) {
        values.insert(d[i]); 
    }

  
    cout << values.size() << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: storage size of 'd' isn't known
    7 |     int d[];
      |         ^
Language: C

#include <bits/stdc++.h>
using namespace std;
int main(){
    //write code  here
    int N;
    cin >> N;
//    vector<string>S(N);
    string S;
    vector<string>_S;
    int num=1;
    for (int i = 0; i < N; ++i) {
        cin >> S;
        if (i==0) _S.emplace_back(S);
        else{
            bool a = true;
            for (int j = 0; j <_S.size(); ++j) {
                if(S == _S.at(j)){
                    a = false;
                    break;
                }
            }
            if (a) _S.push_back(S);
        }
    }

    cout << _S.size() << endl;



    return 0;
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;
	public static void main(String[] args) {
        Scanner s =new Scanner(System.in);
        int num = s.nextInt();
        String[] list = new String[num];
        for(int i =0;i < num;i++){
            list[i] = s.next();
        }
        int result = 1;
        for(int i = 1;i < num;i++){
            int judge = 1;
            for(int j = 0;j < i;j++){
                if(list[i].equals(list[j])){
                    judge = 0;
                }
            }
            if(judge == 1){
                result++;
            }
        }
        System.out.print(result);
    }

Compiler output:
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) {
	              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C

N = input()
N = int(N)
k = []
x = []
for i in range(0, N):
    a = input()
    k.append(a)
for i in k:
    if i not in x:
        x.append(i)
print (len(x))

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | N = input()
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int]
main.c:1:5: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
    1 | N = input()
      |     ^~~~~
main.c:1:5: error: initializer element is not constant
main.c:2:1: error: expected ',' or ';' before 'N'
    2 | N = int(N)
      | ^
Language: C

#include<stdio.h>
#include<string.h>
#include<time.h>

int main(){
  
  int n;
  int flag = 0;
  int count = 0;
  scanf("%d",&n);

  register char s[n][11];
  register char ans[n][11];

  for(int i=0; i<n; i++){
    scanf("%s",s[i]);
    for(int j=0; j<=count; j++){
      if(strcmp(s[i],ans[j]) == 0){
        flag = 1;
        break;
      }else{
        /*何もしない*/
      }
    }
    if(flag == 0){
      strcpy(ans[count] , s[i]);
    count ++;
    }
    flag = 0;
    
  }

  if(count == 0){
    printf("1");
  }else{
    printf("%d",count);
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:5: error: address of register variable 's' requested
   16 |     scanf("%s",s[i]);
      |     ^~~~~
main.c:18:7: error: address of register variable 's' requested
   18 |       if(strcmp(s[i],ans[j]) == 0){
      |       ^~
main.c:18:7: error: address of register variable 'ans' requested
main.c:26:7: error: address of register variable 'ans' requested
   26 |       strcpy(ans[count] , s[i]);
      |       ^~~~~~
main.c:26:7: error: address of register variable 's' requested
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
    int N;
    cin>>N;
    vector<char> vec(N)
    for(int i=0;i<N;i++){
        cin>>vec.at(i)
    }
    sort(vec.begin(), vec.end());
    vec.erase(unique(vec.begin(), vec.end()), vec.end());
    array_size = GET_ARRAY_SIZE(vec);
    for (int j = 0; j < array_size; ++j) {
        cout << vec[j] <<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected ',' or ';' before 'for'
    7 |     for(int i=0;i<N;i++){
      |     ^~~
a.cc:7:17: error: 'i' was not declared in this scope
    7 |     for(int i=0;i<N;i++){
      |                 ^
a.cc:12:5: error: 'array_size' was not declared in this scope
   12 |     array_size = GET_ARRAY_SIZE(vec);
      |     ^~~~~~~~~~
a.cc:12:18: error: 'GET_ARRAY_SIZE' was not declared in this scope
   12 |     array_size = GET_ARRAY_SIZE(vec);
      |                  ^~~~~~~~~~~~~~
Language: C

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

const int INF = 1001001001;
const int mod = 1000000007;

ll pow(ll base, ll order) {
	ll ans = 1;
	rep(i,order - 1) ans *= base;
	return ans;
}

int gcd(int a, int b) {
	if (a < b) {
		int c = a;
		a = b;
		b = c;
	}
	if (b == 0) return a;
	return gcd (b, a % b);
}

ll sum(ll x) { // sum of subsequent numbers from 0 to x
	return x*(x + 1)/2;
}

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

	vector<string> ordered(n);
	queue<string> que;
	rep(i,n) {
		string s;
		cin >> ordered.at(i);
	}
	sort(ordered.begin(), ordered.end());
	//rep(i,n) cout << ordered.at(i) << endl;
	rep(i,n) que.push(ordered.at(i));

	int kind = 0;
	while (!que.empty()) {
		string ref;
		ref = que.front(); que.pop();
		kind++;
		int current_size = que.size();
		rep(i,current_size) {
			string current = que.front();
			if (ref == current) que.pop();
			else break;
		}
	}
	cout << kind << endl;
}


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

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

struct wordlist{
	char word[10];
	struct wordlist *right;
	struct wordlist *left;
};

struct wordlist* add(char *word,struct wordlist *root){
	if(root==NULL){
		root=(struct wordlist*)malloc(sizeof(struct wordlist));
		strcpy(root->word,word);
		root->right=NULL;
		root->left=NULL;
	}else if(strcmp(root->word,word)>0){
		root->left=add(word,root->left);
	}else if(strcmp(root->word,word)<0){
		root->right=add(word,root->right);
	}else{
		root->num++;
	}
	return root;
}

int search(struct wordlist*root,char *word){
	if(root==NULL){
		return 1;
	}else if(strcmp(root->word,word)==0){
		return 0;
	}else if(strcmp(root->word,word)>0){
		print(root->left,word);
	}else if(strcmp(root->word,word)<0){
		print(root->right,word);
	}
}

int main(void){
	struct wordlist *root=NULL;
	int n,count=0;
	scanf("%d",&n);
	char s[n][10];
	for(int i=0;i<n;i++){
		scanf("%s",s[i]);
		add(s[i],root);
		count+=search(s[i],)
	}
	printf("%d",count);
}

Compiler output:
main.c: In function 'add':
main.c:23:21: error: 'struct wordlist' has no member named 'num'
   23 |                 root->num++;
      |                     ^~
main.c: In function 'search':
main.c:34:17: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   34 |                 print(root->left,word);
      |                 ^~~~~
      |                 printf
main.c: In function 'main':
main.c:48:36: error: expected expression before ')' token
   48 |                 count+=search(s[i],)
      |                                    ^
main.c:48:32: error: passing argument 1 of 'search' from incompatible pointer type [-Wincompatible-pointer-types]
   48 |                 count+=search(s[i],)
      |                               ~^~~
      |                                |
      |                                char *
main.c:28:28: note: expected 'struct wordlist *' but argument is of type 'char *'
   28 | int search(struct wordlist*root,char *word){
      |            ~~~~~~~~~~~~~~~~^~~~
Language: C++

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

int main() {

  int n;
  int count = 0;
  char moji[2*10*10*10*10*10][10];

  cin >> n;

  for (int j = 0; j < n; j++) {
    cin >> moji[j];
    for(int k = 0; k < j; k++){
    	if(moji[k] =! moji[j]){
        	count++;
        }
    }
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: error: incompatible types in assignment of 'bool' to 'char [10]'
   15 |         if(moji[k] =! moji[j]){
      |            ~~~~~~~~^~~~~~~~~~
Language: C++

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

int main() {
    int N;
    string d[];
    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]]++;  // d[i] が 1 個増える
    }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: array size missing in 'd'
    7 |     string d[];
      |            ^
a.cc:13:12: error: no match for 'operator[]' (operand types are 'int [110]' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   13 |         num[d[i]]++;  // d[i] が 1 個増える
      |            ^
Language: C

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

int main(){
    int n;
    cin >> n;
    vector<string> a(n);
    for(int i=0; i<n; i++){
        cin >> a[i];
    }
    sort(a.begin(), a.end());
    auto cnt = unique(a.begin(), a.end());
    a.erase(cnt, a.end());

    
    cout << a.size() << endl;
}

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

#include <bits/stdc++.h>

using namespace std;

int main(){
  int N;
  cin >> N;
  vector<string> S;
  int count = 0;
  string tmp;
  int i=0;
  int j=0;
  STEP:
  for(i=0;i<N;i++){
    cin >> tmp;
    for(j=0;j<count;j++){
      if(tmp==S.at(j)){
        goto STEP;
      }
    }
    S.push_back(tmp);
    count++;
  }
  cout << count << endl;
}

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

#include<string.h>
#include<stdio.h>
int main(){
  long int n,cnt=0;
  char str[200000][10];
  scanf("%ld",&n);
  for(int i=0;i<n;i++){
    scanf("%s",str[i]);
  }
  for(int i=0;i<n;i++){
    for(int j=i-1;j>=0;j--){
      if(strcmp(&str[i],&str[j])==0){
        &str[i]='\0';
      }
    }
  }
  for(int i=0;i<n;i++){
    if(&str[i]!='\0')
      cnt++;
  }
  printf("%ld",cnt);
}




Compiler output:
main.c: In function 'main':
main.c:12:17: error: passing argument 1 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
   12 |       if(strcmp(&str[i],&str[j])==0){
      |                 ^~~~~~~
      |                 |
      |                 char (*)[10]
In file included from main.c:1:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char (*)[10]'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:12:25: error: passing argument 2 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
   12 |       if(strcmp(&str[i],&str[j])==0){
      |                         ^~~~~~~
      |                         |
      |                         char (*)[10]
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char (*)[10]'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:13:16: error: lvalue required as left operand of assignment
   13 |         &str[i]='\0';
      |                ^
main.c:18:15: warning: comparison between pointer and zero character constant [-Wpointer-compare]
   18 |     if(&str[i]!='\0')
      |               ^~
main.c:18:8: note: did you mean to dereference the pointer?
   18 |     if(&str[i]!='\0')
      |        ^
Language: C++

int main(){
    int n, s;
    cin >> n;
    string a[n];
    for(int i = 0; i < n; i++)cin >> a[i];
    for(int i = 0; i < n; i++){
        for(int j = 0; j < n; j++){
            if(a[i] == a[j]){
                s += 1;
            }
        }
    }
    int d = ((sizeof(a) / sizeof(*a)) - (s / n)) + 1;
    cout << d << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> n;
      |     ^~~
a.cc:4:5: error: 'string' was not declared in this scope
    4 |     string a[n];
      |     ^~~~~~
a.cc:5:38: error: 'a' was not declared in this scope
    5 |     for(int i = 0; i < n; i++)cin >> a[i];
      |                                      ^
a.cc:8:16: error: 'a' was not declared in this scope
    8 |             if(a[i] == a[j]){
      |                ^
a.cc:13:22: error: 'a' was not declared in this scope
   13 |     int d = ((sizeof(a) / sizeof(*a)) - (s / n)) + 1;
      |                      ^
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout << d << endl;
      |     ^~~~
a.cc:14:18: error: 'endl' was not declared in this scope
   14 |     cout << d << endl;
      |                  ^~~~
Language: C

#include<stdio.h>
#include<string.h>

struct wordlist{
	char word[10];
	struct wordlist *right;
	struct wordlist *left;
};

struct wordlist* add(char *word,struct wordlist *root){
	if(root==NULL){
		root=(struct wordlist*)malloc(sizeof(struct wordlist));
		strcpy(root->word,word);
		root->right=NULL;
		root->left=NULL;
	}else if(strcmp(root->word,word)>0){
		root->left=add(word,root->left);
	}else if(strcmp(root->word,word)<0){
		root->right=add(word,root->right);
	}else{
		root->num++;
	}
	return root;
}

int search(struct wordlist*root,char *word){
	if(root==NULL){
		return 1;
	}else if(strcmp(root->word,word)==0){
		return 0;
	}else if(strcmp(root->word,word)>0){
		print(root->left,word,);
	}else if(strcmp(root->word,word)<0){
		print(root->right,word);
	}
}

int main(void){
	int n,count=0;
	scanf("%d",&n);
	char s[n][10];
	for(int i=0;i<n;i++){
		scanf("%s",s[i]);
		add(s[i],root);
		count+=search(s[i],)
	}
	printf("%d",count);
}

Compiler output:
main.c: In function 'add':
main.c:12:40: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
   12 |                 root=(struct wordlist*)malloc(sizeof(struct wordlist));
      |                                        ^~~~~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
    2 | #include<string.h>
  +++ |+#include <stdlib.h>
    3 | 
main.c:12:40: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
   12 |                 root=(struct wordlist*)malloc(sizeof(struct wordlist));
      |                                        ^~~~~~
main.c:12:40: note: include '<stdlib.h>' or provide a declaration of 'malloc'
main.c:21:21: error: 'struct wordlist' has no member named 'num'
   21 |                 root->num++;
      |                     ^~
main.c: In function 'search':
main.c:32:17: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   32 |                 print(root->left,word,);
      |                 ^~~~~
      |                 printf
main.c:32:39: error: expected expression before ')' token
   32 |                 print(root->left,word,);
      |                                       ^
main.c: In function 'main':
main.c:44:26: error: 'root' undeclared (first use in this function)
   44 |                 add(s[i],root);
      |                          ^~~~
main.c:44:26: note: each undeclared identifier is reported only once for each function it appears in
main.c:45:36: error: expected expression before ')' token
   45 |                 count+=search(s[i],)
      |                                    ^
main.c:45:32: error: passing argument 1 of 'search' from incompatible pointer type [-Wincompatible-pointer-types]
   45 |                 count+=search(s[i],)
      |                               ~^~~
      |                                |
      |                                char *
main.c:26:28: note: expected 'struct wordlist *' but argument is of type 'char *'
   26 | int search(struct wordlist*root,char *word){
      |            ~~~~~~~~~~~~~~~~^~~~
Language: C++

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

int ri() {
    int n;
    cin >> n;
    return n;
}


int main()
{
    int n,count=0;
    n = ri();
    vector<string> A(n);

    for (int i = 0; i < n; i++) cin >> A[i];
    B[0] = A[0];
    count = 1;
    bool b = false;

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

        for (int j = i+1; j < n; j++) {
            if (A[i] == A[j]) {
                A[j] = A[n - 1];
                j--;
                A[n - 1] = "\0";
                n = n - 1;
            }
        }
    }

    cout << n;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'B' was not declared in this scope
   19 |     B[0] = A[0];
      |     ^
Language: C

#include<iostream>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<math.h>
#include<bitset>
#include <numeric>
using namespace std;
using ll=long long;
using ld=long double;
using pint=pair<int,int>;
using pll=pair<ll,ll>;
#define LONG_INF 9223372036854775807
#define INF 1000000000LL
#define EPS 1e-10
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define dump(a) rep(d,a.size()){cout<<a[d];if(d!=a.size()-1)cout<<" ";else cout<<endl;}
#define all(v) v.begin(),v.end()
#define pb push_back

#define MAX_N 200000
int dp[MAX_N];


int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    map<string,int> dp{};
    int N;
    cin >> N;
    string s;
    rep(i, N){
        cin >> s;
        if(dp[s]>=0) dp[s]++;   
    }
    
    int ret = 0;
    for(auto it = dp.cbegin(); it != dp.cend(); ++it ) ret ++;
    cout << ret << endl;

    return 0;
}

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

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

int main(){
    int n, i, same=0;;
    cin >> n;
    string str[n];

    for(i=0;i<n;i++){
        cin >> str[i];
    }

    sort(str, str+n);

    for(i=0;i<n-1;i++){
        if(str[i] == str[i+1]){
            same++;
        }
    }

    cout << n-same << endl;
    return 0;
}

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

#include<string.h>
#include<stdio.h>
int main(){
  long int n,cnt=0;
  char *str[200000][10];
  scanf("%ld",&n);
  for(int i=0;i<n;i++){
    scanf("%s",str[i]);
  }
  for(int i=0;i<n;i++){
    for(int j=i-1;j>=0;j--){
      if(strcmp(&str[i],&str[j])==0){
        &str[i]='\0';
      }
    }
  }
  for(int i=0;i<n;i++){
    if(&str[i]!='\0')
      cnt++;
  }
  printf("%ld",cnt);
}



Compiler output:
main.c: In function 'main':
main.c:12:17: error: passing argument 1 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
   12 |       if(strcmp(&str[i],&str[j])==0){
      |                 ^~~~~~~
      |                 |
      |                 char * (*)[10]
In file included from main.c:1:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char * (*)[10]'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:12:25: error: passing argument 2 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
   12 |       if(strcmp(&str[i],&str[j])==0){
      |                         ^~~~~~~
      |                         |
      |                         char * (*)[10]
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char * (*)[10]'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:13:16: error: lvalue required as left operand of assignment
   13 |         &str[i]='\0';
      |                ^
main.c:18:15: warning: comparison between pointer and zero character constant [-Wpointer-compare]
   18 |     if(&str[i]!='\0')
      |               ^~
main.c:18:8: note: did you mean to dereference the pointer?
   18 |     if(&str[i]!='\0')
      |        ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#define F(i,a,n) for(int i=a; i<n; i++)

int main(){
  int n;
  scanf("%d",&n);
  char s[n][20];
  int count=0;
  F(i,0,n){
    scanf("%s",s[i]);
    for(int j=i-1,j>=0,j--){
      if(strcmp(s[i],s[j])==0){
        count++;
        break;
      }
    }
  }
  printf("%d\n",n-count);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before '>=' token
   14 |     for(int j=i-1,j>=0,j--){
      |                    ^~
main.c:20:3: error: expected expression before '}' token
   20 |   }
      |   ^
main.c:20:3: error: expected expression before '}' token
main.c:20:3: error: expected expression before '}' token
Language: C

#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cfloat>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <string.h>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define rep(i,n) for(int i = 0;i < n; i++)
#define REP(i,n) for(int i = 1;i <= n; i++)
// ----GCC ONLY---- //
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// ----        ---- //
#define ll long long
#define PB push_back
#define MOD 10000007
#define PI 3.14159265359

using namespace std;

int main(){

    int n;
    vector<string> s{2000000};
    cin >> n;
    rep(i,n) cin >> s[i];

    int count = 0;

    sort(s.begin(),s.begin()+n);

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

        if(s.at(i) == s.at(i + 1)){
            count += 0;
        }else{
            count++;
        }
    }
    cout << count <<"\n";
}


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

#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cfloat>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <string.h>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define rep(i,n) for(int i = 0;i < n; i++)
#define REP(i,n) for(int i = 1;i <= n; i++)
// ----GCC ONLY---- //
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// ----        ---- //
#define ll long long
#define PB push_back
#define MOD 10000007
#define PI 3.14159265359

using namespace std;

int main(){

    int n;
    vector<string> s{2000000000};
    cin >> n;
    rep(i,n) cin >> s[i];

    int count = 0;

    sort(s.begin(),s.begin()+n);

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

        if(s.at(i) == s.at(i + 1)){
            count += 0;
        }else{
            count++;
        }
    }
    cout << count <<"\n";
}


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

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

int main() {
  int N;
  cin >> N;
  
  //Siの入力
  vector<string> S(N);
  for (int i = 0; i < N; i++) {
    cin >> S.at(i);
  }
    
  //for文で各Siの個数を数える
  int A; //sum(Siの個数-1)
  A = 0;
  for (int i = 0; i < N; i++) {
    int Bi;
    Bi = 0;
    for (int j = 0; j < N; j++) {
      if (S.at(j) == S.at (i) && j >= i) {
        Bi += 1;
      }
      else if (S.at(j) == S.at(i) && j < i) {
        break;
      }
    }
    if (Bi == 0) {
      A += 0;
    }
    else {
      A += Bi - 1;
  }
  
  //N-sum(Siの個数-1)が種類の数
  cout << N - A << endl;
}


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

#include<stdio.h>
#include<string.h>

struct pb
{
  char a[10];
};
int main()
{
  int n,i,j,t,c=0;
  scanf("%d",&n);
  struct pb x[n];
  for(i=0;i<n;i++) scanf("%s",&x[i].a);
  for(i=0;i<n;i++)
  {
    for(j=i+1;j<n;j++)
    {
      if(x[i].a>x[j].a)
      {
        t=x[i].a;
        x[i].a=x[j].a;
        x[j].a=t;
      }
    }
  }
  for(i=0;i<n;i++)
  {
    if(x[i].a!=x[i+1].a) c++;
  }
  printf("%d",c);
  return 0;
}
}

Compiler output:
main.c: In function 'main':
main.c:20:10: error: assignment to 'int' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   20 |         t=x[i].a;
      |          ^
main.c:21:15: error: assignment to expression with array type
   21 |         x[i].a=x[j].a;
      |               ^
main.c:22:15: error: assignment to expression with array type
   22 |         x[j].a=t;
      |               ^
main.c: At top level:
main.c:33:1: error: expected identifier or '(' before '}' token
   33 | }
      | ^
Language: C

    #include<iostream>
    #include<vector>
    #include<string>
    using namespace std;
    int main() {
    	int N;
    	int c=0;
    	cin >> N;
    	std::string str[N];
    	
      for (int i=0;i<N;i++){
      	cin >> str[i];
        for (int j=0;j<i;j++){
        	if(str[j]==str[i]){
            	c++;
            }
        }
      }
      cout << N-c << endl;
    }

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

#include <iostream>
#include <iterator>
#include <algorithm>
#include <vector>
#include <string>
#include <cstdio>
using namespace std;
 
int main() {
  int N;
  string s;
  vector<string> ss;
  vector<string>::iterator it;
  vector<int>::difference_type index;
  
  cin >> N;
  cin >> s;
  ss.push_back(s); 
  for(int i = 1; i < N; ++i) {
    scanf_s("%s", &s, 10);
    it = find(ss.begin(),ss.end(),s);
    if(distance(ss.begin(), it) == ss.size()) {
      ss.push_back(s); 
    }
  }
  cout << ss.size() << "\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   20 |     scanf_s("%s", &s, 10);
      |     ^~~~~~~
      |     scanf
Language: C++

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

int main(){

  int num;
  cin >> num;
  int count=0;

  vector<string> name(num);

  for(int i=0;i<num;i++){
    string nowName;
    cin >> nowName;
    for(int j=0;j<num;j++){
      if(name[j]==nowName)break;
      if(j==num-1){
        name.push_back(nowName);
        count++;
      }
    }
  }

  cout << count << endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:24:25: error: expected '}' at end of input
   24 |   cout << count << 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<string> s(n);
	  for(int i=0;i<n;i++){
	    cin>>s.at(i);
	  }
  int ans=0;
  for(int i=0;i<n;i++){
    for(int m=0;m<n;m++){
    if(i!=m){
    if(s.at(i)==s.at(m)){
      ans++;
    }
    }
    }
    cout<<ans/2<<endl;
    
    
  

}


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

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  map<string, int> score;
  for(int i=0;i<N;i++){
    string s;
    cin>>s;
    score[s]=1;
  }

  N=score.size()
  cout<<N<<endl;
  
}








Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected ';' before 'cout'
   12 |   N=score.size()
      |                 ^
      |                 ;
   13 |   cout<<N<<endl;
      |   ~~~~
Language: C++

#include<iostream>
#include <string>
#include<algorithm>
using namespace std; // std::map~, std::cout~とかを省略する為

int main() {
	int N;
	
	scanf_s("%d", &N);
	string a[200010];
	string b[200010];
	int u = 0;
	for (int i = 0; i < N; i++) {
		cin >> a[i];
		for (int j = 0; j <= i; j++)
			if (b[j] == a[i])
				
			
				u++;
				
			

	}

	
	cout << u;
		
	

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    9 |         scanf_s("%d", &N);
      |         ^~~~~~~
      |         scanf
Language: C

#include<bits/stdc++.h>
using namespace std;
int main(){
int n,count=0;
  cin>>n;
  string s,s1="#";
   while(n--){
    cin>>s;
    if(s!=s1)
    count++;
    s1=s;
  }
  cout<<count<<"\n";
  
  return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
int main(){
 int n;
  cin>>n;
  	vector<string> s(N);
	  for(int i=0;i<N;i++){
	    cin>>s.at(i);
	  }
  int ans=0;
  for(int i=0;i<N;i++){
    for(int m=0;m<N;m++){
    if(i!=m){
    if(s.at(i)=s.at(m)){
      ans++;
    }
    }
    }
    cout<<ans/2<<endl;
    
    
  

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:26: error: 'N' was not declared in this scope
    6 |         vector<string> s(N);
      |                          ^
a.cc:14:15: error: could not convert '(& s.std::vector<std::__cxx11::basic_string<char> >::at(((std::vector<std::__cxx11::basic_string<char> >::size_type)i)))->std::__cxx11::basic_string<char>::operator=((*(const std::__cxx11::basic_string<char>*)(& s.std::vector<std::__cxx11::basic_string<char> >::at(((std::vector<std::__cxx11::basic_string<char> >::size_type)m)))))' from 'std::__cxx11::basic_string<char>' to 'bool'
   14 |     if(s.at(i)=s.at(m)){
      |        ~~~~~~~^~~~~~~~
      |               |
      |               std::__cxx11::basic_string<char>
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C

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

int main() {
  ll n,ans=1;
  string s;
  cin >> n;
  vector<string> sc;
  
  rep(i,n) {
    cin >> s;
    sc.push_back(s);
  }
  sort(sc.begin(),sc.end());
  rep(i,n-1) {
    if ((sc[i])!=(sc[i+1])) ans++;
  }

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

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

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

struct list{
  char name[15];
  struct list *next;
};

char a[200007][14];
struct list *data[256000];

int main(){
  int n;
  int i,r,j;
  int ans = 0;
  int sum = 0;
  int flag = 0;
  struct list *p,*t;

  scanf("%d", &n);

  for(i = 0;i <= 255999;i++) data[i] = NULL;

  for(i = 0;i < n;i++){
    scanf("%s", a[i]);
    flag = 0;
    sum = 0;
    r = strlen(a[i]);
    for(j = 0;j < r;j++){
      sum += a[i][j];

      if(j == 3) sum += a[i][j]*2;
    }

    sum = sum % 256000;

    t = data[sum];
    while(t != NULL){
      if(strcmp(t -> name,a[i]) == 0){
        flag = 1;
        break;
      }
    }

    if(flag == 1) continue;

    else if(flag == 0){
      p = talloc();
      strcpy(p -> name,a[i]);
      p -> next = data[sum];
      data[sum] = p;
      ans++;
    }
  }

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

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:50:11: error: implicit declaration of function 'talloc'; did you mean 'valloc'? [-Wimplicit-function-declaration]
   50 |       p = talloc();
      |           ^~~~~~
      |           valloc
main.c:50:9: error: assignment to 'struct list *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   50 |       p = talloc();
      |         ^
Language: C

#include <bits/stdc++.h>
using namespace std;
int main() {
 int N;
  cin>>N;
   vector<string> vec(N);
   vector<string> lib;
  
  if (N==1) cout <<N;
 else{ 
   cin>>vec.at(0);
   lib.push_back(vec.at(0));
   for (int i = 1; i < N; i++){
     cin>>vec.at(i);
     bool AAA= false;
   for (int j = 0; j < lib.size(); j++){
     if(vec.at(i)==lib.at(j)){
       
       AAA=true;
       break;
     }
   }
     
     if(AAA) continue;
     else lib.push_back(vec.at(i));
   }
   cout <<lib.size();
          } 
}


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

#include<iostream>
#include <stdio.h>
#include <string.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)

using namespace std;
using ll = long long;

bool search(char* a,char* data_base[],int data_num){
    if(data_num == 0){return false;}
    rep(i,data_num){
        if(!strcmp(a,data_base[i])){
            return true;
        }
    }
    
    return false;
}

int main()
{
    // 整数の入力
    int a;
    cin >> a;
    char* data_base[10][a];
    // スペース区切りの整数の入力
    int data_cnt[10] = {0};
    
    char* c;
    int sum = 0;
    rep(i,a){
        cin >> c;
        int c_size = c.length();
        int d = c_size -1;
        if(!search(c,data_base[d],data_cnt[d])){
            data_base[d][data_cnt[d]] = c;
            data_cnt[d]+=1;
            sum+=1;
        }
    }

    cout << sum << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:24: error: request for member 'length' in 'c', which is of non-class type 'char*'
   35 |         int c_size = c.length();
      |                        ^~~~~~
Language: C++

#include <vector>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <functional>
#include <string>
#include <map>//map<int, int> x;
#include <numeric>
#define rep(i, n) for (int i = 0; i <= (int)(n); i++)
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))

using ll = long long;
using namespace std;
 int main(){
int n;
int count=0;
 cin>>n;
  string a;
vector<string> strlist(1000);
rep(i,n)cin>>strlist[i];

sort( strlist.begin(), strlist.end() );
strlist.erase(unique(strlist.begin(), strlist.end()), strlist.end());

//for(int i=0;i<strlist.size();i++)
cout << strlist.size()-1<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:2: error: 'cin' was not declared in this scope
   17 |  cin>>n;
      |  ^~~
a.cc:8:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    7 | #include <map>//map<int, int> x;
  +++ |+#include <iostream>
    8 | #include <numeric>
a.cc:26:1: error: 'cout' was not declared in this scope
   26 | cout << strlist.size()-1<<endl;
      | ^~~~
a.cc:26:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:26:27: error: 'endl' was not declared in this scope
   26 | cout << strlist.size()-1<<endl;
      |                           ^~~~
a.cc:8:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    7 | #include <map>//map<int, int> x;
  +++ |+#include <ostream>
    8 | #include <numeric>
Language: Java



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

 class Test {

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

}


Compiler output:
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Language: C

#include <bits/stdc++.h>

#define rep(i, n) for(int i=0; i < n; i++)
#define reps(i, n) for(int i=1; i <= n; i++)
#define INF 1e9
#define ALL(v) v.begin(), v.end()

using namespace std;
using ll=long long;
const double PI=3.14159265358979323846;



int main() {
    int n;
    cin >> n;
    string S[n];
    int ch;
    int a;
    a = 0;
    ch = 1;
    string aa[n];

    rep(i,n){
        cin >> S[i];
        rep(j,a){
            if(S[i] == aa[j]){
                ch = 0;
                break;
            }
        }
        if(ch == 1){
            aa[a] = S[i];
            a = a+1;
        }

    }

    cout << a;

    

}


/*
    int a[N][2];

    rep(i,N){
        rep(j,2){
            cin >> a[i][j];
        }
    }

    rep(i,N-1){
        for(int j=i+1;j<N;j++){
            int dlx = a[i][0] - a[j][1];
            int dly = a[j][0] - a[j][1];
            rep[]
        }
    }
*/

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 int N,a=0;
 cin >> N;
 vector<string> str(N+1);
 for(int i=0 ;i<N;i++){
 cin >> str.at(i);
 }
 a=N;
 for(int i=0;i<N;i++){
   for(int j=i+1;j<N;j++){
       if(str.at(i)==str.at(j)){
         a=a-1;
         i++;
       }
 }
 }
  cout << a << endl;
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

	    int N = sc.nextInt();
        List<String> list = new ArrayList<>();
      
      for(int i ;i < N; i++){
        string prize = sc.next();
        if(list.indexOf(prize) == -1){
          list.add(prize);
        }
      }
      
      System.out.println(list.length);
      
    }
}


Compiler output:
Main.java:14: error: cannot find symbol
        string prize = sc.next();
        ^
  symbol:   class string
  location: class Main
Main.java:20: error: cannot find symbol
      System.out.println(list.length);
                             ^
  symbol:   variable length
  location: variable list of type List<String>
2 errors
Language: C

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 int N,a=0;
 vector<string> str(N+1);
 cin >> N;
 for(int i=0 ;i<N;i++){
 cin >> str.at(i);
 }
 a=N;
 for(int i=0;i<N;i++){
   for(int j=i+1;j<N;j++){
       if(str.at(i)==str.at(j)){
         a=a-1;
         i++;
       }
 }
 }
  cout << a << endl;
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class testproject {
    public static void main(String[] args) {
        Scanner s =new Scanner(System.in);
        int num = s.nextInt();
        String[] list = new String[num];
        for(int i =0;i < num;i++){
            list[i] = s.next();
        }
        int result = 1;
        for(int i = 1;i < num;i++){
            int judge = 1;
            for(int j = 0;j < i;j++){
                if(list[i].equals(list[j])){
                    judge = 0;
                }
            }
            if(judge == 1){
                result++;
            }
        }
        System.out.print(result);
    }
}

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

#include <iostream>
#include <vector>
#include <cstdlib>
#include <cmath>
#include <string>

using namespace std;

int main(){
    int N;
    cin >> N;
    string S[N];
    string a;
    int v[S];
    int flag = 0;
    int cnt = 1;

    for(int i=0; i<N; i++){
        cin >> a;
        for(int j=0; j<cnt; j++){
            if(a == S[j]){
                flag = 1;
                break;
            }
        }
        if(flag == 0){
            S[cnt] = a;
            cnt++;
        }
        flag = 0;
    }

    cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long unsigned int' in a converted constant expression
   14 |     int v[S];
      |           ^
a.cc:14:11: error: could not convert 'S' from 'std::string [N]' {aka 'std::__cxx11::basic_string<char> [N]'} to 'long unsigned int'
   14 |     int v[S];
      |           ^
      |           |
      |           std::string [N] {aka std::__cxx11::basic_string<char> [N]}
a.cc:14:11: error: size of array 'v' has non-integral type 'std::string [N]' {aka 'std::__cxx11::basic_string<char> [N]'}
Language: C++

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

int main(){
  int N;
  int cnt=0;
  cin>>N;
  String S;
  for(int i=0;i<N;i++)cin>>S[i];
  for(int i=0;i<N;i++){
    for(int j=i+1;j<N;j++){
      S[j]==S[i];
      cnt +=1;
      continue;

    }
    cout<<cnt<<endl;
  }


}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'String' was not declared in this scope
    8 |   String S;
      |   ^~~~~~
a.cc:9:28: error: 'S' was not declared in this scope
    9 |   for(int i=0;i<N;i++)cin>>S[i];
      |                            ^
a.cc:12:7: error: 'S' was not declared in this scope
   12 |       S[j]==S[i];
      |       ^
Language: C++

#include <iosatrem>
#include <vector>

using namespace std;

int main(void)
{
  int n;
  vector<string> buf;
  
  cin >> n;
  if(n < 1 || n > 200000)
  {
    return -1;
  }
  
  while(n > 0)
  {
    string s;
    cin >> s;
    
    if(buf.empty())
    {
      buf.push_back(s);
    }
    else
    {
      bool isFind = false;
      for(auto itr = buf.begin(); itr != buf.end(); itr++)
      {
        if(*itr == s)
        {
          isFind = true;
          break;
        }
      }
      
      if(isFind != true)
      {
        buf.push_back(s);
      }
    }
    
    n--;
  }
  
  cout << buf.size() << endl;
  
  return 0;
}

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

package app;

import java.util.Map.Entry;
import java.util.*;

import org.w3c.dom.css.Counter;

public class Main {
//public class App {

    public static void main(final String[] args){
     //スキャン
     final Scanner s = new Scanner(System.in);
     final Map<Integer, String> map = new HashMap<Integer, String>();
     final int ugeuge= Integer.parseInt(s.next());
    
    for(int i=0;i < ugeuge ; i++){
        //Scanner hoge = new Scanner(System.in);
        final String tareget = s.next();

        if(map.containsValue(tareget)){
    
        }else{
            map.put(i, tareget);
        }
        
    }
            System.out.println(map.size());
       
    }
}





Compiler output:
main.c:1:1: error: unknown type name 'package'
    1 | package app;
      | ^~~~~~~
main.c:3:1: error: unknown type name 'import'
    3 | import java.util.Map.Entry;
      | ^~~~~~
main.c:3:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | import java.util.Map.Entry;
      |            ^
main.c:4:1: error: unknown type name 'import'
    4 | import java.util.*;
      | ^~~~~~
main.c:4:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    4 | import java.util.*;
      |            ^
main.c:6:1: error: unknown type name 'import'
    6 | import org.w3c.dom.css.Counter;
      | ^~~~~~
main.c:6:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    6 | import org.w3c.dom.css.Counter;
      |           ^
main.c:8:1: error: unknown type name 'public'
    8 | public class Main {
      | ^~~~~~
main.c:8:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    8 | public class Main {
      |              ^~~~
Language: C

#include<iostream>
#include<vector>
#include<string>
using namespace std;
int main() {
	int N;
	int c=0;
	cin >> N;
	std::vector<std::string>str;
	
  for (int i=0;i<N;i++){
  	cin >> str[i];
    for (int j=0;j<i;j++){
    	if(str[j]==str[i]){
        	c++;
        }
    }
  }
  cout << N-c << endl;
}

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

#include <stdio.h>
#include <string.h>

int main(void)
{
  int n;
  int i,j;
  char s[200000][10];
  int result=0;
  scanf("%d", &n);
  for(i=1;i<=n;i++){
    scanf("%s", s[i]);
  }
  for(i=1;i<=n;i++){
    for(j=1;j<n;j++){
      if(strcom(s[i],s[j])==0){
	result++;
	break;
      }
    }
  }
  result=n-result;
  printf("%d\n", result);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:16:10: error: implicit declaration of function 'strcom'; did you mean 'strtok'? [-Wimplicit-function-declaration]
   16 |       if(strcom(s[i],s[j])==0){
      |          ^~~~~~
      |          strtok
Language: Java

import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

	    int N = sc.nextInt();
        List<String> list = new ArrayList<>();
      
      for(int i ;i < N; i++){
        int prize = sc.next();
        if(list.indexOf(prize) == -1){
          list.add(prize);
        }
      }
      
      System.out.println(list.length);
      
    }
}


Compiler output:
Main.java:14: error: incompatible types: String cannot be converted to int
        int prize = sc.next();
                           ^
Main.java:16: error: incompatible types: int cannot be converted to String
          list.add(prize);
                   ^
Main.java:20: error: cannot find symbol
      System.out.println(list.length);
                             ^
  symbol:   variable length
  location: variable list of type List<String>
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
3 errors
Language: C++

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

int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);

	int n; cin >> n;
	set<string> s;
	string word;
	while(n){
		cin >> word;
		s.push(word);
		n--;
	}	
	cout << s.size();
	

}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   16 |                 s.push(word);
      |                   ^~~~