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

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 'import'
    1 | import java.util.Map.Entry;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.Map.Entry;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.util.*;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.util.*;
      |            ^
main.c:4:1: error: unknown type name 'import'
    4 | import org.w3c.dom.css.Counter;
      | ^~~~~~
main.c:4:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    4 | import org.w3c.dom.css.Counter;
      |           ^
main.c:6:1: error: unknown type name 'public'
    6 | public class Main {
      | ^~~~~~
main.c:6:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    6 | public class Main {
      |              ^~~~
Language: Java

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

public class Main{
  public static void main(String[] args){
    
    Scanner scanner = new Scanner(System.in);
    long N = scanner.nextLong();
    int X = 0;
    String[] k = new String[N-1];
      
    for(int i=0; i<N; i++){
       k[i] = scanner.next();
    }
    
    for(int j=0; j<N; j++ ){
        if(!(Arrays.asList(k).contains(k[j]))){
          X = X+1;
        }
    }
    System.out.println(X);
    
  }
}

    
    


Compiler output:
Main.java:10: error: incompatible types: possible lossy conversion from long to int
    String[] k = new String[N-1];
                             ^
1 error
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_back(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_back'
   16 |                 s.push_back(word);
      |                   ^~~~~~~~~
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[N];
  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[N];
      |                            ^
a.cc:12:7: error: 'S' was not declared in this scope
   12 |       S[j]==S[i];
      |       ^
Language: C++

int main() {
	int n;
	vector<string> strVec;
	cin >> n;
	int count = n;
	for (int i = 0; i < n; i++) {
		string tmp = "";
		cin >> tmp;
		strVec.push_back(tmp);
	}
	for (int i = 0; i < n; i++) {
		for (int j = i + 1; j < n; j++) {
			if (i == n-1) {
				if (strVec.at(i) == "")count--;
				cout << count;
				return 0;
			}
			if (strVec.at(i) != "") {
				if (strVec.at(i) == strVec.at(j)) {
					count--;
					strVec.at(j) = "";
				}
			}
			else break;
		}
	}
end:
	cout << count;

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'vector' was not declared in this scope
    3 |         vector<string> strVec;
      |         ^~~~~~
a.cc:3:16: error: 'string' was not declared in this scope
    3 |         vector<string> strVec;
      |                ^~~~~~
a.cc:3:24: error: 'strVec' was not declared in this scope
    3 |         vector<string> strVec;
      |                        ^~~~~~
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> n;
      |         ^~~
a.cc:7:23: error: expected ';' before 'tmp'
    7 |                 string tmp = "";
      |                       ^~~~
      |                       ;
a.cc:8:24: error: 'tmp' was not declared in this scope
    8 |                 cin >> tmp;
      |                        ^~~
a.cc:15:33: error: 'cout' was not declared in this scope; did you mean 'count'?
   15 |                                 cout << count;
      |                                 ^~~~
      |                                 count
a.cc:28:9: error: 'cout' was not declared in this scope; did you mean 'count'?
   28 |         cout << count;
      |         ^~~~
      |         count
Language: Java

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

public class Main{
  public static void main(String[] args){
    
    Scanner scanner = new Scanner(System.in);
    long N = scanner.nextLong();
    int X = 0;
    String[] k = new String[N-1];
      
    for(long i=0; i<N; i++){
       String k[i] = scanner.next();
    }
    
    for(long j=0; j<N; j++ ){
        if(!(Arrays.asList(k).contains(k[j]))){
          X = X+1;
        }
    }
    System.out.println(X);
    
  }
}

    
    


Compiler output:
Main.java:13: error: ']' expected
       String k[i] = scanner.next();
                ^
Main.java:13: error: ';' expected
       String k[i] = scanner.next();
                 ^
2 errors
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[N];
  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:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin>>N;
      |   ^~~
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[N];
      |                            ^
a.cc:12:7: error: 's' was not declared in this scope
   12 |       s[j]==s[i];
      |       ^
a.cc:17:5: error: 'cout' was not declared in this scope
   17 |     cout<<cnt<<endl;
      |     ^~~~
a.cc:17:16: error: 'endl' was not declared in this scope
   17 |     cout<<cnt<<endl;
      |                ^~~~
Language: C++

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

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;

int main () {
  int n;
  cin >> n;
   
  vector<string> s;
  rep(i,n) cin >> s[i];
  
  int cnt = 1;
  sort(s.bigin(),s.end());
  rep(i,n-1) {
    if (s[i] != s[i+1]) cnt++;
  }
  cout << cnt;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'bigin'; did you mean 'begin'?
   15 |   sort(s.bigin(),s.end());
      |          ^~~~~
      |          begin
Language: C++

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

int main(void){

    cin.tie(0);
    ios::sync_with_stdio(false);

    int n;
    vector <string> str;
    std::set<string> st;

    cin >> n;

    string buf;
    for(int i = 0;i<n;i++){
        cin >> buf;
        st.insert(buf);
    }

    cout << st.size << endl;


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:10: error: invalid use of non-static member function 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::size() const [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int]'
   24 |     cout << st.size << endl;
      |     ~~~~~^~~~~~~~~~
In file included from /usr/include/c++/14/set:63,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_set.h:421:7: note: declared here
  421 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
Language: Java

package abc164;

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

public class Gacha {

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

		String[] lines = new String[N];
		ArrayList<String> fruits = new ArrayList<>();
		for(int i = 0; i < N; i++) {
			String line = sc.next();
			if(fruits.indexOf(line) == -1) {
				fruits.add(line);
			}
		}

//		fruits.add(lines[0]);
//		for(int i = 1; i < N; i++) {
//			for(int j = 0; j < fruits.size(); j++) {
//				if(fruits.indexOf(lines[i]) == -1) {
//					fruits.add(lines[i]);
//				}
//				else {
//
//				}
//			}
//		}

		System.out.println(fruits.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;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;

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


Compiler output:
a.cc:17:24: error: extended character 　 is not valid in an identifier
   17 |     if (s[i] != s[i+1])　cnt++;
      |                        ^
a.cc: In function 'int main()':
a.cc:17:24: error: '\U00003000cnt' was not declared in this scope
   17 |     if (s[i] != s[i+1])　cnt++;
      |                        ^~~~~
Language: C

#include<stdio.h>
#include<string.h>
int n,count=1,i,j,f;
char item[1000][11];
int main(){
	get(n);
	for(i=0;i<n;i++)
		gets(item[i]);
	for(i=0;i<n-1;i++){
		f=1;
		for(j=i+1;j<n;j++){
			if(strcmp(item[i],item[j])==0)
				f=0;
		}
		if(f==1)
			count++;
	}
	printf("%d\n",count);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'get'; did you mean 'getw'? [-Wimplicit-function-declaration]
    6 |         get(n);
      |         ^~~
      |         getw
main.c:8:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |                 gets(item[i]);
      |                 ^~~~
      |                 fgets
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,i,j,a=0;
	cin>>n;
	string s;
	int a[n+1];
	for(i=1;i<=n;i++)
	{
		cin>>a[i];
		s[i]=a[i];
	}
	for(i=1;i<=n;i++)
	{
		for(j=1;j<=n-1;j++)
		{
			if(s[i]==s[j])
			{
				a++;
			}
		}
	}
	cout<<a;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: conflicting declaration 'int a [(n + 1)]'
    8 |         int a[n+1];
      |             ^
a.cc:5:19: note: previous declaration as 'int a'
    5 |         int n,i,j,a=0;
      |                   ^
a.cc:11:23: error: invalid types 'int[int]' for array subscript
   11 |                 cin>>a[i];
      |                       ^
a.cc:12:23: error: invalid types 'int[int]' for array subscript
   12 |                 s[i]=a[i];
      |                       ^
Language: Java

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

public class Main{
  public static void main(String[] args){
    
    Scanner scanner = new Scanner(System.in);
    long N = scanner.nextLong();
    int X = 0;
    String[] k = new String[N-1];
      
    for(int i=0; i<N; i++){
       String k[i] = scanner.next();
    }
    
    for(int j=0; j<N; j++ ){
        if(!(Arrays.asList(k).contains(k[j]))){
          X = X+1;
        }
    }
    System.out.println(X);
    
  }
}

    
    


Compiler output:
Main.java:13: error: ']' expected
       String k[i] = scanner.next();
                ^
Main.java:13: error: ';' expected
       String k[i] = scanner.next();
                 ^
2 errors
Language: C++

#include <bits/stdc++.h>

#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define ll long long
using namespace std;



int main() {
  int n;
  cin >> n;
  vector<string> s(n);
  // cin >> s[0];
  // cout << s[0].size() << endl;
  rep(i, n) {
    cin >> s[i];
  }
  int count = 0;
  rep(i, n) {
    for (int j = i + 1; j < n; j++){
      if (s[i].size() != s.[j].size()) {
        continue;
      }
      if (s[i] == s[j]) {
        s[j] = j;
        count++;
      }
    }
  }
  cout << n - count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:28: error: expected unqualified-id before '[' token
   21 |       if (s[i].size() != s.[j].size()) {
      |                            ^
Language: C++

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

int main()
{
	int n;
	int all;
	//int all[200000];

	string str;
	//string str2[200000];
	char a[200000][10];///////////////*10
	//char* a;

	cin >> n;
	all = n;

	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
		//str2[i] = str;
		for (int j = 0; j < i; j++)
		{
			if (strcmp(a[i], a[j]) == 0) 
			{
				all--;
				break;
			}
		}
	}

	//for()

	cout << all;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:29: error: 'strcmp' was not declared in this scope
   25 |                         if (strcmp(a[i], a[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 <string>
Language: C++

#include<bits/stdc++.h>
using namespace std;
 unorderd_map<string ,ll>arr;
int main()
{  int n;
 cin>>n;

 //string arr[n+1]={0};
 int de_count=0;
 for(int i=1;i<=n;i++)
 { string s;
  cin>>s;
  
    if(arr[s]==0)
    { de_count++;
    arr[s]=1;}
    
 }

  
}

Compiler output:
a.cc:3:2: error: 'unorderd_map' does not name a type
    3 |  unorderd_map<string ,ll>arr;
      |  ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:14:8: error: 'arr' was not declared in this scope
   14 |     if(arr[s]==0)
      |        ^~~
Language: C++

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

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;

int main () {
  int n;
  cin >> n;
   
  vector<string> s;
  rep(i,n) cin >> s[i];
  
  int cnt = 1;
  sort(s.bigin(),s.end());
  rep(i,n-1) {
    if (s[i] != s[i+1])　cnt++;
  }
  cout << cnt;
}

Compiler output:
a.cc:17:24: error: extended character 　 is not valid in an identifier
   17 |     if (s[i] != s[i+1])　cnt++;
      |                        ^
a.cc: In function 'int main()':
a.cc:15:10: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'bigin'; did you mean 'begin'?
   15 |   sort(s.bigin(),s.end());
      |          ^~~~~
      |          begin
a.cc:17:24: error: '\U00003000cnt' was not declared in this scope
   17 |     if (s[i] != s[i+1])　cnt++;
      |                        ^~~~~
Language: C

#include <iostream>
#include <string.h> 
using namespace std;
int main(void){
    int N,m;
  int count =0;
  	scanf("%d", &N);
	char S[N][10];
	for(int i=0;i<N;i++){
    scanf("%s",S[i]);
      m=0;
      for(int j = 0; j<i;j++){
      	if(strcmp(S[i],S[j])==0){
      	m=1;
          break;
      	}
      }
        if(m==0){
          count++;
        }
    }
  printf("%d",count);
}

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

#include<iostream>
#include<unordered_map>
using namespace std;
int main(){
    int n;
    string s;
    cin >> n;
    unordered_map<string, int> mp;
    for(int i=0;i<n;i++){
        cin >> s;
        mp[s]++;
    }
    cout << mp.size() << endl;


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

#include <bits/stdc++.h>
#define REP(i, a, b) for (long long i = a; i <= b; ++i)
#define ll long long
using namespace std;

ll n, ans;
string s;

map < bool > a;

inline ll read(){
	ll s = 0, w = 1;
	char ch = getchar();
	for (; ch < '0' || ch > '9'; ch = getchar()) w *= ch == '-' ? -1 : 1;
	for (; ch >= '0' && ch <= '9'; ch = getchar()) s = s * 10 + ch - '0';
	return s * w;
}

inline void work(){
	n = read();
	REP(i, 1, n) cin >> s, a[s] < 1 ? ans++, a[s] = 1 : ans = ans;
	printf("%lld\n", ans);
}

int main(){
	work();
	return 0;
}

Compiler output:
a.cc:9:12: error: wrong number of template arguments (1, should be at least 2)
    9 | map < bool > a;
      |            ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc: In function 'void work()':
a.cc:21:33: error: no match for 'operator[]' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   21 |         REP(i, 1, n) cin >> s, a[s] < 1 ? ans++, a[s] = 1 : ans = ans;
      |                                 ^
a.cc:21:51: error: no match for 'operator[]' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   21 |         REP(i, 1, n) cin >> s, a[s] < 1 ? ans++, a[s] = 1 : ans = ans;
      |                                                   ^
Language: C++

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

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

 
    sort(S.begin(), S.end()); 
  
  int sum = N; 
  for (int i = 0; i < N; i++) {
    if (S.at(i) == S.at(i-1) || S.at(i) == S.at(i+1)) {
     sum--;
    }
  }
  }

 cout << sum << endl;
}


Compiler output:
a.cc:23:2: error: 'cout' does not name a type
   23 |  cout << sum << endl;
      |  ^~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: Java

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

public class Main{
  public static void main(String[] args){
    
    Scanner scanner = new Scanner(System.in);
    long N = scanner.nextLong();
    int X = 0;
    
    for(int i=0; i<N; i++){
      String[i] k = scanner.next();
    }
    
    for(int j=0; j<N; j++ ){
        if(!(Arrays.asList(k).contains(k[j]))){
          X = X+1;
        }
    }
    System.out.println(X);
    
  }
}

    
    


Compiler output:
Main.java:12: error: not a statement
      String[i] k = scanner.next();
            ^
Main.java:12: error: ';' expected
      String[i] k = scanner.next();
               ^
2 errors
Language: C++

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

int getnumber(string S){
  int N;
  cin>>N;
  set<string> S;
  for(int i=0;i<N;i++){
    s.insert(S[i]);
  }
  return s.size();
}
  
  


Compiler output:
a.cc: In function 'int getnumber(std::string)':
a.cc:9:15: error: declaration of 'std::set<std::__cxx11::basic_string<char> > S' shadows a parameter
    9 |   set<string> S;
      |               ^
a.cc:6:22: note: 'std::string S' previously declared here
    6 | int getnumber(string S){
      |               ~~~~~~~^
a.cc:11:5: error: 's' was not declared in this scope
   11 |     s.insert(S[i]);
      |     ^
a.cc:11:15: error: no match for 'operator[]' (operand types are 'std::set<std::__cxx11::basic_string<char> >' and 'int')
   11 |     s.insert(S[i]);
      |               ^
a.cc:13:10: error: 's' was not declared in this scope
   13 |   return s.size();
      |          ^
Language: C

#include<iostream>
#include<map>
using namespace std;
#define ll long long
int main()
{
    ll t;cin>>t;
    map<string,ll>mp;
    ll cnt=0;
    while(t--){
        string s;cin>>s;
        if(mp[s]==0){cnt++;mp[s]++;}
    }
    cout<<cnt<<endl;
}


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

#include <iostream>
#include<string.h> 
using namespace std;
int main(void){
    int N,m;
  int count =0;
  	scanf("%d", &N);
	char S[N][10];
	for(int i=0;i<N;i++){
    scanf("%s",S[i]);
      m=0;
      for(int j = 0; j<i;j++){
      	if(strcmp(S[i],S[j])==0){
      	m=1;
          break;
      	}
      }
        if(m==0){
          count++;
        }
    }
  printf("%d",count);
}

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

import java.io.IOException;
import java.io.InputStream;
import java.util.*;

public class Main {
    public  static void main(String[] args) {
        FastScanner sc = new FastScanner();
        String text = "";
        List<String> ListA = new ArrayList<>();
        int count = Integer.parseInt(sc.next());

        for(int i = 0; i < count; i++) {
            text = sc.next();
            ListA.add(text);

        }
        List<String> listB = new ArrayList<String>(new HashSet<>(listA));
        System.out.print(listB.size());
    }
}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

}

Compiler output:
Main.java:17: error: cannot find symbol
        List<String> listB = new ArrayList<String>(new HashSet<>(listA));
                                                                 ^
  symbol:   variable listA
  location: class Main
1 error
Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
public class Hello{
    public static void Main(){
        var n = int.Parse(Console.ReadLine());
        var s = new HashSet<string>();
        for(var i = 0;i < n;i++){
            s.Add(Console.ReadLine());
        }
        
        Console.WriteLine(s.Count);
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Hello{
      | ^~~~~~
Language: Java


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

public class ff {
	
	public static void main(String[] args) {
		Set<String> a=new HashSet<String>();
		String s = null;
		int a1=0;
		ff b=new ff();
		Scanner scanner = new Scanner(System.in);
		a1 = scanner.nextInt();
		while(a1--!=0) {
			s = scanner.next();
			a.add(s);
		}
		System.out.println(a.size());
		}

}


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

#include <iostream>
#include <set>

using namespace std;

set<string>S;

int main() {
	int n;
	cin>>n;
	for(int i=0;i<n;i++) {
		string s;
		cin>>s;
		S.push(s);
	}
	cout<<S.size();
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   14 |                 S.push(s);
      |                   ^~~~
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 = 1;
  bool finished = true;
  if(N > 1) {
    for(int i = 1; i < N; i++) {
      for(int j = 0; j < i; j++) {
        if(vec.at(i) == vec.at(j)) {
          finished = false;
          break;
        }
      }
      if(finished)
        count++;
      else
        finished = true;
    }
  }
  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;
#define ll long long
int main()
{
    ll t;cin>>t;
    map<string,ll>mp;
    ll cnt=0;
    while(t--){
        string s;cin>>s;
        if(mp[s]==0){cnt++;mp[s]++;}
    }
    cout<<cnt<<endl;
}


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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class TheThird{

    public static void main(String[] args){
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            int number = Integer.parseInt(br.readLine());
            List<String> items = new ArrayList<>();
            int result = 0;
            for(int i = 0; i<number;i++){
                String now = br.readLine();
                if(items.contains(now)==false){
                    result += 1;
                    items.add(now);
                }
            }
            System.out.print(result);
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}


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

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

int main()
{
	int N;
	static char syurui[200000][20];
	char S[20];
	int count = 0;
	int flag = 0;

	scanf_s("%d", &N);
	for (int i = 0; i < N; i++) {
		flag = 0;
		scanf("%s", S);
      
		for (int j = 0; j < count; j++) {
			if (strcmp(syurui[j], S) == 0) {
				flag = 1;
				break;
				printf("a");
			}
		}
		if (flag == 0) {
			strcpy(syurui[count], S);
			count++;
		}
	}

	printf("%d", count);
	return 0;
}

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

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

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

    vector<string> s(n); for (int i = 0; i < n; i++) cin >> s[i];
    
    sort(s.begin(), s.end());

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

        int endIndex = -1;
        tmpCnt = 1;
        for (int j = i + 1; j < n; j++) {
            if (s[i] == s[j]) {
                tmpCnt++;
            }
            else {
                endIndex = j;
                break;
            }
        }

        if (i == 0 && tmpCnt == 1 &&  endIndex == -1) {
            ans = n;
            break;
        }
        else if (i != n - 1 && tmpCnt == 1 && endIndex == -1) {
            break;
        }
        else {
            ans++;
        }

    }

    cout << ans << endl;
    return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:43:14: error: expected '}' at end of input
   43 |     return 0;
      |              ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

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

// C
int main() {
  int N;
  string S[30000];
  cin >> N;

  for (int i = 0; i < N; ++i) cin >> S[i];

  int counter = 0;
  bool res = true; //初期値はtrue
  for (int i = 0; i < N; ++i) {
    res = true;
    for (int j = 0; j < i; ++j ) {
      if (S[i] == S[j]) {
        res = false;
        break;
      }
    }
    if (res) ++counter;
  }
  cout << counter << endl;
  return 0:
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:11: error: expected ';' before ':' token
   25 |   return 0:
      |           ^
      |           ;
a.cc:25:11: error: expected primary-expression before ':' token
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.at(i);
           soat(a.begin(),a.end());int x=N;
           for(int i=1;i<N;i++)if(a.at(i)==a.at(i-1))x--;
           cout<<x<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:4:12: error: 'soat' was not declared in this scope
    4 |            soat(a.begin(),a.end());int x=N;
      |            ^~~~
a.cc:6:26: error: expected '}' at end of input
    6 |            cout<<x<<endl;
      |                          ^
a.cc:3:11: note: to match this '{'
    3 | int main(){int N;cin>>N;vector<string>a(N);for(int i=0;i<N;i++)cin>>a.at(i);
      |           ^
Language: C

N = int(input())

l = []

ans = 1

s = input()
l.append(s)

for i in range(N-1):
    s = input()
    t = s in l
    if t == False:
        ans += 1
        l.append(s)

print(ans)







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

n = int(input())
a = []
count = 0
for _ in range(n):
    s = input()
    if s not in a:
        a.append(s)
        count += 1
print(count)

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

using namespace std;
 
int main() {
  int N;
  cin >> N;
  map<int,string> a;
  int n = 0;
  int i = 0;
  for (i; i<N; i++) {
    string S;
    cin >> S;
    if (i == 0) {
      a[0] = S;
      n += 1;
    }
    else {
      int m = 0;
      int j = 0;
      for (j; j < i; j++) {
        if (a[j] != S) {
          m += 1;
        }
      }
      if (m == i) {
        n += 1;
      }
    }
  }
  cout << n << endl;
}
          

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:6:3: error: 'map' was not declared in this scope
    6 |   map<int,string> a;
      |   ^~~
a.cc:1:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
  +++ |+#include <map>
    1 | using namespace std;
a.cc:6:7: error: expected primary-expression before 'int'
    6 |   map<int,string> a;
      |       ^~~
a.cc:10:5: error: 'string' was not declared in this scope
   10 |     string S;
      |     ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:11:12: error: 'S' was not declared in this scope
   11 |     cin >> S;
      |            ^
a.cc:13:7: error: 'a' was not declared in this scope
   13 |       a[0] = S;
      |       ^
a.cc:20:13: error: 'a' was not declared in this scope
   20 |         if (a[j] != S) {
      |             ^
a.cc:29:3: error: 'cout' was not declared in this scope
   29 |   cout << n << endl;
      |   ^~~~
a.cc:29:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:29:16: error: 'endl' was not declared in this scope
   29 |   cout << n << endl;
      |                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include <iostream>
#include <map>
using namespace std;
int main() {
 	int n;
  	cin >> n;
  	map<string, int> m
    while(n--) {
    	string s;
      	cin >> s;
      	m.[s]++;
    }
  	cout << m.size();
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected initializer before 'while'
    8 |     while(n--) {
      |     ^~~~~
a.cc:13:17: error: 'm' was not declared in this scope
   13 |         cout << m.size();
      |                 ^
Language: C

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

int main() {
  int N, ans;
  string prize;
  cin >> N;
  ans = 0;
  vector<string> vec(N);

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

  for (int i = 1; i <= N; i++) {
    prize = vec.at(i-1);
    for (int j = 0; j < i; j++) {
      if (i-1 != j && prize == vec.at(j)) break;
      if (j+1 == i) ans+=1;
      }
    }
  cout << ans << 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;

#define ll 				long long
#define vi 				vector<ll>
#define vb 				vector<bool>
#define vvi				vector<vi>
#define vvb				vector<vb>
#define vii				vector<pair<ll,ll>>
#define pii				pair<ll,ll>
#define mii 			map<ll,ll>
#define rev(a); 		reverse(a.begin(), a.end());
#define sortv(a); 		sort(a.begin(), a.end());
#define sortd(a); 		sort(a.begin(), a.end(), greater<int>());
#define FOR(i,a,b) 		for (int i = (a); i < (b); i++)
#define ROF(i,a,b) 		for (int i = (b)-1; i >= (a); i--)
#define pb 				push_back
#define mp 				make_pair
#define printv(a);		FOR(_Q,0,(int)(a).size())cout<<(a)[_Q]<<" ";cout<<'\n';
#define IOS 			ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);

void solve();

ll MOD = 1000000007;
ll INF = LLONG_MAX;

/*****************************************************************************/
signed main() {
	IOS;
	int n;cin>>n;
	set<string> dong;
	FOR(i,0,n) {
		string s;cin>>s;
		dong.insert(s);
	}
	cout<<dong.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 <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
  ll n,count=1;
  cin>>n;
  vector<string> vec;
  vec.resize(n);
  cin>>vec.at(0);
  for(ll i=1;i<n;i++){
    cin>>vec.at(i);
  }
  sort(vec.begin(),vec.end());
  for(auto v:vec){}
  for(ll i=1;i<n;i++){
    if(vec.at(i-1)==vec.at(i)){}
    else{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 <bits/stdc++.h>
using namespace std;

int main(){
  int N;
  cin >> N;
  
  vector<string> item(N);
  
  for(int i = 0; i < N; i++){
    string item1;
    cin >> item1;
    item.at(i) = item1;
  }
  
  int cnt = 0;
  int i = 0;
  int j = 1;

  item.erase(unique(item.begin(),item.end()), item.end());
  cout << item.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 <map>
using namespace std;

int main()
{
  int n;
  cin>>n;
  string stringArray[n];// = { "Tommy", "Sammy", "Tommy", "Wally", "Tommy" };
  string st;
  int i=0;
  while(i<n)
    cin>>st;
    stringArray[i]=st;
    i++;
  }

  std::map<string, int> count_find;
  int non_unique_count = 0, unique_count = 0;

  for(auto &s : stringArray) {
    // Note: This uses that std::map::operator[] zero-initializes when it is
    //       called for a new key, so crucially, we start with 0 (not uninitialized)
    int count = ++count_find[s];
    if(count == 1) {         // when a string is found the first time
      ++unique_count;        // tentatively mark it as unique
    } else if(count == 2) {  // when it is found the second time
      --unique_count;        // unmark as unique
      non_unique_count += 2; // and chalk both found strings up as non-unique
    } else {                 // after that, 
      ++non_unique_count;    // just chalk up as non-unique.
    }
  }

  std::cout << unique_count << std::endl;
}

Compiler output:
a.cc:22:3: error: expected unqualified-id before 'for'
   22 |   for(auto &s : stringArray) {
      |   ^~~
a.cc:36:8: error: 'cout' in namespace 'std' does not name a type
   36 |   std::cout << unique_count << std::endl;
      |        ^~~~
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:37:1: error: expected declaration before '}' token
   37 | }
      | ^
Language: C

n=int(input())
s=[]
for i in range(n):
    s.append(input())
#print(s)
b=sorted(s)
#print(b)
a=1
for i in range(n-1):
    if b[i]!=b[i+1]:
        a=a+1
print(a)


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  int newcommer = 0;
  cin >> N;
  vector<string> S;

  for(int i=0; i<N; i++) {
    string check;
    cin >> check;
    bool precedented = false;
    for(si : S) {
      if(si == check) precedented = true;
    }
    if(precedented == false) S.push_back(check);
  }

  cout << S.size() << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: found ':' in nested-name-specifier, expected '::'
   14 |     for(si : S) {
      |            ^
      |            ::
a.cc:14:9: error: 'si' has not been declared
   14 |     for(si : S) {
      |         ^~
a.cc:17:5: error: expected primary-expression before 'if'
   17 |     if(precedented == false) S.push_back(check);
      |     ^~
a.cc:16:6: error: expected ';' before 'if'
   16 |     }
      |      ^
      |      ;
   17 |     if(precedented == false) S.push_back(check);
      |     ~~
a.cc:17:5: error: expected primary-expression before 'if'
   17 |     if(precedented == false) S.push_back(check);
      |     ^~
a.cc:16:6: error: expected ')' before 'if'
   16 |     }
      |      ^
      |      )
   17 |     if(precedented == false) S.push_back(check);
      |     ~~
a.cc:14:8: note: to match this '('
   14 |     for(si : S) {
      |        ^
Language: C

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

int main() {
  int N;
  cin >> N;
  vector<string> S(N);
  map<string,int> c;
  for(int i=0;i<N;i++){
    cin >> S.at(i);
    if(c.count(S.at(i)))
      c[S.at(i)]++;
      else
        c[S.at(i)]=1;
  }
    cout << c.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(N);
  map<string,int> c
  for(int i=0;i<N;i++){
    cin >> S.at(i);
    if(c.count(S.at(i)))
      c[S.at(i)]++;
      else
        c[S.at(i)]=1;
  }
    cout << c.size() << endl; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected initializer before 'for'
    9 |   for(int i=0;i<N;i++){
      |   ^~~
a.cc:9:15: error: 'i' was not declared in this scope
    9 |   for(int i=0;i<N;i++){
      |               ^
a.cc:16:13: error: 'c' was not declared in this scope
   16 |     cout << c.size() << endl;
      |             ^
Language: C++

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


struct S {
	std::string first_name;
	std::string last_name;
};
bool operator==(const S& lhs, const S& rhs) {
	return lhs.first_name == rhs.first_name && lhs.last_name == rhs.last_name;
}

// カスタムハッシュ関数は独立した関数オブジェクトにできます。
struct MyHash
{
	std::size_t operator()(S const& s) const noexcept
	{
		std::size_t h1 = std::hash<std::string>{}(s.first_name);
		std::size_t h2 = std::hash<std::string>{}(s.last_name);
		return h1 ^ (h2 << 1); // または boost::hash_combine を使用します。
	}
};

using namespace std;

template<> struct hash<S>
{
	std::size_t operator()(S const& s) const noexcept
	{
		std::size_t h1 = std::hash<std::string>{}(s.first_name);
		std::size_t h2 = std::hash<std::string>{}(s.last_name);
		return h1 ^ (h2 << 1); // または boost::hash_combine を使用します。
	}
};

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


Compiler output:
a.cc:26:19: error: explicit specialization of 'template<class _Tp> struct std::hash' outside its namespace must use a nested-name-specifier [-fpermissive]
   26 | template<> struct hash<S>
      |                   ^~~~~~~
Language: C++

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

int main()
{
 int N;
 vector<string> S(N);
 for (int i; i<N; i++)
 {
 cin >> S.at(i);
 }
  int c=0; 
 for (int i=0; i<N; i++)
 { modoru: ;
   for (int j=0; j<N; j++)
    {
      if(s.at(i)==s.at(j)) goto puls;
    }
 }
plus: c++;
goto modoru;
cout << N-c <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:10: error: 's' was not declared in this scope
   17 |       if(s.at(i)==s.at(j)) goto puls;
      |          ^
a.cc:14:4: error: jump to label 'modoru'
   14 |  { modoru: ;
      |    ^~~~~~
a.cc:21:6: note:   from here
   21 | goto modoru;
      |      ^~~~~~
a.cc:13:11: note:   skips initialization of 'int i'
   13 |  for (int i=0; i<N; i++)
      |           ^
a.cc:17:33: error: label 'puls' used but not defined
   17 |       if(s.at(i)==s.at(j)) goto puls;
      |                                 ^~~~
Language: C

#include<stdio.h>
int hash[100000010][20]={0};
long long pre[30];
int main(){
  int n,i,j,len;
  char s[50];
  scanf("%d",&n);
  pre[0]=1;
  pre[1]=26;
  pre[2]=243;
  pre[3]=432;
  pre[4]=874;
  pre[5]=321;
  pre[6]=12;
  pre[7]=9;
  pre[8]=23;
  pre[9]=1223;
  pre[10]=231;
  for (i=1;i<=n;i++)
  {scanf("%s",s);
   len=0;
   while (s[len]!=0) len++;
   long long sum=0;
   for (j=0;j<len;j++){
   	long long v=s[j]-96;
   	 sum=((sum+v*pre[j])%100000007+100000007)%100000007;
   }
   sum=((sum*10+len)%100000007+100000007)%100000007;
   hash[sum][len]=1;
	  }	
   int ans=0;
   for (i=0;i<100000007;i++)
    for (j=1;j<=10;j++)
     if (hash[i][j]==1)
       ans++;
    printf("%d",ans);
} 

Compiler output:
/tmp/ccdZ0zrd.o: in function `main':
main.c:(.text+0x26): relocation truncated to fit: R_X86_64_PC32 against symbol `pre' defined in .bss section in /tmp/ccdZ0zrd.o
main.c:(.text+0x31): relocation truncated to fit: R_X86_64_PC32 against symbol `pre' defined in .bss section in /tmp/ccdZ0zrd.o
main.c:(.text+0x3c): relocation truncated to fit: R_X86_64_PC32 against symbol `pre' defined in .bss section in /tmp/ccdZ0zrd.o
main.c:(.text+0x47): relocation truncated to fit: R_X86_64_PC32 against symbol `pre' defined in .bss section in /tmp/ccdZ0zrd.o
main.c:(.text+0x52): relocation truncated to fit: R_X86_64_PC32 against symbol `pre' defined in .bss section in /tmp/ccdZ0zrd.o
main.c:(.text+0x5d): relocation truncated to fit: R_X86_64_PC32 against symbol `pre' defined in .bss section in /tmp/ccdZ0zrd.o
main.c:(.text+0x68): relocation truncated to fit: R_X86_64_PC32 against symbol `pre' defined in .bss section in /tmp/ccdZ0zrd.o
main.c:(.text+0x73): relocation truncated to fit: R_X86_64_PC32 against symbol `pre' defined in .bss section in /tmp/ccdZ0zrd.o
main.c:(.text+0x7e): relocation truncated to fit: R_X86_64_PC32 against symbol `pre' defined in .bss section in /tmp/ccdZ0zrd.o
main.c:(.text+0x89): relocation truncated to fit: R_X86_64_PC32 against symbol `pre' defined in .bss section in /tmp/ccdZ0zrd.o
main.c:(.text+0x94): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include<map>
using namespace std;


int main(){
  int N;
  cin>>N;
  string s;
  map<string,int> m;
  
  for(int i=0;i<N;i++){
    cin>>s;
    if(m[s]==0){
      m[s]=1;
    }else{
      m.at(s)++;
    }
  }
  cout<<m.size();
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin>>N;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<map>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:8:3: error: 'string' was not declared in this scope
    8 |   string s;
      |   ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    1 | #include<map>
  +++ |+#include <string>
    2 | using namespace std;
a.cc:9:17: error: template argument 3 is invalid
    9 |   map<string,int> m;
      |                 ^
a.cc:9:17: error: template argument 4 is invalid
a.cc:12:10: error: 's' was not declared in this scope
   12 |     cin>>s;
      |          ^
a.cc:16:9: error: request for member 'at' in 'm', which is of non-class type 'int'
   16 |       m.at(s)++;
      |         ^~
a.cc:19:3: error: 'cout' was not declared in this scope
   19 |   cout<<m.size();
      |   ^~~~
a.cc:19:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:11: error: request for member 'size' in 'm', which is of non-class type 'int'
   19 |   cout<<m.size();
      |           ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
  cin>>N;
  
  vector<char> A(N);
  for(int i=0;i<N;i++){
 cin>>A[i];
  }
  int a=0;
  for(int i=0;i<N;i++){
    string S =A[i];
    for(int j=1;j<N;j++){
   
      if(A[i]!=A[j]&&1<=S.size()&&10>=S.size()){
      a++;
       }
    
    }
    
  }
  cout<<a<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   13 |     string S =A[i];
      |                  ^
Language: C++

#include<iostream>
#include<cstdio> 
#include<cstring>
#include<string>
#include<map> 
#define Mod 998244353
using namespace std;
long long n,m,tot;
char a[200];
bool use[4000000000];
map<int,char> pc;
int main()
{
//	freopen("1.txt","r",stdin);
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		 scanf("%s",&a);
		 m=0;
		 for(int j=0;j<strlen(a);j++)
		 {
		 	m=(m*1313131+(int)a[j]+3131313131)%3131313131;
		 }
		 m=((m%3131313131)+3131313131)%3131313131;
		 if(use[m]==0) 
		 {
		 	tot++;
		 	use[m]=1;
		 }
	}
	cout<<tot;
}

Compiler output:
/tmp/ccQHihYB.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x1e3): relocation truncated to fit: R_X86_64_PC32 against symbol `pc' defined in .bss section in /tmp/ccQHihYB.o
a.cc:(.text+0x1fc): relocation truncated to fit: R_X86_64_PC32 against symbol `pc' defined in .bss section in /tmp/ccQHihYB.o
collect2: error: ld returned 1 exit status