criyle/codenet-compile-errors huggingface dataset:
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 = stringvalueOf(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:16: error: 'stringvalueOf' was not declared in this scope
   13 |     string S = stringvalueOf(A[i]);
      |                ^~~~~~~~~~~~~
Language: C++

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

int main() {
  int N;
  cin>>N;
  string S[N];
  int ans=0;
  for(int i=0;i<N;i++){
    cin>>S[i];
    for(int a=0,a<N,a++){
      if(S[i]=S[a]){
        ans++;
      }
    }
  }
  cout<<ans-N<<endl;
}
    
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: expected ';' before '<' token
   11 |     for(int a=0,a<N,a++){
      |                  ^
      |                  ;
a.cc:11:18: error: expected primary-expression before '<' token
a.cc:11:24: error: expected ';' before ')' token
   11 |     for(int a=0,a<N,a++){
      |                        ^
      |                        ;
a.cc:12:14: error: could not convert 'S[i].std::__cxx11::basic_string<char>::operator=(S[a])' from 'std::__cxx11::basic_string<char>' to 'bool'
   12 |       if(S[i]=S[a]){
      |          ~~~~^~~~~
      |              |
      |              std::__cxx11::basic_string<char>
Language: Java

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

Compiler output:
Main.java:4: error: cannot find symbol
    Scanner scan = new scanner(System.in);
                       ^
  symbol:   class scanner
  location: class Main
Main.java:7: error: incompatible types: String cannot be converted to String[]
    String[] s = new String();
                 ^
2 errors
Language: C

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

char s[200000][10];
char s1[200000][10] = { NULL }; //s1なんかNULLで初期化してやる!(キレ気味)

int main()
{
	int n;
	scanf("%d", &n);
	for (int i = 0; i != n; i++) 
	{
		scanf("%s", &s[i]);
	}
	
	int a = 0;
	bool c = false;



	for (int i = 0; i != n; i++)
	{
		int j;
		c = false;
		for (j = 0; j != a; j++)
		{
			if (!strcmp(s[i], s[j])) {
				c = true;
				break;
			}
		}
		if (!c) 
		{
			a++;
			strcpy(s1[j + 1], s[i]);
		}
	}

	printf("%d", a);

	return 0;
}

Compiler output:
main.c:5:25: error: initialization of 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
    5 | char s1[200000][10] = { NULL }; //s1なんかNULLで初期化してやる!(キレ気味)
      |                         ^~~~
main.c:5:25: note: (near initialization for 's1[0][0]')
main.c: In function 'main':
main.c:17:9: error: unknown type name 'bool'
   17 |         bool c = false;
      |         ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include <string.h>
  +++ |+#include <stdbool.h>
    3 | 
main.c:17:18: error: 'false' undeclared (first use in this function)
   17 |         bool c = false;
      |                  ^~~~~
main.c:17:18: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:17:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:28:37: error: 'true' undeclared (first use in this function)
   28 |                                 c = true;
      |                                     ^~~~
main.c:28:37: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include<bits/stdc++.h>
using namespace std;
map<string,int>mp;

int main(){
	int t;
	cin >> t;
	int cnt=0;
	while(t--){
		string inp;
		cin >> inp;
		if(mp[inp]==0) {
			mp.insert(pair<string,int>(inp,1));
			mp[inp]=1;
			cnt++;
			//cout << mp["apple"] << "\n";
		}
	}
	cout << cnt << "\n";
}

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;
  set <string> s;
  while(n--){
      string str;
    cin>>str;
    s.insert(str);
  }
  cout<<str.size()<<"\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'str' was not declared in this scope; did you mean 'std'?
   12 |   cout<<str.size()<<"\n";
      |         ^~~
      |         std
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
	ll n,sum,a[1225]={0},count=0;
	char s[15];
	cin>>n;
	getchar();
	while(n--)
	{
		gets(s);
		sum = 0;
		for(int i=0; i<strlen(s); i++)
		{
			sum += s[i];
		}
		a[sum]++;
	}
	
	for(int i=97; i<=1220; i++)
	{
		if(a[i] > 0)
		{
			count++;
		}
	}
	cout<<count<<endl;
	return 0;	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
   12 |                 gets(s);
      |                 ^~~~
      |                 getw
Language: C++

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

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    unordered_set<string> set;
    long long int n;
    cin>>n;
    while(n!=0)
    { 
      string s;
      cin>>s;
      set.insert(s);
      n--;
    }
    cout<<s.size()<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: 's' was not declared in this scope
   18 |     cout<<s.size()<<endl;
      |           ^
Language: C

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

int main(){
  int n;
  scanf("%d", &n);
  char s[n][10] = {0};
  for(int i = 0; i < n; i++){
    scanf("%s", &s[i]);
  }
  
  char tmp[10] = {0};
  strcpy(tmp, s[0]);
  int count = 1;
  for(int j = 0; j < n; j++){
    if(strcmp(s[j], tmp) != 0){
      count++;
    }
  }
  
  printf("%d", count);
  return 0;
}
  
  


Compiler output:
main.c: In function 'main':
main.c:7:19: error: variable-sized object may not be initialized except with an empty initializer
    7 |   char s[n][10] = {0};
      |                   ^
Language: C++

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

int main(void){
    int n;
    cin >> n;
    vector<string> a;
    string aa;
    for(int j=0;j<=n-1;j++){
        cin >> aa;
        for(int i=0;i<a.size();i++){
            if(a[i] == aa){
                goto aaa;
            }
        }
        a.push_back(aa);
        aaa:;
    }
    cout << a.size() << endl;
}#include<iostream>
#include<vector>
#include<string>
#include <algorithm>
using namespace std;

int main(void){
    int n;
    cin >> n;
    vector<string> a;
    string aa;
    for(int j=0;j<=n-1;j++){
        cin >> aa;
        for(int i=0;i<a.size();i++){
            if(a[i] == aa){
                goto aaa;
            }
        }
        a.push_back(aa);
        aaa:;
    }
    cout << a.size() << endl;
}

Compiler output:
a.cc:23:2: error: stray '#' in program
   23 | }#include<iostream>
      |  ^
a.cc:23:3: error: 'include' does not name a type
   23 | }#include<iostream>
      |   ^~~~~~~
a.cc:29:5: error: redefinition of 'int main()'
   29 | int main(void){
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main(void){
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
char list[200001][11];

int main() {
	int N,i,j,num=0;
	char S[11];
	bool chk=0;
	cin >>N;
	for (i = 0; i < N; i++) {
		cin >> S;
		for (j = 0; j < num; j++) {
			if (strcmp(list[j], S)==0) {
				chk = 1;
				break;
			}
		}
		if (!chk) {
			strcpy(list[num], S);
			num++;
			chk = 0;
		}
	}
	cout << num << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:29: error: 'strcmp' was not declared in this scope
   13 |                         if (strcmp(list[j], S)==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 | using namespace std;
a.cc:19:25: error: 'strcpy' was not declared in this scope
   19 |                         strcpy(list[num], S);
      |                         ^~~~~~
a.cc:19:25: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <bits/stdc++.h>
 using namespace std;
 int main(void){
     // Your code here
     int N,i,j;
     int count = 0;
     string s;
     cin >> N;
     vector<string> S(N);
     for(i=0;i<N;i++){
     	cin >> s;
     	for(j=0;j<N;j++){
     		if(S.at[j]==s){
     			count++;
     			break;
     		}
     	}
     }
     
     cout << count;
     
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   13 |                 if(S.at[j]==s){
      |                        ^
Language: C++

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

int main() {
  int N, count = 0;
  cin >> N;
  string gacha;
  vector<string> goods(N, "");
  for (int i = 0; i < N; i++) {
    cin >> gacha;
    for (int j = 0; j < i+1; j++) {
      if (goods.at(j) == gacha) {
        break;
      } else if (goods.at(j) == "") {
        goods.at(j) = gacha;
        count = count + 1;
        break
      }
    }
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: expected ';' before '}' token
   17 |         break
      |              ^
      |              ;
   18 |       }
      |       ~
Language: C++

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

int main() {
  int N,re;cin >> N;
  
  vector<string>  str(N);
  for (int i=0; i++ ; i<N){
    cin >> str.at(i);
  }
  auto new_str = unique(str.begin() ,str.end() );
  str.erase(new_str,str.end())
  re = str.size()
  cout >> re >> endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:31: error: expected ';' before 're'
   12 |   str.erase(new_str,str.end())
      |                               ^
      |                               ;
   13 |   re = str.size()
      |   ~~
Language: C

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define MOD 1000000007
#define all(ppp) ppp.begin(),ppp.end()
#define out(ppp) cout<<(ppp)<<endl
#define out1(ppp) cout<<(ppp) 
#define MAX_CHAR 256

#define FOR(i, a, b) for (int i=a; i<(b); i++)
#define F0R(i, a) for (int i=0; i<(a); i++)
#define FORd(i,a,b) for (int i = (b)-1; i >= a; i--)
#define F0Rd(i,a) for (int i = (a)-1; i >= 0; i--)
#define pb push_back

typedef long double ld;
typedef complex<ld> cd;
 
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<vi> vvi;
typedef vector<bool> vb;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<cd> vcd;
typedef vector<vpi> vvpi;

typedef set<pi> spi;

const int INF=INT_MAX;

void solve(){
    int N;
    cin>>N;
    map<string,int> mp;
    for(int i=0;i<N;i++){
        string s;
        cin>>s;
        mp[s]++;
    }
    out(mp.size());

}

int main(){
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    solve();
    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<iostream>
#include<vector>
#include<string>
using namespace std;

int main(void){
    int n;
    cin >> n;
    vector<string> a;
    string aa;
    for(int i=0;i<=n-1;i++){
        cin >> aa;
        for(int i=0;i<a.size();i++){
            if(a[i] == aa){
                goto aaa;
            }
        }
        a.push_back(aa);
        aaa:;
    }
    cout << a.size() << endl;
}#include<iostream>
#include<vector>
#include<string>
using namespace std;

int main(void){
    int n;
    cin >> n;
    vector<string> a;
    string aa;
    for(int i=0;i<=n-1;i++){
        cin >> aa;
        for(int i=0;i<a.size();i++){
            if(a[i] == aa){
                goto aaa;
            }
        }
        a.push_back(aa);
        aaa:;
    }
    cout << a.size() << endl;
}

Compiler output:
a.cc:22:2: error: stray '#' in program
   22 | }#include<iostream>
      |  ^
a.cc:22:3: error: 'include' does not name a type
   22 | }#include<iostream>
      |   ^~~~~~~
a.cc:27:5: error: redefinition of 'int main()'
   27 | int main(void){
      |     ^~~~
a.cc:6:5: note: 'int main()' previously defined here
    6 | int main(void){
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
 using namespace std;
 int main(void){
     // Your code here
     int N,i,j;
     int count = 0;
     string s;
     cin >> N;
     vector<string> S[N];
     for(i=0;i<N;i++){
     	cin >> s;
     	for(j=0;j<N;j++){
     		if(S.at[j]==s){
     			count++;
     			break;
     		}
     	}
     }
     
     cout << count;
     
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: request for member 'at' in 'S', which is of non-class type 'std::vector<std::__cxx11::basic_string<char> > [N]'
   13 |                 if(S.at[j]==s){
      |                      ^~
Language: C++

#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
//999983
int n,ans;
const long long mod=999983;
const long long qwq=233;
long long sum=0;
bool judge[1000000],flag=0;
bool hash(char s[])
{
	int len=strlen(s);
    sum=0;
	for (int j=0;j<len;j++)
	{
		sum=(sum*qwq+int(s[j]))%mod;
	}
	printf("%d\n",sum);
	if (judge[sum]==0)
	{
		judge[sum]=1;
		return 1;
	}
	else
	   return 0;
	
}
int main()
{
	scanf("%d",&n);
	char a[15];
	for (int i=1;i<=n;i++)
	{
		scanf("%s",&a);
		if (hash(a))
		{
			ans++;
		}
	}
	
	printf("%d",ans);
	
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:36:21: error: reference to 'hash' is ambiguous
   36 |                 if (hash(a))
      |                     ^~~~
In file included from /usr/include/c++/14/string_view:50,
                 from /usr/include/c++/14/bits/basic_string.h:47,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:11:6: note:                 'bool hash(char*)'
   11 | bool hash(char s[])
      |      ^~~~
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 = string.valueOf(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:22: error: expected primary-expression before '.' token
   13 |     string S = string.valueOf(A[i]);
      |                      ^
Language: C++

#include <bits/stdc++.h>
 using namespace std;
 int main(void){
     // Your code here
     int N,i;
     int count = 0;
     string s;
     cin >> N;
     vector<string> S[N];
     for(i=0;i<N;i++){
     	cin >> s;
     	for(j=0;j<N;j++){
     		if(S.at[j]==s){
     			count++;
     			break;
     		}
     	}
     }
     
     cout << count;
     
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'j' was not declared in this scope
   12 |         for(j=0;j<N;j++){
      |             ^
a.cc:13:22: error: request for member 'at' in 'S', which is of non-class type 'std::vector<std::__cxx11::basic_string<char> > [N]'
   13 |                 if(S.at[j]==s){
      |                      ^~
Language: C

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

int main(void)
{
	int z,i,N,s_count[200000],total=0,c[10],count,j;
	char s[10][200000][10],d[10];
	for(i=0;i<10;i++)c[i]=0;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%s",d);
		count=strlen(d);
		if(c[count-1]==0){
			for(j=0;j<count;j++){
				s[count-1][c[count-1]][j]=d[j];
			}
			c[count-1]++;
			total++;
		}else{
			for(j=0;j<c[count-1];j++){
				if(strcmp(d,s[count-1][j])1==0)break;
			}
			if(j==c[count-1]){
				for(z=0;z<count;z++){
					s[count-1][j][z]=d[z];
				}
				c[count-1]++;
				total++;
			}
		}
	}
	printf("%d",total);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:59: error: expected ')' before numeric constant
   21 |                                 if(strcmp(d,s[count-1][j])1==0)break;
      |                                   ~                       ^
      |                                                           )
Language: C++

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

int main() {
  int N,re;cin >> N;
  
  vector<string>  str(N);
  for (int i=0,i++,i<N){
    cin >> str.at(i);
  }
  auto new_str = unique(str.begin() ,str.end() );
  str.erase(new_str,str.end())
  re = str.size()
  cout >> re >> endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected ';' before '++' token
    8 |   for (int i=0,i++,i<N){
      |                 ^~
      |                 ;
a.cc:8:19: error: expected primary-expression before ',' token
    8 |   for (int i=0,i++,i<N){
      |                   ^
a.cc:8:23: error: expected ';' before ')' token
    8 |   for (int i=0,i++,i<N){
      |                       ^
      |                       ;
a.cc:12:31: error: expected ';' before 're'
   12 |   str.erase(new_str,str.end())
      |                               ^
      |                               ;
   13 |   re = str.size()
      |   ~~
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 = "";
        int a = 0;
        boolean flg = true;
        String[] texts = new String[10000];
        int count = Integer.parseInt(sc.next());

        for(int i = 0; i < count; i++) {
            text = sc.next();
            for(String item : texts) {
                if(text.equals(item)) {
                    flg = false;
                    break;
                }
            }
            if(flg) {
                texts[a] = text;
                a++;
            }
            System.gc();
        }
        System.out.print(a);
    }
}

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();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() { return Double.parseDouble(next());}
}

Compiler output:
Main.java:3: error: <identifier> expected
import java.util.;
                 ^
1 error
Language: C++

#include<iostream>
using namespace std;

int main() {
  int N;
  vector<string> sss(N);
  for (int i = 0; i < N; i++) {
    cin >> sss.at(i);
  }
  for (int i = 0; i < N; i++) {
    set<string> S;
    S.insert(sss.at(i));
  }
  cout << S.size() << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<string> sss(N);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:6:16: error: expected primary-expression before '>' token
    6 |   vector<string> sss(N);
      |                ^
a.cc:6:18: error: 'sss' was not declared in this scope
    6 |   vector<string> sss(N);
      |                  ^~~
a.cc:11:5: error: 'set' was not declared in this scope
   11 |     set<string> S;
      |     ^~~
a.cc:2:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
    1 | #include<iostream>
  +++ |+#include <set>
    2 | using namespace std;
a.cc:11:15: error: expected primary-expression before '>' token
   11 |     set<string> S;
      |               ^
a.cc:11:17: error: 'S' was not declared in this scope
   11 |     set<string> S;
      |                 ^
a.cc:14:11: error: 'S' was not declared in this scope
   14 |   cout << S.size() << endl;
      |           ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  int S =0;
  vector<string> k(N)
  for(int i=0;i<N;i++){
    cin >> k.at(i);
    if(i==0){
      S++;
    }
    else if(k.at(i)!=k.at(i-1)){
      S++;
    }
  }
  cout<<S<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' 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++){
      |               ^
Language: C

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

int n,cnt=1;
string s[200005];

int main()
{
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>s[i];
	}
	sort(s,s+n);
	for(int i=1;i<n;i++)
	{
		if(s[i]!=s[i-1]) cnt++;
	}
	cout<<cnt;
	return 0;
}

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

#include<iostream>
#include <algorithm>
#include<cstdio>
#include<string>
#include<math.h>
#include<vector>
#include <queue>
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
#define srep(i,s,t) for (int i = s; i < t; i++)
#define drep(i,n) for(int i = (n)-1; i >= 0; i--)
#define MOD 1000000007
#define MAX 100000
using namespace std;
typedef vector<vector<char>> field_t;

typedef pair<int, int> point_t;

int main()
{
	int N,i,j,m;
	m=0;
	cin >> N ;
	vector<string> S(N);
	rep(i,N){
		cin>>S[i];
		m++;
		if(i>0){
			srep(j,i){
				if(S[i].compare(S[j])==0){
					m--;
					break;
				}
			}
		}
	}
	cout<<m<<endl;
	return 0;

}

Compiler output:
a.cc:29:33: error: macro "srep" requires 3 arguments, but only 2 given
   29 |                         srep(j,i){
      |                                 ^
a.cc:10:9: note: macro "srep" defined here
   10 | #define srep(i,s,t) for (int i = s; i < t; i++)
      |         ^~~~
a.cc: In function 'int main()':
a.cc:29:25: error: 'srep' was not declared in this scope
   29 |                         srep(j,i){
      |                         ^~~~
Language: C

#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REPR(i, n) for(int i = (int)(n); i >= 0; i--)
#define FOR(i, s, n) for (int i = (s); i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;

ll N, K, T, W, H, M, C;

const int MAX = 5100000;
const ll MOD = 1e9 + 7;

const double PI=3.14159265358979323846;


long long fac[MAX], finv[MAX], inv[MAX];

vector<double> cx, cy, c;
 ll MM = 1e12;

void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

long long COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

std::vector<int> Eratosthenes(int n ){
    std::vector<bool> is_prime( n + 1 );
    for( int i = 0; i <= n; i++ ) is_prime[ i ] = true;
    std::vector<int> P;
    for( int i = 2; i <= n; i++ ){
        if( is_prime[ i ] ){
            for( int j = 2 * i; j <= n; j += i ){
                is_prime[ j ] = false;
            }
            P.emplace_back( i );
        }
    }
    return P;
}

ll gcd(ll a, ll b) {
  if(a < b) return gcd(b, a);
  ll r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
}

ll lcm(ll a, ll b)
{
   return a * b / gcd(a, b);
}

  /*
int main(){
    string str;
    cin >> str;
    N = str.size();
    int sub = 0;
    int p10 = 1;
    vector<int> v(2019, 0);
    for(int i = N-1; i >= 0; --i){
        sub = (sub + (str[i] - '0')*p10) % 2019;
        ++v[sub];
        p10 = (p10 * 10) % 2019;
    }
    ll ans = 0;
    for(auto u:v) ans += u*(u-1)/2;
    if(v[0] == 1) ++ans;
    cout << ans;
    return 0;
}
*/
int main(){
    cin >> N;
    vector<string> v;
    string str;
    for(int i = 0; i < N; ++i) {cin >> str; v.push_back(str);}
    sort(ALL(v));
    str = v[0];
    int ans = 1;
    for(int i = 1; i < N; ++i){
        if(v[i] == str) continue;
        ++ans;
        str = v[i];
    }
    cout << ans;
    return 0;
}

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

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
using namespace std;
int main(){
  int n;
  cin >> n;
  string s[n];
  
  rep(i,n){
    string a;
    cin >> a;
    s[i] = a;
  }
  int ans = s.size();
  
  sort(s.begin(),s.end());
  
  rep1(i,n-1){
    if(s[i] == s[i-1]){
      ans--;
    }
  }
  cout << s.size() << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: request for member 'size' in 's', which is of non-class type 'std::string [n]' {aka 'std::__cxx11::basic_string<char> [n]'}
   15 |   int ans = s.size();
      |               ^~~~
a.cc:17:10: error: request for member 'begin' in 's', which is of non-class type 'std::string [n]' {aka 'std::__cxx11::basic_string<char> [n]'}
   17 |   sort(s.begin(),s.end());
      |          ^~~~~
a.cc:17:20: error: request for member 'end' in 's', which is of non-class type 'std::string [n]' {aka 'std::__cxx11::basic_string<char> [n]'}
   17 |   sort(s.begin(),s.end());
      |                    ^~~
a.cc:24:13: error: request for member 'size' in 's', which is of non-class type 'std::string [n]' {aka 'std::__cxx11::basic_string<char> [n]'}
   24 |   cout << s.size() << endl;
      |             ^~~~
Language: C

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

struct str{
    char S[11];
};

int main(void){
    int N,i,j,ans=0;
    char jug[2]={0,EOF};
    scanf("%d",&N);
    str *St;
    St=(str*)malloc(sizeof(str)*N);
    for(i=0;i<N;i++){
        scanf("%s",St[i].S);
    }
    for(i=0;i<N;i++){
        if(strcmp(St[i].S,jug)!=0){
            ans++;
            for(j=i+1;j<N;j++){
                if(strcmp(St[i].S,St[j].S)==0){
                    strcpy(St[j].S,jug);
                }
            }
        }
    }
    printf("%d\n",ans);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:5: error: unknown type name 'str'; use 'struct' keyword to refer to the type
   13 |     str *St;
      |     ^~~
      |     struct 
main.c:14:9: error: 'str' undeclared (first use in this function)
   14 |     St=(str*)malloc(sizeof(str)*N);
      |         ^~~
main.c:14:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:13: error: expected expression before ')' token
   14 |     St=(str*)malloc(sizeof(str)*N);
      |             ^
main.c:16:25: error: request for member 'S' in something not a structure or union
   16 |         scanf("%s",St[i].S);
      |                         ^
main.c:19:24: error: request for member 'S' in something not a structure or union
   19 |         if(strcmp(St[i].S,jug)!=0){
      |                        ^
main.c:22:32: error: request for member 'S' in something not a structure or union
   22 |                 if(strcmp(St[i].S,St[j].S)==0){
      |                                ^
main.c:22:40: error: request for member 'S' in something not a structure or union
   22 |                 if(strcmp(St[i].S,St[j].S)==0){
      |                                        ^
main.c:23:33: error: request for member 'S' in something not a structure or union
   23 |                     strcpy(St[j].S,jug);
      |                                 ^
Language: C

#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<queue>
#include<stack>
#include<vector>
#include<map>
using namespace std;

int read(){
	int x=0,f=1;
	char c=getchar();
	while(!isdigit(c)){if(c=='-')f=-1;c=getchar();}
	while(isdigit(c)){x=(x<<3)+(x<<1)+c-48;c=getchar();}
	return x*f;
}

int k,m,n;
map<string,int> M;
string s;
int main(){
	n=read();
	int ans=0;
	for(register int i=1;i<=n;i++){
		cin>>s;
		if(M[s])continue;
		M[s]=1;ans++;
	}
	printf("%d\n",ans);
	return 0;
}

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

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

int main(void){
    double n,dummy,i=0;
    char c;
    char s[1000];
    dummy=scanf("%lf",&n);
    while(fgets(c,sizeof(c),stdin)!=NULL){
        s[i]=c;
        i++;
    }
    int j,k,flag=0,count=0;
    for(j=0;j<i;j++){
        for(k=0;k<j;k++){
            if(strcmp(s[k],s[j])==0){
                flag=1;
            }
        }
        if(flag==0){
            count++;
        }
        flag=0;
    }
    printf("%d",count);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:17: error: passing argument 1 of 'fgets' makes pointer from integer without a cast [-Wint-conversion]
    9 |     while(fgets(c,sizeof(c),stdin)!=NULL){
      |                 ^
      |                 |
      |                 char
In file included from main.c:1:
/usr/include/stdio.h:654:38: note: expected 'char * restrict' but argument is of type 'char'
  654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      |                     ~~~~~~~~~~~~~~~~~^~~
main.c:10:10: error: array subscript is not an integer
   10 |         s[i]=c;
      |          ^
main.c:16:24: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   16 |             if(strcmp(s[k],s[j])==0){
      |                       ~^~~
      |                        |
      |                        char
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:16:29: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   16 |             if(strcmp(s[k],s[j])==0){
      |                            ~^~~
      |                             |
      |                             char
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
Language: C

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

int main()
{
	int n;
  	cin >> n;
  	vector<string> gacha(n);
  	for(int i = 0; i < n; i++)
    {
    	cin >> gacha.at(i);
    }
  	sort(gacha.begin(),gacha.end());
  	int count = 1;
  	for(int i = 0; i < n-1; i++)
    {
    	if(gacha.at(i) != gacha.at(i+1))
        {
        	count++;
        }
    }
  	cout << count << 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: C++

int main(){
    int n;
    cin >> n;
    string s[n];
    set<string>S;
    int count = 0;
    for(int i=0;i<n;i++){
        cin >> s[i];
        S.insert(s[i]);
    }
    cout << S.size() << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> n;
      |     ^~~
a.cc:4:5: error: 'string' was not declared in this scope
    4 |     string s[n];
      |     ^~~~~~
a.cc:5:5: error: 'set' was not declared in this scope
    5 |     set<string>S;
      |     ^~~
a.cc:5:16: error: 'S' was not declared in this scope
    5 |     set<string>S;
      |                ^
a.cc:8:16: error: 's' was not declared in this scope
    8 |         cin >> s[i];
      |                ^
a.cc:11:5: error: 'cout' was not declared in this scope; did you mean 'count'?
   11 |     cout << S.size() << endl;
      |     ^~~~
      |     count
a.cc:11:25: error: 'endl' was not declared in this scope
   11 |     cout << S.size() << endl;
      |                         ^~~~
Language: C

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

int main(){
  int n;
  cin>>n;
  vector<string> data(n);
  for(int i=0;i<data.size();i++){
    cin>>data.at(i);
  }
  int count=1;
  for(int i=1;i<data.size();i++){
    if(!(data.at(0)==data.at(i))){
      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;
	int c = 0;
	int g = 0;
	int f = 0;
	cin >> n;
	vector<string> s(n);
	vector<string> t(n);
	for (int i = 0; i < n; i++) {
		cin >> s.at(i);
		if (i == 0) {
			t.at(g) = s.at(i);
			g++;
			c++;
			continue;
		}
		for (int j = 0; j < g; j++) {
			if (t.at(j) == s.at(i)) {
				f = 1;
				break;
			}
		}
		if (f == 0) {
			t.at(g) = s.at(i);
			g++;
			c++;
		}
      　f=0;
	}
	cout << c << endl;
}

Compiler output:
a.cc:31:7: error: extended character 　 is not valid in an identifier
   31 |       　f=0;
      |       ^
a.cc: In function 'int main()':
a.cc:31:7: error: '\U00003000f' was not declared in this scope
   31 |       　f=0;
      |       ^~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: expected ';' before '<' token
    9 |         for(int i = 0, i < n; i++)
      |                         ^~
      |                         ;
a.cc:9:26: error: expected primary-expression before '<' token
    9 |         for(int i = 0, i < n; i++)
      |                          ^
Language: C

#include<string.h>
#include<stdio.h>
int main(){
  long int n,cnt=0;
  char str[][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:5:8: error: array size missing in 'str'
    5 |   char str[][10];
      |        ^~~
main.c:12:17: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   12 |       if(strcmp(*str[i],*str[j])==0){
      |                 ^~~~~~~
      |                 |
      |                 char
In file included from main.c:1:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:12:25: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   12 |       if(strcmp(*str[i],*str[j])==0){
      |                         ^~~~~~~
      |                         |
      |                         char
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
Language: C

#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
using namespace std;
int main() {
    int n;
    string s;
    vector<string> ss;
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        cin >> s;
        ss.push_back(s);
    }
    sort(ss.begin(), ss.end());
    ss.erase(unique(ss.begin(), ss.end()), ss.end());
    cout << ss.size() << endl;
}


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

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
int N;
cin >> N;

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

for (int j=0;j<N-1;i++){
    if(S.at(j) != S.at(j+1)){
        ans++;
    }
    }
cout << ans <<endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: 'vector' was not declared in this scope
    8 | vector<string> S;
      | ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:8:14: error: expected primary-expression before '>' token
    8 | vector<string> S;
      |              ^
a.cc:8:16: error: 'S' was not declared in this scope
    8 | vector<string> S;
      |                ^
a.cc:13:1: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 | sort(S.begin(),S.end());
      | ^~~~
      | short
a.cc:15:20: error: 'i' was not declared in this scope
   15 | for (int j=0;j<N-1;i++){
      |                    ^
a.cc: At global scope:
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

#include <iostream>
#include <vector>
#include <memory>

int main(int argc, const char * argv[]) {
    int N;
    std::cin >> N;
    std::string str;
    std::vector<std::string> vec;
    
    for(int i=0;i<N;i++){
        std::cin >> str;
        vec.push_back(str);
    }
    
    std::sort(vec.begin(), vec.end());
    vec.erase(std::unique(vec.begin(), vec.end()), vec.end());
        
    // insert code here...
    std::cout << vec.size();
    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:16:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   16 |     std::sort(vec.begin(), vec.end());
      |          ^~~~
      |          qsort
a.cc:17:20: error: 'unique' is not a member of 'std'
   17 |     vec.erase(std::unique(vec.begin(), vec.end()), vec.end());
      |                    ^~~~~~
Language: C

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

int main(void){
    int n;
    cin >> n;
    vector<string> a;
    for(int i=0;i<=n-1;i++){
        string aa;
        cin >> aa;
        for(int i=0;i<a.size();i++){
            if(a[i] == aa){
                goto aaa;
            }
        }
        a.push_back(aa);
        aaa:;
    }
    cout << a.size() << endl;
}

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

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

int n;

int main()
{
    cin >> n;
    set<string> st;
    rep(i, n)
    {
        string s;
        cin >> s;
        st.insert(s);
    }
    cout << st.size() << endl;
    
    return 0;
}

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

#include <stdio.h>
int main(){
int a,b,i;
int k=0;
scanf("%d",&a);
char s[a];
for(i=0;i<a;i++){
	scanf("%s",&s[i]);}
for(i=1;i<a;i++){
	for(b=0;b<a;b++){
		if(b != i){
			if(s[b] == s[i])k++;}
			}
printf("%d",a-k);
}


Compiler output:
main.c: In function 'main':
main.c:15:1: error: expected declaration or statement at end of input
   15 | }
      | ^
Language: C++

#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "ctime"
using namespace std;
int main()
{
  int n;
  cin>>n;
  set< string > ss;
  while(n--)
  {
    string s;
    cin>>s;
    ss.insert(s)
    
  }
  cout<<ss.size();
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:17: error: expected ';' before '}' token
   31 |     ss.insert(s)
      |                 ^
      |                 ;
   32 | 
   33 |   }
      |   ~
Language: C++

#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <stack>
#include <queue>
#include <cstring>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <string.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>

using namespace std;


#define ld long double
#define F first
#define S second
//
#define int long long
#define ll long long
#define db(x)                cerr<<#x<<": "<<x<<endl
#define db2(x, y)             cerr<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
#define db3(x, y, z)          cerr<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
#define db4(a, b, c, d)       cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
#define db5(a, b, c, d, e)    cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<endl
#define db6(a, b, c, d, e, f) cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<endl
//
#define mem(x,y) memset(x,y,sizeof(x))
#define bitcount    __builtin_popcount
//
#define pii pair<int, int>
#define all(v) v.begin(),v.end()
//
#define IOS ios_base::sync_with_stdio(false); cin.tie(NULL)
#define vi vector<int>
#define vvi vector< vector<int> >
#define si set<int>
#define pb push_back
#define lp(i,a,b) for(int i=a;i<b;i++)
#define rloop(i,a,b) for(int i=a;i>=b;i--)
#define mk make_pair
const int N=2e5+3;
const int mod=1e9+7;
const int mod1=998244353;
const int inf=1e16+7;
using namespace std;

void solve(){
    int n;
    cin>>n;
    string s;
    while(n--){
        cin>>s;
        mp[s]++;
    }
    cout<<mp.size();
}
 

int32_t main() {
    IOS;
    int t;
   // cin>>t;
    
    t=1;
    for(int i=1;i<=t;i++){
       // cout<<"Case #"<<i<<": ";
        solve();
        cout<<'\n';
    }
   
}

















Compiler output:
a.cc: In function 'void solve()':
a.cc:59:9: error: 'mp' was not declared in this scope; did you mean 'lp'?
   59 |         mp[s]++;
      |         ^~
      |         lp
a.cc:61:11: error: 'mp' was not declared in this scope; did you mean 'lp'?
   61 |     cout<<mp.size();
      |           ^~
      |           lp
Language: C++

#include <iostream>

using namespace std;

// 163 Sunday April 1

#define SIZE 200000
char chaines[SIZE][10];
long longueur[SIZE];

bool comparaison(long i, long j)
{
    if (longueur[i] != longueur[j])
      return(longueur[i] < longueur[j]);
    else {
      int k, flag;

      flag = 1;
      for (k=0;flag && (k<longueur[i]);k++)
        if (chaines[i][k] != chaines[j][k])
          flag = 0;
      return(chaines[i][k-1] < chaines[j][k-1]);
    }
}

bool different(long i, long j)
{
    if (longueur[i] != longueur[j])
      return true;
    else {
      int k, flag;

      flag = 1;
      for (k=0;flag && (k<longueur[i]);k++)
        if (chaines[i][k] != chaines[j][k])
          flag = 0;
      return(flag == 0);
    }
}


int main() {
 long N;

 cin >> N;
 string machaine;

long i,j;
 for (i=0;i<N;i++) {
   cin >> machaine;
   longueur[i] = machaine.length();
   for (j=0;j<longueur[i];j++)
    chaines[i][j] = machaine[j];
 }

 long pos[SIZE];

 for (i=0;i<N;i++)
   pos[i] = i;

   qsort(pos, pos + N,comparaison);

 long nombre;

if (N>0)
 nombre = 1;
else
  nombre = 0;

  for (i=1;i<N;i++) {
    if (different(pos[i],pos[i-1]))
      nombre++;
  }
  cout << nombre << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:61:19: error: invalid conversion from 'long int*' to 'size_t' {aka 'long unsigned int'} [-fpermissive]
   61 |    qsort(pos, pos + N,comparaison);
      |               ~~~~^~~
      |                   |
      |                   long int*
a.cc:61:9: error: invalid conversion from 'bool (*)(long int, long int)' to 'size_t' {aka 'long unsigned int'} [-fpermissive]
   61 |    qsort(pos, pos + N,comparaison);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
      |         |
      |         bool (*)(long int, long int)
a.cc:61:9: error: too few arguments to function 'void qsort(void*, size_t, size_t, __compar_fn_t)'
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdlib.h:970:13: note: declared here
  970 | extern void qsort (void *__base, size_t __nmemb, size_t __size,
      |             ^~~~~