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

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

void main() {

    int N;
    int i, j;
    int n = 0;
    int m;
    int chk;
    int count;
    int flag;
    char *S;
    char buf[1000];

    fgets(buf, sizeof(buf), stdin);
    sscanf(buf, "%d\n", &N);
    count = N;
    int k[N];
    char *S = (char*)malloc(sizeof(char[10 + 1]) * 2 * pow(10, 5));
    for (i = 1; i <= N; i++) {
        fgets(buf, sizeof(buf), stdin);
        sscanf(buf, "%s\n", S);
        S++;
    }
    for (i = 1; i <= N; i++) {
        for (m = 0; m < n; m++) {
            flag = 0;
            if (k[m] == i) {
                flag = 1;
                break;
            } 
        }
        if (flag == 0) {
            for (j = N; j > i; j--){
                chk = strcmp((S+i), (S+j));
                if (0 == chk){
                    count--;
                    k[n] = j;
                    n++;
                }
            }
        }
    }
    printf ("%d", n+1);
    free(S);
    return;
}

Compiler output:
main.c: In function 'main':
main.c:21:11: error: redeclaration of 'S' with no linkage
   21 |     char *S = (char*)malloc(sizeof(char[10 + 1]) * 2 * pow(10, 5));
      |           ^
main.c:14:11: note: previous declaration of 'S' with type 'char *'
   14 |     char *S;
      |           ^
main.c:21:22: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
   21 |     char *S = (char*)malloc(sizeof(char[10 + 1]) * 2 * pow(10, 5));
      |                      ^~~~~~
main.c:4:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
    3 | #include <string.h>
  +++ |+#include <stdlib.h>
    4 | 
main.c:21:22: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
   21 |     char *S = (char*)malloc(sizeof(char[10 + 1]) * 2 * pow(10, 5));
      |                      ^~~~~~
main.c:21:22: note: include '<stdlib.h>' or provide a declaration of 'malloc'
main.c:47:5: error: implicit declaration of function 'free' [-Wimplicit-function-declaration]
   47 |     free(S);
      |     ^~~~
main.c:47:5: note: include '<stdlib.h>' or provide a declaration of 'free'
main.c:47:5: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch]
main.c:47:5: note: include '<stdlib.h>' or provide a declaration of 'free'
Language: C

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

int main() {
  int N;
  cin >> N;
  vector<string> S(N);
  rep(i, N){
    cin >> S.at(i);
  }
  int count, sum = 0;
  rep(i, N-1){
    count = 0;
    rep(k, N-i-1){
      if(S.at(i)==S.at(i+k+1)){
      count++;  
      break;  
      }
    }
  if(count == 0){
    sum++;
  }
  }
  cout << sum + 1 <<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 <iostream>
#include <string>
using namespace std;

int main()
{
	string a;
	string ch[200000][];
	int n, k = 0;
	int flag = 0;

	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a;
		for (int j = 0; j < k; j++)
		{
			if (ch[j] == a)
			{
				ch[j] = a;
				flag = 1;
			}
		}
		if (flag == 1)
		{
			flag = 0;
			continue;
		}
		ch[k] = a;
		k++;
	}

	cout << k;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: declaration of 'ch' as multidimensional array must have bounds for all dimensions except the first
    8 |         string ch[200000][];
      |                ^~
a.cc:18:29: error: 'ch' was not declared in this scope
   18 |                         if (ch[j] == a)
      |                             ^~
a.cc:29:17: error: 'ch' was not declared in this scope
   29 |                 ch[k] = a;
      |                 ^~
Language: C++

#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
	int N,sum;
	cin>>N;
	string S[N];
	vector<string> gott(N);
	for(int i=0;i<N;i++)cin>>gott.at(i));
	size_t n_count=count(gott.begin(),gott.end(),gott(i));
	cout<<n_count<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:44: error: expected ';' before ')' token
   10 |         for(int i=0;i<N;i++)cin>>gott.at(i));
      |                                            ^
      |                                            ;
a.cc:11:59: error: 'i' was not declared in this scope
   11 |         size_t n_count=count(gott.begin(),gott.end(),gott(i));
      |                                                           ^
a.cc:11:24: error: 'count' was not declared in this scope; did you mean 'n_count'?
   11 |         size_t n_count=count(gott.begin(),gott.end(),gott(i));
      |                        ^~~~~
      |                        n_count
Language: C++

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

int main() {
  int N;
  string K;
  cin>>N;
  vector<string> S(1);
  cin>>S.at(0);
  for(int i=1; i<N;i++){
    cin>>K;
    int CC=0;
    for(int j=0; j< S.size(); j++){
      if(K==S.at(j)){
        CC++;
        break;
      }
      if(CC==0)  S.push_back(K);
    }
    cout <<S.size();
   

}
        
    
  


    


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<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
	int N,sum;
	cin>>N;
	string S[N];
	vector<string> gott(N);
	for(int i=0;i<N;i++)cin>>gott.at(i));
	size_t n_count=count(gott.begin(),gott.end,gott(i));
	cout<<n_count<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:44: error: expected ';' before ')' token
   10 |         for(int i=0;i<N;i++)cin>>gott.at(i));
      |                                            ^
      |                                            ;
a.cc:11:57: error: 'i' was not declared in this scope
   11 |         size_t n_count=count(gott.begin(),gott.end,gott(i));
      |                                                         ^
a.cc:11:24: error: 'count' was not declared in this scope; did you mean 'n_count'?
   11 |         size_t n_count=count(gott.begin(),gott.end,gott(i));
      |                        ^~~~~
      |                        n_count
Language: C

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

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


Compiler output:
main.c: In function 'main':
main.c:20:11: error: 'j' undeclared (first use in this function)
   20 |     check[j] = s[i];
      |           ^
main.c:20:11: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main(){
    int n,i,j;
    int count=1;
    cin >> n;

    vector<string> kehin(n);
    vector<string> tmp(n);

    for(i=0; i<n; i++){
        cin >> kehin.at(i);
    }

    set<string> s(kehin.begin(),kehin.end());
   
    cout << set.size() << endl;
    return 0;
}

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

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

 
int main() {
  int N;
  cin >> N ;
  char S(N, "a");
  for(int i =0;i<N;i++){
  cin << S.at(i) << endl; 
  }
  int out=N;
  for(int i=0;i<N;i++){
  	for(int j=i+1;j<N;j++){
    if(S.at(i) == S.at(j)){
    out=out-1;
    break;
    }
    }
  }
  cout << out << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: expression list treated as compound expression in initializer [-fpermissive]
    9 |   char S(N, "a");
      |                ^
a.cc:9:16: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 |   char S(N, "a");
      |                ^
      |                |
      |                const char*
a.cc:11:12: error: request for member 'at' in 'S', which is of non-class type 'char'
   11 |   cin << S.at(i) << endl;
      |            ^~
a.cc:16:10: error: request for member 'at' in 'S', which is of non-class type 'char'
   16 |     if(S.at(i) == S.at(j)){
      |          ^~
a.cc:16:21: error: request for member 'at' in 'S', which is of non-class type 'char'
   16 |     if(S.at(i) == S.at(j)){
      |                     ^~
Language: C++

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

using namespace std;

int main()
{
	int N, i, j, count = 0;
	//string str;
	cin >> N;
	vector<string> S(N);
	vector<size_t> H(N);
	rep(i, N)
	{
		cin >> S[i];
		H[i] = S[i].length;
	}
	rep(i, N)
		if (H[i] != 0)
			for (j = i;j < N;++j)
			{
				if (H[i] == H[j] && S[i] == S[j])
				{
					++count;
					H[j] == 0;
				}
			}
	cout << count;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:29: error: cannot convert 'std::__cxx11::basic_string<char>::length' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type '__gnu_cxx::__alloc_traits<std::allocator<long unsigned int>, long unsigned int>::value_type' {aka 'long unsigned int'}
   16 |                 H[i] = S[i].length;
      |                             ^~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n,c=0;
  cin>>n;
  string arr[n];
  for(int i=0;i<n;i++){
  	cin.getline(arr[i]);
  }
  for(int i=0;i<n;i++){
  	for(int j=i+1;j<n;j++){
      if(arr[i]!=arr[j]) c++;
  }
  }
  cout<<c;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: no matching function for call to 'std::basic_istream<char>::getline(std::string&)'
    8 |         cin.getline(arr[i]);
      |         ~~~~~~~~~~~^~~~~~~~
In file included from /usr/include/c++/14/iostream:42,
                 from a.cc:1:
/usr/include/c++/14/istream:740:5: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::getline(char_type*, std::streamsize, char_type) [with _CharT = char; _Traits = std::char_traits<char>; char_type = char; std::streamsize = long int]'
  740 |     basic_istream<char>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:740:5: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/14/istream:520:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::getline(char_type*, std::streamsize) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; char_type = char; std::streamsize = long int]'
  520 |       getline(char_type* __s, streamsize __n)
      |       ^~~~~~~
/usr/include/c++/14/istream:520:7: note:   candidate expects 2 arguments, 1 provided
Language: C

a=int(input())
b=[]
for i in range(a):
    b+=input().split()
print(len(set(b)))

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

 #include <bits/stdc++.h>
#include <cstdlib>
#include <cmath>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
const ll INF=1e18 ;
inline void chmax(ll& a,ll b){a=max(a,b);}
inline void chmin(ll& a,ll b){a=min(a,b);}
int main() {
   string s;
   cin>>s ;
   int k= s.size() ;
   vector<ll> a(k) ;
   for(ll i=k-1;i>=0;i--){
     if(i==k-1)
     a[i]=s.at(i);
     else
     a[i]=(a[i+1]+s.at(i)*pow(10,k-1-i))%2019 ;  
   }
   vector<ll> b(2019) ;
   rep(i,2019) b[i]=0 ;
    
    rep(i,k){
    rep(j,2019) {
       if( a[i]==j )
       b[j] ++ ;
    }
}
  ll ans=0 ;
  rep(j,2019) 
  ans+= b[j]*(b[j]-1) /2 ;
   
   cout<<ans <<endl;
    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:20:41: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   20 |      a[i]=(a[i+1]+s.at(i)*pow(10,k-1-i))%2019 ;
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
      |                  |                       |
      |                  |                       int
      |                  __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

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

using namespace std;

int main()
{
	int N, i, j, count = 0;
	//string str;
	cin >> N;
	vector<string> S(N);
	vector<int> H(N);
	rep(i, N)
	{
		cin >> S[i];
		H[i] = S[i].length;
	}
	rep(i, N)
		if (H[i] != 0)
			for (j = i;j < N;++j)
			{
				if (H[i] == H[j] && S[i] == S[j])
				{
					++count;
					H[j] == 0;
				}
			}
	cout << count;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:29: error: cannot convert 'std::__cxx11::basic_string<char>::length' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   16 |                 H[i] = S[i].length;
      |                             ^~~~~~
Language: C++

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

int main() {
  int N;
  string K;
  cin>>N;
  vector<string> S(1);
  int count =1;
  cin>>S.at(0);
  for(int i=1; i<N;i++){
    cin>>K;
    int CC=0;
    for(int j=0; j<S.size(); j++){
      if(K==S.at(j)){
        CC++;
        break;
      }
      if(CC==0)  S.push_back(K);
    }
    cout <<S.size();
   

}
        
    
  


    


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

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

int main(){
  int n;
  cin>>n;
  vector<string> data(n);
  for(int i=0;i<n;i++){
    cin>>data.at(i);
  }
  int count=1;
  for(int x:data){
    if(!(data.at(0)==data.at(x))){
      count++;
      for(int j=1;j<=x-1;j++){
        if(data.at(x)==data.at(j)){
      count--;
          break;
        }
      }
   　}
  }
  cout<<count<<endl;
}

Compiler output:
a.cc:21:4: error: extended character 　 is not valid in an identifier
   21 |    　}
      |    ^
a.cc: In function 'int main()':
a.cc:12:13: error: cannot convert 'std::__cxx11::basic_string<char>' to 'int' in initialization
   12 |   for(int x:data){
      |             ^~~~
a.cc:21:4: error: '\U00003000' was not declared in this scope
   21 |    　}
      |    ^~
Language: C++

#include <iostream>
#include <stdio.h>
#include <cstring.h>

using namespace std;

int main()
{
		char str[200000][11];
		char cmps[200000][11];
		int N;
		int i,j,find=0,cnt=0;

		cin >> N;
		for (i = 0; i < N; i++) {
			cin >> str[i];
			cmps[i][0] = 0;
			for (j = i; j >= 0; j--) {
				if ((strcmp(str[i], cmps[j])) == 0) {
					find = 1;
					break;
				}
			}
			if (find != 1) {
				strcpy(cmps[cnt], str[i]);
				cnt++;
			}
			find = 0;
		}
		cout << cnt;
}

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

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

using namespace std;

int main()
{
	int N, i, j, count = 0;
	//string str;
	cin >> N;
	vector<string> S(N);
	vector<int> H(N);
	rep(i, N)
	{
		cin >> S[i];
		H[i] = S[i].length + (int)(S[i][0]) * 11;
	}
	rep(i, N)
		if (H[i] != 0)
			for (j = i;j < N;++j)
			{
				if (H[i] == H[j] && S[i] == S[j])
				{
					++count;
					H[j] == 0;
				}
			}
	cout << count;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:29: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   16 |                 H[i] = S[i].length + (int)(S[i][0]) * 11;
      |                                   ()
Language: C++

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

 
int main() {
  int N;
  cin >> N ;
  char S[N][10];
  for(int i =0;i<N;i++){
  cin << S.at(i) << endl; 
  }
  int out=N;
  for(int i=0;i<N;i++){
  	for(int j=i+1;j<N;j++){
    if(S.at(i) == S.at(j)){
    out=out-1;
    break;
    }
    }
  }
  cout << out << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: request for member 'at' in 'S', which is of non-class type 'char [N][10]'
   11 |   cin << S.at(i) << endl;
      |            ^~
a.cc:16:10: error: request for member 'at' in 'S', which is of non-class type 'char [N][10]'
   16 |     if(S.at(i) == S.at(j)){
      |          ^~
a.cc:16:21: error: request for member 'at' in 'S', which is of non-class type 'char [N][10]'
   16 |     if(S.at(i) == S.at(j)){
      |                     ^~
Language: C

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

int main(){
  int n;
  string s;
  vector <string> v;
  cin >> n;
  rep(i, n) {
    cin >> s;
    auto itr = find(v.begin(), v.end(), s);
    if(itr != v.end()){
      //存在するならpushしない
    }else{
      v.push_back(s);
    }
  }
  cout << v.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: Java

import java.util.*;
class string_m
{
	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		ArrayList<String> str= new ArrayList<String>();
		for(int i=0;i<n;i++)
		{
		          str.add(sc.next());
		}
		 HashSet set = new HashSet(str);
		set.remove(null);
		System.out.println(set.size());


	}
}


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

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

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

  size_t n_count = std::count(gott.begin(), gott.end(), gott(i));
  std::cout << n_count << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: 'count' is not a member of 'std'; did you mean 'cout'?
   17 |   size_t n_count = std::count(gott.begin(), gott.end(), gott(i));
      |                         ^~~~~
      |                         cout
a.cc:17:61: error: no match for call to '(std::vector<int>) (int&)'
   17 |   size_t n_count = std::count(gott.begin(), gott.end(), gott(i));
      |                                                         ~~~~^~~
Language: C

#include <iostream>
using namespace std;

int main(){
  long long n;
  cin >> n;
  string s[n];
  string ans[n];
  for(int i=0;i<n;i++){
    cin >> s[i];
    //cout << s[i] <<endl;
  }
  long long count=0;
  for(int i=0;i<n;i++){
    int x=0;
    for(int j=0;j<count;j++){
      if(s[i]==ans[j]){
        x=1;
      }
    }
    if(x==0&&s[i]!=""){
      ans[count]=s[i];
      count+=1;
    }
  }
  //cout << ans[0] <<endl;
  cout << count << endl;
}

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

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

using namespace std;

int main()
{
	int N, i, j, count = 0;
	//string str;
	cin >> N;
	vector<string> S(N);
	vector<int> H(N);
	rep(i, N)
	{
		cin >> S[i];
		H[i] = (int)S[i].length + (int)S[i][0] * 11;
	}
	rep(i, N)
		if (H[i] != 0)
			for (j = i;j < N;++j)
			{
				if (H[i] == H[j])
				{
					if (S[i] == S[j])
					{
						++count;
						H[j] == 0;
					}
				}
			}
	cout << count;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:34: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   16 |                 H[i] = (int)S[i].length + (int)S[i][0] * 11;
      |                                        ()
Language: C++

#include <iostream>
#include <stdio.h>

using namespace std;

int main()
{
		char str[200000][11];
		char cmps[200000][11];
		int N;
		int i,j,find=0,cnt=0;

		cin >> N;
		for (i = 0; i < N; i++) {
			cin >> str[i];
			cmps[i][0] = 0;
			for (j = i; j >= 0; j--) {
				if ((strcmp(str[i], cmps[j])) == 0) {
					find = 1;
					break;
				}
			}
			if (find != 1) {
				strcpy_s(cmps[cnt], str[i]);
				cnt++;
			}
			find = 0;
		}
		cout << cnt;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:38: error: 'strcmp' was not declared in this scope
   18 |                                 if ((strcmp(str[i], cmps[j])) == 0) {
      |                                      ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <stdio.h>
a.cc:24:33: error: 'strcpy_s' was not declared in this scope
   24 |                                 strcpy_s(cmps[cnt], str[i]);
      |                                 ^~~~~~~~
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';
      }
    }
    if(str[i]!='\0')
      cnt++;
  }
  printf("%ld",cnt);
}







Compiler output:
main.c: In function 'main':
main.c:13:15: error: assignment to expression with array type
   13 |         str[i]='\0';
      |               ^
main.c:16:14: warning: comparison between pointer and zero character constant [-Wpointer-compare]
   16 |     if(str[i]!='\0')
      |              ^~
main.c:16:8: note: did you mean to dereference the pointer?
   16 |     if(str[i]!='\0')
      |        ^
Language: C++

#include<iostream>
#include <string>
#include<stdio.h>
using namespace std;
string s[200000];
int main()
{
	int n,t=1;
	scanf("%d",&n);
	for(int i=0;i<n;i++)
	{
		cin>>s[i]; 
	}
	sort(s,s+n);
	for(int i=0;i<n-1;i++)
	{
		if(s[i]!=s[i+1])t++;
	}
	printf("%d",t);
	return 0;
}

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

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

int main() {
    int N, P, j;
    cin >> N;
    vector<string> S(N);
    v.reserve(10000);
    for (int i = 0; i < N; i++){
        j = 0;
        cin >> S.at(i);
        while(1) {
            if (i == 0) {
                P = 1;
                break;
            }
            if (i == j) {
                P++;
                break;
            }
            if (S.at(i) == S.at(j)){
                break;
            }
            j++;
        }
    }
    cout << P << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'v' was not declared in this scope
    8 |     v.reserve(10000);
      |     ^
Language: C++

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

using namespace std;

int main()
{
	int N, i, j, count = 0;
	//string str;
	cin >> N;
	vector<string> S(N);
	vector<int> H(N);
	rep(i, N)
	{
		cin >> S[i];
		H[i] = (int)S[i].length + S[i][0] * 11;
	}
	rep(i,N)
		if(H[i]!=0)
			for (j = i;j < N;++j)
			{
				if (H[i] == H[j])
				{
					if (S[i] == S[j])
					{
						++count;
						H[j] == 0;
					}
				}
			}
	cout << count;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:34: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   16 |                 H[i] = (int)S[i].length + S[i][0] * 11;
      |                                        ()
Language: C++

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

int main(){
	int n,sum=0;
	cin>>n;
	string s[n+5];
	for(int i=1;i<=n;i++) cin>>s[i]
	
	for(int i=1;i<=n;i++){
		for(int j=1;j<i;++){
			if(s[j]==s[i]) break;
			else sum++;
		}
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:40: error: expected ';' before 'for'
    8 |         for(int i=1;i<=n;i++) cin>>s[i]
      |                                        ^
      |                                        ;
    9 | 
   10 |         for(int i=1;i<=n;i++){
      |         ~~~                             
a.cc:10:21: error: 'i' was not declared in this scope
   10 |         for(int i=1;i<=n;i++){
      |                     ^
Language: C++

#include <string>
#include <iostream>
#include <vector>
#include <string>
#include <utility>
#include <algorithm>
#include <math.h>
 
using namespace std;
int main() {
	cin.tie(0);
   	ios::sync_with_stdio(false);
 
	int N,ans;
    string o;
    ans = 1;
	cin >> N;
    vector<string> vec(N);
    for(int i=0;i<N;i++){
      cin >> vec.at(i);
    }
    for(int i=0;i<N;i++){
      for(int j=0;j<N;j++){
        if(i != j){
          if(vec.at(i) == vec.at(j)){
            o = vec.at(i);
              for(int k=0;k<N;k++){
                if(vec.at(k) == o){
                  vec.erase(vec.at(k))
                }
              }
          }else{
            ans++;
          }
        }
      }
    }
    cout << ans << "\n";
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:28: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::erase(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)'
   29 |                   vec.erase(vec.at(k))
      |                   ~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_vector.h:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::vector<std::__cxx11::basic_string<char> >::iterator; const_iterator = std::vector<std::__cxx11::basic_string<char> >::const_iterator]'
 1536 |       erase(const_iterator __position)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:28: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} to 'std::vector<std::__cxx11::basic_string<char> >::const_iterator'
 1536 |       erase(const_iterator __position)
      |             ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::vector<std::__cxx11::basic_string<char> >::iterator; const_iterator = std::vector<std::__cxx11::basic_string<char> >::const_iterator]'
 1564 |       erase(const_iterator __first, const_iterator __last)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note:   candidate expects 2 arguments, 1 provided
Language: C++

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

int main() {
  int N, left, right, mid, sum = 0;
  vector<string> gacha;
  string s;
  bool kaburi;
  
  cin >> N;
  
  for(int i = 0; i < N; i++){
    kaburi = false;
    cin >> s;
    left = 0;
    right = sum;
    while(left < right){
      mid = (left + right) / 2;
      if(s == gacha[mid){
        kaburi = true;
        break;
      }
      else if(s < gacha[mid]){
        right = mid + 1;
      }
      else{
        left = mid + 1;
      }      
    }
    if(!(kaburi)){
      gacha.push_back(s);
      sum++;
      sort(vec.begin(), vec.end());
    }
  }
  
  cout << sum << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:24: error: expected ']' before ')' token
   19 |       if(s == gacha[mid){
      |                        ^
      |                        ]
a.cc:33:12: error: 'vec' was not declared in this scope
   33 |       sort(vec.begin(), vec.end());
      |            ^~~
Language: C++

#include "pch.h"
#include <iostream>
#include <stdio.h>

using namespace std;

int main()
{
		char str[200000][11];
		char cmps[200000][11];
		int N;
		int i,j,find=0,cnt=0;

		cin >> N;
		for (i = 0; i < N; i++) {
			cin >> str[i];
			cmps[i][0] = 0;
			for (j = i; j >= 0; j--) {
				if ((strcmp(str[i], cmps[j])) == 0) {
					find = 1;
					break;
				}
			}
			if (find != 1) {
				strcpy_s(cmps[cnt], str[i]);
				cnt++;
			}
			find = 0;
		}
		cout << cnt;
}

Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
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);
    }
    void printVec(std::vector<int> &vec) {
     cout << "";
  for (auto it = vec.begin(); it != vec.end(); ++it) {
    cout << *it << " ";
  }
  cout << endl;
}
    sort(vec.begin(), vec.end());
    vec.erase(unique(vec.begin(), vec.end()), vec.end());
    cout<<vec.size()<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:42: error: a function-definition is not allowed here before '{' token
   10 |     void printVec(std::vector<int> &vec) {
      |                                          ^
Language: C++

#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;
int main() {
	int long x;
	vector <string> name;
	string tmp;
	cin >> x;
	cin >> tmp;
	name.push_back(tmp);
	for (int i = 1; i < x; i++) {
		cin >> tmp;
		for (int j = 0; j < name.size(); j++) {
			if (tmp == name[j]) {
				break;
			}
			else if (j + 1 == name.size()) {
				name.push_back(tmp);
				sort(&name.begin(), &name.end());
			}
		}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:22:49: error: taking address of rvalue [-fpermissive]
   22 |                                 sort(&name.begin(), &name.end());
      |                                       ~~~~~~~~~~^~
a.cc:22:62: error: taking address of rvalue [-fpermissive]
   22 |                                 sort(&name.begin(), &name.end());
      |                                                      ~~~~~~~~^~
Language: C++

#include <string>
#include <iostream>
#include <vector>
#include <string>
#include <utility>
#include <algorithm>
#include <math.h>
 
using namespace std;
int main() {
	cin.tie(0);
   	ios::sync_with_stdio(false);
 
	int N,ans;
    string o;
    ans = 1;
	cin >> N;
    vector<string> vec(N);
    for(int i=0;i<N;i++){
      cin >> vec.at(i);
    }
    for(int i=0;i<N;i++){
      for(int j=0;j<N;j++){
        if(i != j){
          if(vec.at(i) == vec.at(j)){
            o = vec.at(i)
              for(int k=0;k<N;k++){
                if(vec.at(k) == o){
                  vec.erase(vec.at(k))
                }
              }
          }else{
            ans++
          }
        }
      }
    }
    cout << ans << "\n";
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:26: error: expected ';' before 'for'
   26 |             o = vec.at(i)
      |                          ^
      |                          ;
   27 |               for(int k=0;k<N;k++){
      |               ~~~         
a.cc:27:27: error: 'k' was not declared in this scope
   27 |               for(int k=0;k<N;k++){
      |                           ^
a.cc:33:18: error: expected ';' before '}' token
   33 |             ans++
      |                  ^
      |                  ;
   34 |           }
      |           ~
Language: C

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

int main() {
  int N;
  cin >> N;
  vector<string> vec(N);
  for (int i=0; i<N; i++){
    cin >> vec.at(i);
  }
  int count=N;
  for (int i=0; i<N; i++){
    for (int K=i+1; K<N; K++){
      if (vec.at(i) == vec.at(K)){
        count--;
        break;
      }
    }
  }
  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 <bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin >> n;
    set<string> counter;
    for (int i = 0; i < n; i++) {
        string s;
        cin >> s;
        counter.insert(s);
    }
    cout << counter.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<iostream>
#include<string>
#include<set>
using namespace std;
int main(){
	int N,sum;
	cin>>N;
	string S[N];
	for(int i=0;i<N;i++)cin>>S[i];
	set<string>values;
	for(int i=0;i<N;i++)values.insert(S[i]);
	cout<<valuse.size()<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'valuse' was not declared in this scope; did you mean 'values'?
   12 |         cout<<valuse.size()<<endl;
      |               ^~~~~~
      |               values
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 compare(const void *b1, const void *b2){ // 昇順
  if(b1 > b2) return 1;
  else if(b1 < b2) return -1;
  else return 0;
}


typedef struct sssi{
  int ss;
  char s[20];
}sssi;



int main(){
  int n;
  scanf("%d",&n);
  sssi sss[n];
  int count=0;
  F(i,0,n){
    scanf("%s",sss[i].s);
    sss[i].ss=strlen(s[i]);
  }
  qsort(sss,n,sizeof(sssi),compare);
  F(i,0,n-1){
    if(sss[i].ss==sss[i+1].ss && strcmp(sss[i].s,sss[i+1].s)==0){
      count++;
    }
  }
  printf("%d\n",n-count);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:28:22: error: 's' undeclared (first use in this function)
   28 |     sss[i].ss=strlen(s[i]);
      |                      ^
main.c:28:22: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
#include<string>
#include<set>
using namespace std;
int main(){
	int N,sum;
	cin>>N;
	string S[N];
	for(int i=0;i<N;i++)cin>>S[i];
	set<string>values;
	for(int i=0;i<N;i++)values.insert(S[i]);
	cout<<valuse.insert.size()<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'valuse' was not declared in this scope; did you mean 'values'?
   12 |         cout<<valuse.insert.size()<<endl;
      |               ^~~~~~
      |               values
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][10];
    for(int k = 0; k < j; k++){
      for(int i = 0; i < 10; i++){
    	if(moji[k][] != moji[j]){
        	count++;
        }
      }
    }
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:20: error: expected primary-expression before ']' token
   16 |         if(moji[k][] != moji[j]){
      |                    ^
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());
    cout<<vec.size()<<endl;
}

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++){
      |                 ^
Language: C++

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

int main(){
  int N;
  cin >> N;
  
  vector<string> S(N);
  vector<string> T(1);
  
  for(int i=0;i < N;i++){
    cin >> S.at(i);
  }
  T.at(0) = S.at(0);
  for(int i=1;i <= N;i++){
    for(int j=0;j < Ts.size();j++){
      if(S.at(i) != T.at(j)){
        T.push_back(S.at(i));
      }
    }
  }
  cout << T.size() << endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: 'Ts' was not declared in this scope; did you mean 'T'?
   16 |     for(int j=0;j < Ts.size();j++){
      |                     ^~
      |                     T
Language: Java

import java.util.Scanner;
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.
Scanner s =new Scanner(System.in);
^
  (use --enable-preview to enable unnamed classes)
Main.java:5: error: class, interface, enum, or record expected
for(int i =0;i < num;i++){
^
Main.java:5: error: class, interface, enum, or record expected
for(int i =0;i < num;i++){
             ^
Main.java:5: error: class, interface, enum, or record expected
for(int i =0;i < num;i++){
                     ^
Main.java:7: error: class, interface, enum, or record expected
}
^
Main.java:9: error: class, interface, enum, or record expected
for(int i = 1;i < num;i++){
^
Main.java:9: error: class, interface, enum, or record expected
for(int i = 1;i < num;i++){
              ^
Main.java:9: error: class, interface, enum, or record expected
for(int i = 1;i < num;i++){
                      ^
Main.java:11: error: class, interface, enum, or record expected
    for(int j = 0;j < i;j++){
    ^
Main.java:11: error: class, interface, enum, or record expected
    for(int j = 0;j < i;j++){
                  ^
Main.java:11: error: class, interface, enum, or record expected
    for(int j = 0;j < i;j++){
                        ^
Main.java:14: error: class, interface, enum, or record expected
        }
        ^
Main.java:18: error: class, interface, enum, or record expected
    }
    ^
13 errors
Language: C

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

int main(){
	int n,sum=0;
	cin>>n;
	string s[n+5][10];
	for(int i=1;i<=n;i++){
		for(int j=1;j<=10;j++){
			cin>>s[i][j];
		}
	}
	
	for(int i=1;i<=n;i++){
		for(int j=1;j<=0;j++){
				if(s[j][1]==s[i][1]&&s[j][2]==s[i][2]&&s[j][3]==s[i][3]&&s[j][4]==s[i][4]&&s[j][5]==s[i][5]&&s[j][6]==s[i][6]&&s[j][7]==s[i][7]&&s[j][8]==s[i][8]&&s[j][9]==s[i][9]&&s[j][10]==s[i][10]) break;
				else sum++;
		}
	}
	
	cout<<sum;
	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> vec(N);
  for(int i=0;i<N;i++){
    cin >> vec.at(i);
  }
  for(int i=0;i<N;i++){
      for(int j=0;j<N;j++){
        if(vec.at(i).compare(vec.at(j))==0){
            if(i!=j){
                vec.erase(vec.at(j));
                N--;
                }
        }
      }
  }
  cout << vec.size() <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:26: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::erase(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)'
   15 |                 vec.erase(vec.at(j));
      |                 ~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::vector<std::__cxx11::basic_string<char> >::iterator; const_iterator = std::vector<std::__cxx11::basic_string<char> >::const_iterator]'
 1536 |       erase(const_iterator __position)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:28: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} to 'std::vector<std::__cxx11::basic_string<char> >::const_iterator'
 1536 |       erase(const_iterator __position)
      |             ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::vector<std::__cxx11::basic_string<char> >::iterator; const_iterator = std::vector<std::__cxx11::basic_string<char> >::const_iterator]'
 1564 |       erase(const_iterator __first, const_iterator __last)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note:   candidate expects 2 arguments, 1 provided
Language: C

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



int main() {
 int N;
  cin >> N;
 
  
  string s[N];
  int count = N;
  for(int i = 0; i < N; i++){
    cin >> s[i];
    for(int j = 0; j < i; j++){
      if(s[i] == s[j]){
        N--;
      }
    }
  }
  
  
 
  cout << count << '\n';

  

}

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){
        *astr[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:13:10: error: 'astr' undeclared (first use in this function); did you mean 'str'?
   13 |         *astr[i]='\0';
      |          ^~~~
      |          str
main.c:13:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:14: 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 <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);
  }
  for(i = 0;i < N;i++){
    for(j = 0;i < j < N;j++){
      if(s.at(i) == s.at(j)){
        continue;
      }
    }
  }
}
      

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



import java.util.ArrayList;
import java.util.Scanner;

public class Gacha {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());

		ArrayList<String> prizeList = new ArrayList<>();
		prizeList.add(sc.next());

		for(int i = 1;i < N; i++) {
			String prize = sc.next();
			boolean judge = true;
			for(int j = 0 ; j < prizeList.size(); j++) {
				if(prize.equals(prizeList.get(j))){
					//もし一回でもかぶったらfalse
					judge = false;
				}
			}
			if(judge) {
				prizeList.add(prize);
			}

		}
		sc.close();
		System.out.println(prizeList.size());
	}

}


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

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

int main() {
  int N;
  cin>>N;
  vector<string> S(N);
  int count =o;
  for(int i=0; i<N;i++){
    cin>>S.at(i);
  }
  for(int i=0; i<N-1; i++){
      for(int j=i+1; i<N; j++){
        if(S.at(i)==S.at(j)) count++;
      }
  }
  cout<< N-count;
}
        

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 'o' was not declared in this scope
    8 |   int count =o;
      |              ^
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:13:15: error: assignment to expression with array type
   13 |         str[i]='\0';
      |               ^
main.c:18:14: 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 <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);
    cout<<array_size<<endl;
}

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<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:13:16: error: lvalue required as left operand of assignment
   13 |         &str[i]='\0';
      |                ^
main.c:18:14: 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<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
    long N,cnt=0;
    cin >> N;
    vector<string>S(N),ans(N,"A");
    for(int i=0;i<N;i++){
        cin >> S[i];
    }
    sort(S.begin(),S.end());
    for(int i=0;i<N;i++){
        if(i==0){
            cnt++;
        }else if(S[i]!=S[i-1]){
            cnt++;
        }
    }
    cout << cnt;
}

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