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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  vector <string> S(N);
  for( int i = 0; i < N; i++){
    cin >> S.at(i);
  }
  int ans = 1;
  sort(S.begin(), S.end());
    for(int i=0; i<(N-1); i++){
      if(vec.at(i) != vec.at(i+1)){
        ans ++;
      }
    }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: 'vec' was not declared in this scope
   14 |       if(vec.at(i) != vec.at(i+1)){
      |          ^~~
Language: C

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

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

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

int main() {
    int64_t S;
    cin >> S;

    int64_t T = S;
    int count = 0;
    while (T > 0) {
        T = T / 10;
        count++;
    }

    T = S;
    int64_t U = T;
    int64_t X = 1;
    for (int i = 0; i < count - 1; i++) {
        X = X*10;
    }

    int64_t ans = 0;

    if (S < 2019) {
        cout << 0 << endl;
        return 0;
    }

    for (int i = 0; i < count; i++) {
        for (int j = i; j < count; j++) {
            }
            if (U % 2019 == 0) {
            ans++;
            }
            U = U / 10;
        }
        T = T % X;
        U = T;
        X = X / 10;
    }
    
    cout << ans << endl;
}

Compiler output:
a.cc:42:5: error: 'cout' does not name a type
   42 |     cout << ans << endl;
      |     ^~~~
a.cc:43:1: error: expected declaration before '}' token
   43 | }
      | ^
Language: C

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

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: no match for 'operator[]' (operand types are 'std::set<std::__cxx11::basic_string<char> >' and 'int')
   13 |     s.insert(s[i]);
      |               ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: no match for 'operator[]' (operand types are 'std::set<std::__cxx11::basic_string<char> >' and 'int')
   13 |     s.insert(s[i];
      |               ^
Language: C

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define ff first
#define ss second

void io(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    #ifdef LOCAL
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif
}
auto seed = chrono::high_resolution_clock::now().time_since_epoch().count();
mt19937_64 mt(seed);
#ifdef LOCAL
    #include "debug.h"
#else
    #define debug(...) 42
#endif

const int N = 2e3 + 50;
const int mod = 998244353 ;

int main(){
    io();

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

}



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 <stdio.h>
#include <cstring>

using namespace std;

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:36: error: expected primary-expression before ']' token
   16 |                         cin >> str[];
      |                                    ^
a.cc:19:49: error: expected primary-expression before ']' token
   19 |                                 if ((strcmp(str[], cmps[j])) == 0) {
      |                                                 ^
a.cc:25:55: error: expected primary-expression before ']' token
   25 |                                 strcpy(cmps[cnt], str[]);
      |                                                       ^
Language: C

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

int main(){
	map<string, int> mp;
	int n; cin >> n;
	for(int i = 0; i < n; ++i){
			string s; cin >> s;
			mp[s]++;
		}
	cout << mp.size();
	return 0;
	}


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

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

int main() {
  int N;
  cin >> N;
  vector <string> S(200010);

  int counter = 0;

  for(int i=0; i<N; i++){
    cin >> S.at(i);
  }
  sort(S.begin(),S.end());
  for(i=0;i<N-1;i++){
    if(S.at(i)!=S.at(i+1)){
      counter++;
    }
  }

  cout << counter << endl;

}


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

#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define ld long double

int main() {
	int N; cin >> N;
	map<string, int> mp;
	for (int i = 0; i < N; ++i) {
		string s; cin >> s;
		mp[s]++;
	}
	cout << mp.size() << endl;
	return 0;
}


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

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

    Set<String> set = new HashSet<>();

    while (n-- >0) {
      String s = sc.nextLine();

      set.add(s);
    }
    sc.close();

    System.out.println(set.size());
  }
}

Compiler output:
Main.java:3: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
    Set<String> set = new HashSet<>();
    ^
  symbol:   class Set
  location: class Main
Main.java:6: error: cannot find symbol
    Set<String> set = new HashSet<>();
                          ^
  symbol:   class HashSet
  location: class Main
4 errors
Language: C

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

char S[200000][10];

int comp(const void* a, const void* b){
    return strcmp(a, b);
}

int main(void){
    int N;
    int i;
    scanf("%d", &N);
    for(i=0;i<N;i++){
        scanf("%s", S[i]);
    }

    qsort(S, N, sizeof(*S), comp);

    int ans = 1;
    for(i=1;i<N;i++){
        if(strcmp(S[a[i-1]], S[a[i]]) != 0){
            ans++;
        }
    }
    printf("%d", ans);

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:23:21: error: 'a' undeclared (first use in this function)
   23 |         if(strcmp(S[a[i-1]], S[a[i]]) != 0){
      |                     ^
main.c:23:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include "bits/stdc++.h"
 
using namespace std;
 
#define sp(x) cout<<setprecision(x);
#define all(a) (a).begin(), (a).end()
#define inf 10000000
#define linf INT64_MAX*0.99
#define int long long
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define yes "Yes"
#define no "No"
#define divs 1000000007
#define dive 1000000009
#define pi 3.141592653589793238
 
typedef pair<int, int> P;
 
 
signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(10);
    cerr << fixed << setprecision(10);
    long long N;
    scanf("%lld",&N);
    map<string, int> ma;
    REP(i,N){
        cin>>in;
        ma[in]++;
    }
    cout<<ma.size()<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:14: error: 'in' was not declared in this scope; did you mean 'i'?
   30 |         cin>>in;
      |              ^~
      |              i
Language: Java

import java.util.*;
import java.util.HashSet;

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

	    int N = sc.nextInt();
        Hashset list = new HashSet();
      
      for(int i=0 ;i < N; i++){
        String prize = sc.next();
        list.add(prize);
      }
      
      System.out.println(list.size());
      
    }
}


Compiler output:
Main.java:9: error: cannot find symbol
        Hashset list = new HashSet();
        ^
  symbol:   class Hashset
  location: class Main
1 error
Language: C

#include <bits/stdc++.h>
#define rep(i,a,b) for(ll i=ll(a);i<ll(b);i++)
#define irep(i,a,b) for(ll i=ll(a);i>=ll(b);i--)
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
#define pb push_back
#define mp make_pair
#define F .first
#define S .second 
using ll=long long;
using ld=long double;
const ll INF = 1LL<<60;
const ll mod=1e9+7;
using namespace std;
ll GCD(ll a, ll b) { return b ? GCD(b, a%b) : a; }
map<string,ll> x;
int main(){
    ll n,ans=0;
    cin>>n;
    string s;
    rep(i,0,n){cin>>s;x[s]++;}
    cout<<x.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>
#include <string> // std::string
#include <iostream> // std::cout
using namespace std;

int main() {

  int n;
  int count = 0;
  std::string moji[];

  cin >> n;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: array size missing in 'moji'
   10 |   std::string moji[];
      |               ^~~~
Language: Java

import java.util.Scanner;
 
class Main {
	public static void main(String[] args) {
        int N = nextInt();
        String S[] = new String[N];       
        int ans = 1;

        for(int i=0;i<N;i++) {
        	S[i] = next();
        }
        
        for(int i=1;i<N;i++) {
        	
        	int check = 0;
            for(int j=0;j<i;j++) {
            	if(S[i].equals(S[j])) check ++;
            	if(check != 0) break;
            }
            if(check == 0) ans++;
        }
        
        System.out.print(ans);
        

	}
	static InputStream in = System.in;
	static  byte[] buffer = new byte[1024];
	static int length = 0, p = 0;
	public static boolean hasNextByte () {
		if (p < length) return true;
		else {
			p = 0;
			try {length = in.read(buffer);}
			catch (Exception e) {e.printStackTrace();}
			if (length == 0) return false;
		}
		return true;
	}
	public static int readByte () {
		if (hasNextByte() == true) return buffer[p++];
		return -1;
	}
	public static boolean isPrintable (int n) {return 33<=n&&n<=126;}
	public static void skip () {
		while (hasNextByte() && !isPrintable(buffer[p])) p++;
	}
	public static boolean hasNext () {skip(); return hasNextByte();}
	public static String next () {
		if (!hasNext()) throw new NoSuchElementException();
		StringBuilder sb = new StringBuilder();
		int temp = readByte();
		while (isPrintable(temp)) {
			sb.appendCodePoint(temp);
			temp = readByte();
		}
		return sb.toString();
	}
	public static int nextInt () {return Math.toIntExact(nextLong());}
	public static int[] nextInts (int n) {
		int[] ar = new int[n];
		for (int i=0; i<n; i++) ar[i] = nextInt();
		return ar;
	}
	public static long nextLong () {
		if (!hasNext()) throw new NoSuchElementException();
		boolean minus = false;
		int temp = readByte();
		if (temp == '-') {
			minus = true;
			temp = readByte();
		}
		if (temp<'0' || '9'<temp) throw new NumberFormatException();
		long n = 0;
		while (isPrintable(temp)) {
			if ('0'<=temp && temp<='9') {
				n *= 10;
				n += temp - '0';
			}
			temp = readByte();
		}
		return minus? -n : n;
	}
	// <Fast Scanner> END ----------------------------------------------------------
}

Compiler output:
Main.java:27: error: cannot find symbol
	static InputStream in = System.in;
	       ^
  symbol:   class InputStream
  location: class Main
Main.java:50: error: cannot find symbol
		if (!hasNext()) throw new NoSuchElementException();
		                          ^
  symbol:   class NoSuchElementException
  location: class Main
Main.java:66: error: cannot find symbol
		if (!hasNext()) throw new NoSuchElementException();
		                          ^
  symbol:   class NoSuchElementException
  location: class Main
3 errors
Language: C++

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

using namespace std;

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

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

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

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

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

	vector<string> reward(N);

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

	vector<string> checker;

	checker.push_back(reward[0]);

	for (int i = 1; i < N; i++)
	{

		for (int j = 0; j < checker.size; j++)
		{
			if (reward[i] != checker[j])
			{
				checker.push_back(reward[i]);
			}
		}
	}

	cout << checker.size << endl;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:45: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int]' (did you forget the '()' ?)
   24 |                 for (int j = 0; j < checker.size; j++)
      |                                     ~~~~~~~~^~~~
      |                                                 ()
a.cc:33:14: error: invalid use of non-static member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int]'
   33 |         cout << checker.size << endl;
      |         ~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:992:7: note: declared here
  992 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,z=0;
	cin>>n;
	//int f=0;
	int f[n+5];
	memset(f,0,sizeof(f));
	char a[n+5][15];
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
	for(int i=0;i<n;i++)
	{
		if(f[j]==1)
		continue;
		for(int j=0;j<i;j++)
		{
			if(strcmp(a[j],a[i])==0&&f[j]==0)
			{
				z++;
				f[j]=1;
			}
		}
	}
	
	
	cout<<n-z;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:22: error: 'j' was not declared in this scope
   17 |                 if(f[j]==1)
      |                      ^
Language: C

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
  vector<string> x(n);
  for(int i=0;i<n;i++){
    cin>>x[i];
  }
  vector<int> a(n);
  vector<int> z(n);//カウント
  for(int i=0;i<n;i++){
    for(int j=i;j<n;j++){
     if(x[i]=="**"){
       break;
     }
     if(x[i]!="**"&&x[i]==x[j]){
        a[i]=1;
        x[j]="**";
      }
      cout<<x[j];
    }
    x[i]="**";
  }
  int t=0;
  for(int i=0;i<n;i++){
    if(a[i]>0){
      t++;
    }
  }
  
  cout<<t;
  
}


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 <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>

int main(void)
{
  char s[200000][11];
  long int n,i,j,c=0;

  scanf("%ld",&n);
  for(i=0;i<n;i++)
  {
    c++;
    scanf("%s",s[i]);
    for(j=0;j<i;j++)
    {
      if(strncmp(s[i],s[j])==0)
      {
        c--;
        break;
      }
    }
  }

  printf("%ld\n",c);

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:18:10: error: too few arguments to function 'strncmp'
   18 |       if(strncmp(s[i],s[j])==0)
      |          ^~~~~~~
In file included from main.c:4:
/usr/include/string.h:159:12: note: declared here
  159 | extern int strncmp (const char *__s1, const char *__s2, size_t __n)
      |            ^~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int SortAscendStr(const void *str1, const void *str2){
    return (strcmp(*(char **)str1, *(char **)str2));
}
int main(){
  int n,ans=1;
  scanf("%d",&n);
  char a[n][10],tmp[20];
  for(int i=0;i<n;i++){
    scanf("%s",a[i]);
  }
  
 qsort(a, n, sizeof(*char), SortAscendStr);
  
    for(int i=1;i<n;i++){
    if(strcmp(a[i],a[i-1])!=0) ans++;
    
  }

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


Compiler output:
main.c: In function 'main':
main.c:15:22: error: expected expression before 'char'
   15 |  qsort(a, n, sizeof(*char), SortAscendStr);
      |                      ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
#include <cctype>

using namespace std;

int main(){
    int n;
    cin >> n;
    string s;
    for(int i = 0; i < n; i++){
        cin >> s;
    }
    int result = 0;
    for(int i = 0; i < n; i++){
        if(s[i] == s[i + 1] || s[i + 1] == s[i + 2]){
            result++;
    }
    cout << result << endl;
}

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

import java.util.Scanner;

public class Main {
	static int N;
	static int a=0;
	static int b=0;
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		N=sc.nextInt();
		String S[]=new String[N];
		for(int i=0;i<N;i++) {
		S[i]=sc.next();
		}
		for(int i=0;i<N;i++) {
			for(int j=0;j<i;j++) {
				if(S[j]==S[i]) {
					a=1;
				}
			}
			if(a==0) {
				b++;
			}
			a=0;
		}
		System.out.println(b);

Compiler output:
Main.java:25: error: reached end of file while parsing
		System.out.println(b);
		                      ^
1 error
Language: C++

#include<stdio.h>
#include<iostream>
using namespace std;

int main(){
    int n; cin >> n;
    char a[n][9];
    int count; count =0;
    for (int i = 0; i < n; i++)
    {
        cin >> a[i];
    }
    for (int j = 0; j < n; j++)
    {
        for (int k = 0; k < n; k++)
        {
            if (a[i]== a[j])
            {
                count ++;
            }
            
        }
        
    }
    cout << n*n-count << endl;
    
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:19: error: 'i' was not declared in this scope
   17 |             if (a[i]== a[j])
      |                   ^
Language: C

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int SortAscendStr(const void *str1, const void *str2){
    return (strcmp(*(char **)str1, *(char **)str2));
}
int main(){
  int n,ans=1;
  scanf("%d",&n);
  char a[n][10],tmp[20];
  for(int i=0;i<n;i++){
    scanf("%s",a[i]);
  }
  for(int i=0;i<n;i++){
 qsort(a, n, sizeof(*char), SortAscendStr);
  }
    for(int i=1;i<n;i++){
    if(strcmp(a[i],a[i-1])!=0) ans++;
    
  }

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


Compiler output:
main.c: In function 'main':
main.c:15:22: error: expected expression before 'char'
   15 |  qsort(a, n, sizeof(*char), SortAscendStr);
      |                      ^~~~
Language: C++

//Bi-smi llāh

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



int main(){
	map<string, int> mp;
	int n; cin >> n;
	for(int i = 0; i < n; ++i){
			int s; cin >> s;
			mp[s]++;
		}
	cout << mp.size();
	return 0;
	}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, int>' and 'int')
   14 |                         mp[s]++;
      |                           ^
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:3:
/usr/include/c++/14/bits/stl_map.h:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> >; mapped_type = int; key_type = std::__cxx11::basic_string<char>]'
  504 |       operator[](const key_type& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:504:34: note:   no known conversion for argument 1 from 'int' to 'const std::map<std::__cxx11::basic_string<char>, int>::key_type&' {aka 'const std::__cxx11::basic_string<char>&'}
  504 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_map.h:524:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> >; mapped_type = int; key_type = std::__cxx11::basic_string<char>]'
  524 |       operator[](key_type&& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:524:29: note:   no known conversion for argument 1 from 'int' to 'std::map<std::__cxx11::basic_string<char>, int>::key_type&&' {aka 'std::__cxx11::basic_string<char>&&'}
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
Language: C++

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

int main() {

  int n;
  int count = 0;
  std::string moji[];

  cin >> n;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: array size missing in 'moji'
    8 |   std::string moji[];
      |               ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'n' was not declared in this scope; did you mean 'yn'?
    8 |     cin >> n;
      |            ^
      |            yn
Language: C++

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

int main(){
    int N;
    cin >> N;
    string S[N];
    int ans = 0;
    for (int i=1; i<=N; ++i){
        cin >> S[i];
        for (int j=1; j<i; ++j){
            if (S[i] != S[j]){
                ++ans;
            }
        }
    }
    
    cout << ans << endl; 
    return 0;


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

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:20:40: error: expected ';' before '}' token
   20 |                                 count--
      |                                        ^
      |                                        ;
   21 |                         }
      |                         ~
Language: Java

import java.util.*;
import java.util.HashSet;

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

	    int N = sc.nextInt();
        Hushset list = new HashSet();
      
      for(int i=0 ;i < N; i++){
        String prize = sc.next();
        list.add(prize);
      }
      
      System.out.println(list.size());
      
    }
}


Compiler output:
Main.java:9: error: cannot find symbol
        Hushset list = new HashSet();
        ^
  symbol:   class Hushset
  location: class Main
1 error
Language: C

N = eval(input(""))
number = 0
inputs = []
while True:
    if len(inputs) != N:
        inp = str(input(""))
        inputs.append(str(inp))
    else:
        break
inputs_new = set(inputs)
for i in inputs_new:
    number += 1
print(number)

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

#include <bits/stdc++.h>

using namespace std;

int data[1000000000000001] = {0};

int main() {
    int N, ans = 0;
    cin >> N;
    while (N--) {
        char S[10];
        scanf("%s", S);
        int len = strlen(S);
        long long sum = 0;
        for (int i = 0; i < len; ++i) {
            sum *= 27;
            sum += S[i] - 'a';
            if (!data[sum]) {
                data[sum]++;
                ans++;
            }
        }
    }
    cout << ans;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: reference to 'data' is ambiguous
   18 |             if (!data[sum]) {
      |                  ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:5:5: note:                 'int data [1000000000000001]'
    5 | int data[1000000000000001] = {0};
      |     ^~~~
a.cc:19:17: error: reference to 'data' is ambiguous
   19 |                 data[sum]++;
      |                 ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:5:5: note:                 'int data [1000000000000001]'
    5 | int data[1000000000000001] = {0};
      |     ^~~~
Language: C

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  long long N;
  cin >> N;
  vector <string>vec (N);
  for( long long i = 0; i < N; i++){
    cin >> vec.at(i);
  }
  long long ans =1;
  sort(vec.begin(), vec.end());
    for( long long i =0; i <(N-1); i++){
      if(vec.at(i) != vec.at(i+1)){
        ans ++;
      }
    }
  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;

int main() {

  int n;
  int count = 0;
  static std::string moji[];

  cin >> n;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: array size missing in 'moji'
    8 |   static std::string moji[];
      |                      ^~~~
Language: C++

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

int main()
{
  int n;
  char s[10];
  scanf("%d",&n);
  
  char *table[n];
  int *type[n];
  
  for (int i = 0; i < n; i++) 
  {
	scanf("%s", s);
    table[i]=(char *)malloc(sizeof(char)*(strlen(s)+1));
    strcpy(table[i], s);
    
    type[i] = (int *)malloc(sizeof(int));
    type[i] = -1;
  }
  
  int count;
  count=0;
  
  for(int i = 0; i < n-1; i++)
  {
     if(type[i] == -1)
     {
     	for(int k = i+1; k < n;  k++)
     	{
            if(type[k] == -1)
            {
       			if(strcmp(table[i], table[k])==0)
       			{
         			type[k] = i;
         			count++;
       			}
            }
     	}
     }
  }
  
  printf("%d\n", n-count);
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:15: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   21 |     type[i] = -1;
      |               ^~
      |               |
      |               int
a.cc:29:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   29 |      if(type[i] == -1)
      |         ~~~~~~~~^~~~~
a.cc:33:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   33 |             if(type[k] == -1)
      |                ~~~~~~~~^~~~~
a.cc:37:43: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   37 |                                 type[k] = i;
      |                                           ^
      |                                           |
      |                                           int
Language: C

N = int(input(""))
number = 0
inputs = []
while True:
    if len(inputs) != N:
        inp = str(input(""))
        inputs.append(str(inp))
    else:
        break
inputs_new = set(inputs)
for i in inputs_new:
    number += 1
print(number)

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++

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




Compiler output:
a.cc: In function 'int main()':
a.cc:23:21: error: 'b' was not declared in this scope
   23 |   rep(i,2019) d[i]= b[i]%2019 ;
      |                     ^
Language: C

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

int main (void) {
    long N;
    int count = 1;

    scanf ("%ld", &N);

    char S[N][10];

    for (int i = 0; i < N; i++) {
        scanf ("%s", S[i]);
        for (int j = 0; j < i; j++) {
            if (strcmp (S[i],S[j]) == 0) {
                break;
            }
        }
        count++
    }

    /*for (int i = 0; i < N - 1; i++) {
        for (int j = N - 1; j > i; j--) {
            if (strcmp (S[i],S[j]) == 0) {
                count++;
                break;
            }
        }
    }*/

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

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:16: error: expected ';' before '}' token
   20 |         count++
      |                ^
      |                ;
   21 |     }
      |     ~
Language: C

#include <stdil.h>
#include <string.h>

int main(void)
{
  int n,i,j,k;
  char s[n][];

  scanf("%d",&n);
  k = n;
  for(i=0;i<n;i++){
    scanf("%s",s[i][]);
  }

  for(i=0;i<n;i++){
    for(j=i+1;j<n;j++){
      if(strcmp(s[i][],s[j][]) == 0){
        k = k - 1;
      }
    }
  }

  printf("%d",&k);

  return 0;
}


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   15 |         if(data.at(i)==data(j)){
      |                        ~~~~^~~
Language: C

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int SortAscendStr(const void *str1, const void *str2){
    return (strcmp(*(char **)str1, *(char **)str2));
}
int main(){
  int n,ans=1;
  scanf("%d",&n);
  char a[n][10],tmp[20];
  for(int i=0;i<n;i++){
    scanf("%s",a[i]);
  }
 qsort(a, n, sizeof(*str), SortAscendStr);

    for(int i=1;i<n;i++){
    if(strcmp(a[i],a[i-1])!=0) ans++;
    
  }

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

Compiler output:
main.c: In function 'main':
main.c:14:22: error: 'str' undeclared (first use in this function)
   14 |  qsort(a, n, sizeof(*str), SortAscendStr);
      |                      ^~~
main.c:14:22: note: each undeclared identifier is reported only once for each function it appears in
Language: C

number = 0
N = int(input(""))
inputs = []
while True:
    if len(inputs) != N:
        inp = str(input(""))
        inputs.append(str(inp))
    else:
        break
inputs_new = set(inputs)
for i in inputs_new:
    number += 1
print(number)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | number = 0
      | ^~~~~~
main.c:1:1: error: type defaults to 'int' in declaration of 'number' [-Wimplicit-int]
main.c:2:1: error: expected ',' or ';' before 'N'
    2 | N = int(input(""))
      | ^
Language: Java

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


	}
}

Compiler output:
Main.java:11: error: cannot find symbol
		          String data=str.nextLine();
		                         ^
  symbol:   method nextLine()
  location: variable str of type ArrayList<String>
Main.java:12: error: no suitable method found for add(no arguments)
		          str.add();
		             ^
    method ArrayList.add(String,Object[],int) is not applicable
      (actual and formal argument lists differ in length)
    method ArrayList.add(String) is not applicable
      (actual and formal argument lists differ in length)
    method ArrayList.add(int,String) is not applicable
      (actual and formal argument lists differ in length)
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
Language: C

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

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


Compiler output:
main.c: In function 'main':
main.c:22:14: error: assignment to expression with array type
   22 |     check[k] = s[i];
      |              ^
Language: C

#include <stdio.h>
 
int main(void) {
  int S[6], Ans, N;
  Ans = 0;
  if(scanf("%d", S)==1);
  for(i=0,i<6,i++) {
    if (S[i] ='\n') {
      break;
    }
  }
  if (i>3) {
    N = S[0]*1000+S[1]*100+S[2]*10+S[3];
    if (N%2019==0) {
      Ans++
    }
  }
  if (i>4) {
    N = S[1]*1000+S[2]*100+S[3]*10+S[4];
    if (N%2019==0) {
      Ans++
    }
    N = S[0]*10000+S[1]*1000+S[2]*100+S[3]*10+S[4];
    if (N%2019==0) {
      Ans++
    }
  }
  if (i=6) {
    N = S[2]*1000+S[3]*100+S[4]*10+S[5];
    if (N%2019==0) {
      Ans++
    }
    N = S[0]*100000+S[1]*10000+S[2]*1000+S[3]*100+S[4]*10+S[5];
    if (N%2019==0) {
      Ans++
    }
  }
  printf ("%d", Ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:7: error: 'i' undeclared (first use in this function)
    7 |   for(i=0,i<6,i++) {
      |       ^
main.c:7:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:18: error: expected ';' before ')' token
    7 |   for(i=0,i<6,i++) {
      |                  ^
      |                  ;
main.c:7:18: error: expected expression before ')' token
main.c:15:12: error: expected ';' before '}' token
   15 |       Ans++
      |            ^
      |            ;
   16 |     }
      |     ~       
main.c:21:12: error: expected ';' before '}' token
   21 |       Ans++
      |            ^
      |            ;
   22 |     }
      |     ~       
main.c:25:12: error: expected ';' before '}' token
   25 |       Ans++
      |            ^
      |            ;
   26 |     }
      |     ~       
main.c:31:12: error: expected ';' before '}' token
   31 |       Ans++
      |            ^
      |            ;
   32 |     }
      |     ~       
main.c:35:12: error: expected ';' before '}' token
   35 |       Ans++
      |            ^
      |            ;
   36 |     }
      |     ~
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<string> S(N);
  rep(i, N){
    cin >> S.at(i);
  }
  int count, sum = 0;
  rep(i, N-1){
    count = 0;
    rep(k, N-i-1){
      if(S.at(i)==S.at(i+k+1)){
      count++;  
      break  
      }
    }
  if(count == 0){
    sum++;
  }
  }
  cout << sum + 1 <<endl;
}

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

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

void main() {

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

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

Compiler output:
main.c: In function 'main':
main.c:22:11: error: redeclaration of 'S' with no linkage
   22 |     char *S = (char*)malloc(sizeof(char[10 + 1]) * 2 * pow(10, 5));
      |           ^
main.c:15:11: note: previous declaration of 'S' with type 'char *'
   15 |     char *S;
      |           ^
Language: C

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

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

Compiler output:
main.c: In function 'main':
main.c:21:8: error: expected ';' before 'check'
   21 |     k++
      |        ^
      |        ;
   22 |     check[k] = s[i];
      |     ~~~~~
Language: C++

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




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

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


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

#include <stdio.h>


int main(void){

        int n;
        scanf("%d",&n);
        char s[n][11];

        for(int i=0;i<n;i++){
                scanf("%s",s[i]);
        }   

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

Compiler output:
main.c: In function 'main':
main.c:16:25: error: 'count' undeclared (first use in this function)
   16 |                         count++;
      |                         ^~~~~
main.c:16:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:46: error: assignment to expression with array type
   19 |                                         s[j] = s[i];
      |                                              ^