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

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = 1; i <= (int)(n); i++) 
#define dunk(n) cout << n << endl
#define all(a) (a).begin(),(a).end()
typedef pair<int,int> P;
typedef long long ll;

int main() {
    int n;
    cin >> n;
    vector<int> num(n);
    rep(i,n) cin >> num[i];
    sort(all(num));
    int ans = 1;
    int cnt = 1;
    
    for(int i = 1; i < n; i++){
        if(num[i-1] == num[i]){
            cnt++
        }
        else{
            if(cnt%2 == 1){
                ans++;
            }
            cnt = 1;
        }
        if(i == n-1 && cnt%2 == 0) ans--;
    }
    dunk(ans);
    return 0;
}

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

#include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<string>
#include<stdio.h>
#include<stack>
#include<cmath>
#include<set>
//#define ll long long
using namespace std;
const int maxn=100010;
const int INF=1000000000;
set<int> st[maxn];

int main()
{
    int n,i,j,k,a,b;
    cin>>n;
    for(i=1;i<=n;i++)
    {
        cin>>a;
        if(st.count(a)==0)
            st.insert(a);
        else
            st.erase(a);
    }
    cout<<st.size;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:15: error: request for member 'count' in 'st', which is of non-class type 'std::set<int> [100010]'
   24 |         if(st.count(a)==0)
      |               ^~~~~
a.cc:25:16: error: request for member 'insert' in 'st', which is of non-class type 'std::set<int> [100010]'
   25 |             st.insert(a);
      |                ^~~~~~
a.cc:27:16: error: request for member 'erase' in 'st', which is of non-class type 'std::set<int> [100010]'
   27 |             st.erase(a);
      |                ^~~~~
a.cc:29:14: error: request for member 'size' in 'st', which is of non-class type 'std::set<int> [100010]'
   29 |     cout<<st.size;
      |              ^~~~
Language: C++

n=int(input())
A=[]
for i in range(n):
    A.append(int(input()))

from collections import defaultdict
d=defaultdict(int)
for a in A:
    d[a]+=1
ans=0
for k in d.keys():
    if d[k]%2==1:
        ans+=1
print(ans)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n=int(input())
      | ^
Language: C++

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

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

int main() {
  int N;
  cin >> N;
  
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A.at(i);
  sort(A.begin(),A.end());

  int ans = 0;
  int cnt = 1;
  for (int i = 0; i < N-1; i++){
    if((A.at(i) != A.at(i+1)){
      ans += cnt % 2;
      cnt = 1;
      continue;
    }
    cnt++;
  }
    
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:30: error: expected ';' before '{' token
   18 |     if((A.at(i) != A.at(i+1)){
      |                              ^
      |                              ;
a.cc:23:10: error: expected ')' before ';' token
   23 |     cnt++;
      |          ^
      |          )
a.cc:18:7: note: to match this '('
   18 |     if((A.at(i) != A.at(i+1)){
      |       ^
Language: C++

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

int main() {
 int n;
  cin >> n;
  
  map<int, int> Map;
  for(int i = 0; i < n; i++){
    int a;
    cin >> a;
    m[a]++;
  }
  
  int ans = 0;
  for(auto i: Map){
    ans += i.second % 2
  }
  
  cout  << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'm' was not declared in this scope
   12 |     m[a]++;
      |     ^
a.cc:17:24: error: expected ';' before '}' token
   17 |     ans += i.second % 2
      |                        ^
      |                        ;
   18 |   }
      |   ~
Language: C++

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


int main() {
  int n;
  int cnt = 0;
  cin >> n;
 
  map<int,int>mp;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    mp[a]++;
  }
  for (auto m : mp) {
    if (m.second % 2 == 1) cnt++;
  }
  print(cnt);
}




Compiler output:
a.cc: In function 'int main()':
a.cc:19:3: error: 'print' was not declared in this scope; did you mean 'rint'?
   19 |   print(cnt);
      |   ^~~~~
      |   rint
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,k;
  cin>>N;
  vector<int> a;
  for(int i=0;i<N;i++){
    cin>>k;
    if(a.count(k)==1){
      a.erase(k);
    }
    else{
      a.push_back(k);
    }
  }
    cout<<a.size()<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'class std::vector<int>' has no member named 'count'
    9 |     if(a.count(k)==1){
      |          ^~~~~
a.cc:10:14: error: no matching function for call to 'std::vector<int>::erase(int&)'
   10 |       a.erase(k);
      |       ~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = int; _Alloc = std::allocator<int>; iterator = std::vector<int>::iterator; const_iterator = std::vector<int>::const_iterator]'
 1536 |       erase(const_iterator __position)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:28: note:   no known conversion for argument 1 from 'int' to 'std::vector<int>::const_iterator'
 1536 |       erase(const_iterator __position)
      |             ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = int; _Alloc = std::allocator<int>; iterator = std::vector<int>::iterator; const_iterator = std::vector<int>::const_iterator]'
 1564 |       erase(const_iterator __first, const_iterator __last)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note:   candidate expects 2 arguments, 1 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,k;
  cin>>N;
  vector<int> a;
  for(int i=0;i<N;i++){
    cin>>k;
    if(a.cout(k)==1){
      a.erase(k);
    }
    else{
      a.push_back(k);
    }
  }
    cout<<a.size()<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'class std::vector<int>' has no member named 'cout'
    9 |     if(a.cout(k)==1){
      |          ^~~~
a.cc:10:14: error: no matching function for call to 'std::vector<int>::erase(int&)'
   10 |       a.erase(k);
      |       ~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = int; _Alloc = std::allocator<int>; iterator = std::vector<int>::iterator; const_iterator = std::vector<int>::const_iterator]'
 1536 |       erase(const_iterator __position)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:28: note:   no known conversion for argument 1 from 'int' to 'std::vector<int>::const_iterator'
 1536 |       erase(const_iterator __position)
      |             ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = int; _Alloc = std::allocator<int>; iterator = std::vector<int>::iterator; const_iterator = std::vector<int>::const_iterator]'
 1564 |       erase(const_iterator __first, const_iterator __last)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note:   candidate expects 2 arguments, 1 provided
Language: C++

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

long long n,indeks[1000000001],q,total;

int main(){
	cin>>n;
	for(long long i = 1;i <= n;i++){
		cin>>q;
		if(indeks[q] == 0){
			indeks[q]++;
			total++;
		}else{
			indeks[q]--;
			total--;
		}
	}
	cout<<total<<endl;
}


Compiler output:
/tmp/ccM1capt.o: in function `main':
a.cc:(.text+0x31): relocation truncated to fit: R_X86_64_PC32 against symbol `q' defined in .bss section in /tmp/ccM1capt.o
a.cc:(.text+0x4a): relocation truncated to fit: R_X86_64_PC32 against symbol `q' defined in .bss section in /tmp/ccM1capt.o
a.cc:(.text+0x69): relocation truncated to fit: R_X86_64_PC32 against symbol `q' defined in .bss section in /tmp/ccM1capt.o
a.cc:(.text+0x9a): relocation truncated to fit: R_X86_64_PC32 against symbol `total' defined in .bss section in /tmp/ccM1capt.o
a.cc:(.text+0xa5): relocation truncated to fit: R_X86_64_PC32 against symbol `total' defined in .bss section in /tmp/ccM1capt.o
a.cc:(.text+0xae): relocation truncated to fit: R_X86_64_PC32 against symbol `q' defined in .bss section in /tmp/ccM1capt.o
a.cc:(.text+0xdf): relocation truncated to fit: R_X86_64_PC32 against symbol `total' defined in .bss section in /tmp/ccM1capt.o
a.cc:(.text+0xea): relocation truncated to fit: R_X86_64_PC32 against symbol `total' defined in .bss section in /tmp/ccM1capt.o
a.cc:(.text+0x107): relocation truncated to fit: R_X86_64_PC32 against symbol `total' defined in .bss section in /tmp/ccM1capt.o
collect2: error: ld returned 1 exit status
Language: C++

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

long long n,indeks[1000000001],q,total;

int main(){
	cin>>n;
	for(long long i = 1;i <= n;i++){
		cin>>q;
		if(indeks[q] == 0){
			indeks[q]++;
			total++;
		}else{
			indeks[q]--;
			total--;
		}
	}
	cout<<total<<endl;
}


Compiler output:
/tmp/ccVkQU8Z.o: in function `main':
a.cc:(.text+0x31): relocation truncated to fit: R_X86_64_PC32 against symbol `q' defined in .bss section in /tmp/ccVkQU8Z.o
a.cc:(.text+0x4a): relocation truncated to fit: R_X86_64_PC32 against symbol `q' defined in .bss section in /tmp/ccVkQU8Z.o
a.cc:(.text+0x69): relocation truncated to fit: R_X86_64_PC32 against symbol `q' defined in .bss section in /tmp/ccVkQU8Z.o
a.cc:(.text+0x9a): relocation truncated to fit: R_X86_64_PC32 against symbol `total' defined in .bss section in /tmp/ccVkQU8Z.o
a.cc:(.text+0xa5): relocation truncated to fit: R_X86_64_PC32 against symbol `total' defined in .bss section in /tmp/ccVkQU8Z.o
a.cc:(.text+0xae): relocation truncated to fit: R_X86_64_PC32 against symbol `q' defined in .bss section in /tmp/ccVkQU8Z.o
a.cc:(.text+0xdf): relocation truncated to fit: R_X86_64_PC32 against symbol `total' defined in .bss section in /tmp/ccVkQU8Z.o
a.cc:(.text+0xea): relocation truncated to fit: R_X86_64_PC32 against symbol `total' defined in .bss section in /tmp/ccVkQU8Z.o
a.cc:(.text+0x107): relocation truncated to fit: R_X86_64_PC32 against symbol `total' defined in .bss section in /tmp/ccVkQU8Z.o
collect2: error: ld returned 1 exit status
Language: C++

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

int n,indeks[1000000001],q,total;

int main(){
	cin>>n;
	for(int i = 1;i <= n;i++){
		cin>>q;
		if(indeks[q] == 0){
			indeks[q]++;
			total++;
		}else{
			indeks[q]--;
			total--;
		}
	}
	cout<<total<<endl;
}


Compiler output:
/tmp/cckjN1Zn.o: in function `main':
a.cc:(.text+0x30): relocation truncated to fit: R_X86_64_PC32 against symbol `q' defined in .bss section in /tmp/cckjN1Zn.o
a.cc:(.text+0x48): relocation truncated to fit: R_X86_64_PC32 against symbol `q' defined in .bss section in /tmp/cckjN1Zn.o
a.cc:(.text+0x66): relocation truncated to fit: R_X86_64_PC32 against symbol `q' defined in .bss section in /tmp/cckjN1Zn.o
a.cc:(.text+0x98): relocation truncated to fit: R_X86_64_PC32 against symbol `total' defined in .bss section in /tmp/cckjN1Zn.o
a.cc:(.text+0xa1): relocation truncated to fit: R_X86_64_PC32 against symbol `total' defined in .bss section in /tmp/cckjN1Zn.o
a.cc:(.text+0xa9): relocation truncated to fit: R_X86_64_PC32 against symbol `q' defined in .bss section in /tmp/cckjN1Zn.o
a.cc:(.text+0xdb): relocation truncated to fit: R_X86_64_PC32 against symbol `total' defined in .bss section in /tmp/cckjN1Zn.o
a.cc:(.text+0xe4): relocation truncated to fit: R_X86_64_PC32 against symbol `total' defined in .bss section in /tmp/cckjN1Zn.o
a.cc:(.text+0xfd): relocation truncated to fit: R_X86_64_PC32 against symbol `total' defined in .bss section in /tmp/cckjN1Zn.o
collect2: error: ld returned 1 exit status
Language: C++

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

int n,index[100001],q,total;

int main(){
	cin>>n;
	for(int i = 1;i <= n;i++){
		cin>>q;
		if(index[q] == 0){
			index[q]++;
			total++;
		}else{
			index[q]--;
			total--;
		}
	}
	cout<<total<<endl;
}


Compiler output:
a.cc:4:19: error: 'int index [100001]' redeclared as different kind of entity
    4 | int n,index[100001],q,total;
      |                   ^
In file included from /usr/include/string.h:462,
                 from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/strings.h:50:20: note: previous declaration 'const char* index(const char*, int)'
   50 | extern const char *index (const char *__s, int __c)
      |                    ^~~~~
a.cc: In function 'int main()':
a.cc:10:25: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   10 |                 if(index[q] == 0){
      |                         ^
a.cc:11:30: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   11 |                         index[q]++;
      |                              ^
a.cc:14:30: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   14 |                         index[q]--;
      |                              ^
Language: C++

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

int n,index[100001],q,total;

int main(){
	cin>>n;
	for(int i = 1;i <= n;i++){
		cin>>q;
		if(index[q] == 0){
			index[q]++;
			total++;
		}else{
			index[q]--;
			total--;
		}
	}
	cout<<total<<endl;
}

Compiler output:
a.cc:4:19: error: 'int index [100001]' redeclared as different kind of entity
    4 | int n,index[100001],q,total;
      |                   ^
In file included from /usr/include/string.h:462,
                 from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/strings.h:50:20: note: previous declaration 'const char* index(const char*, int)'
   50 | extern const char *index (const char *__s, int __c)
      |                    ^~~~~
a.cc: In function 'int main()':
a.cc:10:25: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   10 |                 if(index[q] == 0){
      |                         ^
a.cc:11:30: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   11 |                         index[q]++;
      |                              ^
a.cc:14:30: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   14 |                         index[q]--;
      |                              ^
Language: C++

n=int(input())
myset=set()
for i in range(n):
    a=int(input())
    if a in myset:
        myset.remove(a)
    else:
        myset.add(a)
print(len(myset))

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n=int(input())
      | ^
Language: C++

#include<iostream>
using namespace std;
long long int n,a[100002],z,zs;
int main()
{
    cin>>n;
    for(int i=1;i<=n;i++)
      cin>>a[i];
    sort(a+1,a+n+1);
    z=1;
    for(int i=2;i<=n;i++)
    {
        if(a[i]==a[i-1])z=(z+1)%2;
        else zs+=z,z=1;
    }
    if(z%2)zs++;
    cout<<zs<<endl;
    return 0;
}

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

#include<iostream>
using namespace std;
long long n,a[100003],c=1,s;
int main(){
cin>>n;
for(int i=1;i<=n;i++)
cin>>a[i];
sort(a+1,a+n+1);
for(int i=2;i<=n;i++){
 if(a[i]==a[i-1]) c=(c+1)%2;
else s+=c,c=1;}
if(c%2==1) s++;
cout<<s;}

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

#include "bits/stdc++.h"
#define ALL(x) x.begin(),x.end()

using namespace std;
typedef unsigned long long ll;


int main(void){
    int n,a,same=0,ans=0;
    cin>>n;
    vector<int> c;//call
    for(int i=0;i<n;++i){
        cin>>a;
        c.append(a);
    }
    sort(ALL(c));
    for(int i=1;i<n;++i){
        if(c[i]==c[i-1]){
            ++same;
        }
        else{
            ans+=same%2;
            same=1;
        }
    }
    ans+=same%2;
    cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: 'class std::vector<int>' has no member named 'append'
   14 |         c.append(a);
      |           ^~~~~~
Language: C++

#include "bits/stdc++.h"
#define ALL(x) x.begin(),x.end()

using namespace std;
typedef unsigned long long ll;


int main(void){
    int n,a,same=0,ans=0;
    cin>>n;
    vector<int> c;//call
    for(int i=0;i<n;++i){
        cin>>a;
        c.append(a);
    }
    sort(ALL(c))
    for(int i=1;i<n;++i){
        if(c[i]==c[i-1]){
            ++same;
        }
        else{
            ans+=same%2;
            same=1;
        }
    }
    ans+=same%2;
    cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: 'class std::vector<int>' has no member named 'append'
   14 |         c.append(a);
      |           ^~~~~~
a.cc:16:17: error: expected ';' before 'for'
   16 |     sort(ALL(c))
      |                 ^
      |                 ;
   17 |     for(int i=1;i<n;++i){
      |     ~~~          
a.cc:17:17: error: 'i' was not declared in this scope
   17 |     for(int i=1;i<n;++i){
      |                 ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<int, int>P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//max=({});
//条件式が真ならwhileの中身を回し続ける
//printf("%d\n", ans);

//pairの入力
//vector<pair<ll, ll>>work(n);
//rep(i, n) {
//	ll a, b;
//	cin >> a >> b;
//	work[i] = make_pair(a, b);
//for(auto p:mp)(mapの探索)
//printf("%.10f\n",なんちゃら)

int g[15][15];
const int INF = 1001001001;
const int dx[4] = { -1,0,1,0 };
const int dy[4] = { 0,-1,0,1 };

//最大公約数
ll gcd(ll x, ll y) {
	return y ? gcd(y, x % y) : x;
}

ll lcm(ll x, ll y) {
	if (x == 0 || y == 0)return 0;
	return (x / gcd(x, y) * y);
}

//素因数分解
vector<pair<ll, int>>factorize(ll n) {
	vector<pair<ll, int>>res;
	for (ll i = 2;i * i <= n;++i) {
		if (n % i)continue;
		res.emplace_back(i, 0);
		while (n % i == 0) {
			n /= i;
			res.back().second++;
		}
	}
	if (n != 1)res.emplace_back(n, 1);
	return res;
}

int bingo[3][3];
bool flag[3][3];
int cnt[2][105];
int h, w;
int choco[1010][1010];
int s[11][11];

int main() {
	int n;
	vector<int>a(n);
	map<int, int>mp;
	rep(i, n) {
		cin >> a[i];
		mp[a[i]]++;
	}
	ll ans = 0;
	for (auto p : mp) {
		if (mp[p] % 2 != 0)ans++;
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:70:23: error: no match for 'operator[]' (operand types are 'std::map<int, int>' and 'std::pair<const int, int>')
   70 |                 if (mp[p] % 2 != 0)ans++;
      |                       ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = int]'
  504 |       operator[](const key_type& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:504:34: note:   no known conversion for argument 1 from 'std::pair<const int, int>' to 'const std::map<int, int>::key_type&' {aka 'const int&'}
  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 = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = int]'
  524 |       operator[](key_type&& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:524:29: note:   no known conversion for argument 1 from 'std::pair<const int, int>' to 'std::map<int, int>::key_type&&' {aka 'int&&'}
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int [] in = new int [1000000000];
        int b = 0;
        int c;
        for(int i=0;i<a;i++){c = sc.nextInt();
                             in[c-1]++;
                             if(in[c-1]%2=1){b++;}
                             else{b--;}
                            }		
		System.out.println(b);
	}
}

Compiler output:
Main.java:11: error: unexpected type
                             if(in[c-1]%2=1){b++;}
                                       ^
  required: variable
  found:    value
1 error
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
int main(void){
    int num_try;
    int *paper;
    int  load;
    int flag=0;

    scanf("%d",&num_try);
    paper=(int *)malloc(sizeof(int)*num_try);
    int i,j;

    for(i=0;i<num_try;i++){
        paper[i]=0;
    }


    for(i=0;i<num_try;i++){
        scanf("%d",&load);
        for(j=0;j<i;j++){
            if(paper[j]==load){
                paper[j]=0;
                count--;
                flag++;
            }
        }
        if(flag==0){
            paper[i]=load;
            count++;
        }
        flag=0;
    }

    int count=0;
    /*for(i=0;i<num_try;i++){
        if(paper[i]!=0){
            count++;
        }
    }*/
    printf("%d",count);
    
    free(paper);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:25:17: error: 'count' undeclared (first use in this function)
   25 |                 count--;
      |                 ^~~~~
main.c:25:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

#define Max 100000
bool flag[Max];

int main(){
	int n;
	cin>>n;
	memset(flag,false,sizeof(flag));
	int ans=0;
	for(int i=0;i<n;i++){
		int a;
		cin>>a;
		if(flag[a]){
			flag[a]=false;
			ans--;
		}else{
			flag[a]=true;
			ans++;
		}
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'memset' was not declared in this scope
   13 |         memset(flag,false,sizeof(flag));
      |         ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include<algorithm>
  +++ |+#include <cstring>
    5 | using namespace std;
Language: C++

#include<set>
using namespace std;
int main()
{
    set<long long int>s;
    long long int n,x,i,c;
    cin>>n;
    for(i=0;i<n;i++)
    {
        cin>>x;
        if(s.find(x)!=s.end())
        {
            s.erase(x);
        }
        else
        {
            s.insert(x);
        }
    }
    long long int l=s.size();
    cout<<l<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin>>n;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<set>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:21:5: error: 'cout' was not declared in this scope
   21 |     cout<<l<<endl;
      |     ^~~~
a.cc:21:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:14: error: 'endl' was not declared in this scope
   21 |     cout<<l<<endl;
      |              ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<set>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
  ll N; cin >> N;
  map<ll,ll> count;
  set<ll> s;
  for (ll i = 0; i < N; i++) {
    ll a; cin >> a; count[a]++; s.insert(a);
  }
  ll res = 0;
  for (auto it = s.begin(); it != s.end(); it++) {
    if (count[i]%2 == 1) res++;
  }
  cout << res << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: 'i' was not declared in this scope; did you mean 'it'?
   13 |     if (count[i]%2 == 1) res++;
      |               ^
      |               it
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
  ll N; cin >> N;
  map<ll,ll> count;
  for (ll i = 0; i < N; i++) {
    ll a; cin >> a; count[a]++;
  }
  ll res = 0;
  for (ll i = 0; i < N; i++) {
    if (count[a]%2 == 1) res++;
  }
  cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'a' was not declared in this scope
   12 |     if (count[a]%2 == 1) res++;
      |               ^
Language: C++

#include <iostream>
#include<algorithm>
using namespace std;
int n,a,rs;
int aa[1000000];
int main()
{
	cin>>n;rs=0;tt=0;
	for(int i=0;i<n;i++)scanf("%d",&aa[i]);
	sort(aa,aa+n);
	int t1,tt;t1=-1;
	for(int i=0;i<n;i++)
	{
		if(t1==-1){t1=aa[i];tt=1;}
		else if(i<n-1)
		{
			if(t1==aa[i])tt++;
			else{if(tt%2)rs++;t1=aa[i];tt=1;}
		}
		else 
		{
			if(t1==aa[i]){tt++;if(tt%2)rs++;}
			else{if(tt%2)rs++;rs++;}
		}
	}
	cout<<rs;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: 'tt' was not declared in this scope; did you mean 'tm'?
    8 |         cin>>n;rs=0;tt=0;
      |                     ^~
      |                     tm
Language: C++

n = int(input())
a_d = {}
for i in range(n):
    a = int(input())
    if a in a_d:
        a_d[a] += 1
    else:
        a_d[a] = 1
 
ans = 0
for i in a_d.values():
    if i % 2:
        ans += 1
print(ans)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
a.cc:3:1: error: expected unqualified-id before 'for'
    3 | for i in range(n):
      | ^~~
Language: C++

n = int(input())
a_d = {}
for i in range(n):
    a = int(input())
    if a in a_d:
        a_d[a] += 1
    else:
        a_d[a] = 1

ans = 0
for i in a_d.values():
    if i % 2:
        ans += 1
print(ans)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
a.cc:3:1: error: expected unqualified-id before 'for'
    3 | for i in range(n):
      | ^~~
Language: C++

//073 B - Write and Erase 2017/09/09
#include <bits/stdc++.h>
#define rep(i ,n) for(int i=0;i<(int)(n);++i)
using namespace std;
typedef long long int int64;
typedef unsigned long long uint64;

int main(){
    int64 n; cin >> n;
    vector<int64> a(n);
    rep(i ,n) cin >> a[i];
    sort(a.begin(),a.end());
    int64 ans=0;
    for(int64 i=0;i<n;++i){
        int64 count=0; f=a[i];
        while(i<n && f==a[i]){
            ++count; ++i;
        }
        --i;
        ans+=count%2;
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:24: error: 'f' was not declared in this scope
   15 |         int64 count=0; f=a[i];
      |                        ^
Language: Java

import java.util.*;
public class Main{

  public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      Set<Integer> nums = new HashSet<>();
      for(int i = 0; i < n; i++) {
        int n = sc.nextInt();
        if(nums.contains(n))
          nums.remove(n);
        else
          nums.add(n);
      }
      System.out.println(nums.size());
  }
}


Compiler output:
Main.java:9: error: variable n is already defined in method main(String[])
        int n = sc.nextInt();
            ^
1 error
Language: C++

#include <bits/stdc++.h>

#define all(v) v.begin(), v.end()
#define mp make_pair
#define EPS (int)1e-9
#define PI acos(-1)
#define endl '\n'
#define pb push_back
#define fi first
#define se second

using namespace std;
using ld = long double;
using ll = long long;
using vi = vector<int>;
using pii = pair<int, int>;

const int mod = 1000000007;


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

	set<int> st;
	repl(i,1,n+1) 
	{
		cin >> x;
		if(st.count(x))
			st.erase(x);
		else
			st.insert(x);
	}

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


Compiler output:
a.cc: In function 'int main()':
a.cc:27:14: error: 'i' was not declared in this scope
   27 |         repl(i,1,n+1)
      |              ^
a.cc:27:9: error: 'repl' was not declared in this scope
   27 |         repl(i,1,n+1)
      |         ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1;} return 0;}
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1;} return 0;}
const long long INFLL = 1LL<<60;
const int INF = 1<<28;
const long long MOD =1000000000+7;
void solve(int a){cout<<( a?"Yes":"No")<<endl;}
int main(){
	int n;
	cin >>n;
	int ans=0;
	map<int,int>D;
	int bef;
	for(int i=;i<n;i++){
		cin >>bef;
		D[bef]+=0;
		if(D[bef]==0){
			D[bef]=1;
		}else{
			D[bef]=0;
		}
	}
for(auto itr =D.begin();itr!=D.end();itr++){
	if(itr->second==1){
		ans++;
	}
}
	cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: expected primary-expression before ';' token
   15 |         for(int i=;i<n;i++){
      |                   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long n,a[100005],t,ans;
int main(){
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];	
	}
    sort(a+1,a+n+1);
    t=1;
    for(int i=2;i<=n;i++){
        if(a[i]==a[i-1]){
        	t=(t+1)%2;
		}else{
			ans+=t;
			t=1;
		}
    }
    if(z%2==0){
    	ans++;
	}
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:8: error: 'z' was not declared in this scope
   19 |     if(z%2==0){
      |        ^
Language: C++

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

#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define bg begin()
#define ed end()
#define all(x) x.bg, x.ed
#ifdef LOCAL
#define dmp(x) cerr << __LINE__ << " " << #x << " " << x << endl
#else
#define dmp(x) void(0)
#endif

template <class t, class u>
void chmax(t &a, u b)
{
  if (a < b)
    a = b;
}
template <class t, class u>
void chmin(t &a, u b)
{
  if (b < a)
    a = b;
}
const int mod = 1000000007;
struct mint
{
  ll x; // typedef long long ll;
  mint(ll x = 0) : x((x % mod + mod) % mod) {}
  mint &operator+=(const mint a)
  {
    if ((x += a.x) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator-=(const mint a)
  {
    if ((x += mod - a.x) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator*=(const mint a)
  {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const
  {
    mint res(*this);
    return res += a;
  }
  mint operator-(const mint a) const
  {
    mint res(*this);
    return res -= a;
  }
  mint operator*(const mint a) const
  {
    mint res(*this);
    return res *= a;
  }
  mint pow(ll t) const
  {
    if (!t)
      return 1;
    mint a = pow(t >> 1);
    a *= a;
    if (t & 1)
      a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const
  {
    return pow(mod - 2);
  }
  mint &operator/=(const mint a)
  {
    return (*this) *= a.inv();
  }
  mint operator/(const mint a) const
  {
    mint res(*this);
    return res /= a;
  }
};
struct combination
{
  vector<mint> fact, ifact;
  combination(int n) : fact(n + 1), ifact(n + 1)
  {
    assert(n < mod);
    fact[0] = 1;
    for (int i = 1; i <= n; ++i)
      fact[i] = fact[i - 1] * i;
    ifact[n] = fact[n].inv();
    for (int i = n; i >= 1; --i)
      ifact[i - 1] = ifact[i] * i;
  }
  mint operator()(int n, int k)
  {
    if (k < 0 || k > n)
      return 0;
    return fact[n] * ifact[k] * ifact[n - k];
  }
};

template <class t>
using vc = vector<t>;
template <class t>
using vvc = vc<vc<t>>;

using vi = vc<int>;
int gcd(int a, int b)
{
  if (b == 0)
    return a;
  return gcd(b, a % b);
}
int lcm(int a, int b)
{
  return (a * b) / gcd(a, b);
}

int main()
{
  int n;
  cin >> n;
  set<int> s;
  vi v(n);
  rep(i,n){
  cin >>a[i];
  }
  int a;
  rep(i,n){
    a=a[i];
    auto num=find(s.cbegin(),s.cend(),a);
    if(num != s.cend()){
   	s.erase(a);
    }else{
    s.insert(a);
    }
  }
  cout<<s.size()<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:142:9: error: 'a' was not declared in this scope
  142 |   cin >>a[i];
      |         ^
a.cc:146:8: error: invalid types 'int[int]' for array subscript
  146 |     a=a[i];
      |        ^
Language: Java

import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   int[] a = new int[N];
   for(int i=0;i<N;i++) a[i] = sc.nextInt();
   Arrays.sort(a);
   int ans=0;
   int count =1;
   int tmp = a[0];
   for(int i=1;i<N;i++)
   {
     if(tmp==a[i]) count++;
     else
     {
       if(count%2==1) ans++;
       count=1;
     }
   
   System.out.println(ans);
 }
}


Compiler output:
Main.java:23: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   int a = new int[N];
   for(int i=0;i<N;i++) a[i] = sc.nextInt();
   Arrays.sort(a);
   int ans=0;
   int count =1;
   int tmp = a[0];
   for(int i=1;i<N;i++)
   {
     if(tmp==a[i]) count++;
     else
     {
       if(count%2==1) ans++;
       count=1;
     }
   }
   System.out.println(ans);
 }
}


Compiler output:
Main.java:6: error: incompatible types: int[] cannot be converted to int
   int a = new int[N];
           ^
Main.java:7: error: array required, but int found
   for(int i=0;i<N;i++) a[i] = sc.nextInt();
                         ^
Main.java:8: error: no suitable method found for sort(int)
   Arrays.sort(a);
         ^
    method Arrays.sort(int[]) is not applicable
      (argument mismatch; int cannot be converted to int[])
    method Arrays.sort(long[]) is not applicable
      (argument mismatch; int cannot be converted to long[])
    method Arrays.sort(short[]) is not applicable
      (argument mismatch; int cannot be converted to short[])
    method Arrays.sort(char[]) is not applicable
      (argument mismatch; int cannot be converted to char[])
    method Arrays.sort(byte[]) is not applicable
      (argument mismatch; int cannot be converted to byte[])
    method Arrays.sort(float[]) is not applicable
      (argument mismatch; int cannot be converted to float[])
    method Arrays.sort(double[]) is not applicable
      (argument mismatch; int cannot be converted to double[])
    method Arrays.sort(Object[]) is not applicable
      (argument mismatch; int cannot be converted to Object[])
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (cannot infer type-variable(s) T#1
        (actual and formal argument lists differ in length))
    method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
    T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Main.java:11: error: array required, but int found
   int tmp = a[0];
              ^
Main.java:14: error: array required, but int found
     if(tmp==a[i]) count++;
              ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
5 errors
Language: Java

import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   int a = new int[N];
   for(int i=0;i<N;i++) a[i] = sc.nextInt();
   Arrays.sort(a);
   int ans=0;
   int count =1;
   int tmp = a[0];
   for(int i=1;i<N;i++)
   {
     if(tmp==a[i]) count++;
     else
     {
       if(count%2==1) ans++;
       count=1;
     }
   
   System.out.println(ans);
 }
}

Compiler output:
Main.java:23: error: reached end of file while parsing
}
 ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
typedef long long ll;
// Welcome to my source code!

int main() {
    int n;
    cin >> n;
    int a[n];
    for (int i = 0; i < n; i++) cin >> a[i];
    int t, cnt, ans;
    for (int i = 0; i < n) {
        t = a[i], cnt = 0;
        while (i < n && a[i] == t) cnt++, i++;
        ans += cnt % 2;
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:26: error: expected ';' before ')' token
   13 |     for (int i = 0; i < n) {
      |                          ^
      |                          ;
Language: C

#include<stdio.h>
#include<string.h>
#include<algorithm>
#define ll long long
using namespace std;
int main()
{
    int n,j=0,m=0,h=0;
    ll a[100005];
    scanf("%d",&n);
    for(int i=0;i<n;i++)
    {
        scanf("%lld",&a[i]);
    }
    sort(a,a+n);
    for(int i=0;i<n;i+=h)
    {
        h=0;
        j=i;
        while(a[i]==a[j])
        {
            h++;
            j++;
        };
        if(h%2==1)
            m++;
    }
    printf("%d\n",m);
    return 0;
}


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

#include <stdio.h>
#include <iostream>
#include <algorithm>
using namespace std;
int a[100005];
int main()
{
    int n,k=0;
    scanf("%d",&n);
    for(int i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    sort(a,a+n);
    for(int i=0;i<n; )
    {
       if(a[i]==a[i+1])
            i=i+2;
       else
       {
           k++;
           i++;
       }

    }
    printf("%d\n",k);
    return 0;

}


Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:2: error: illegal character: '#'
#include <iostream>
^
Main.java:3: error: illegal character: '#'
#include <algorithm>
^
Main.java:5: error: class, interface, enum, or record expected
int a[100005];
^
Main.java:6: error: unnamed classes are a preview feature and are disabled by default.
int main()
^
  (use --enable-preview to enable unnamed classes)
Main.java:9: error: illegal start of expression
    scanf("%d",&n);
               ^
Main.java:12: error: illegal start of expression
        scanf("%d",&a[i]);
                   ^
8 errors
Language: C

#include<algorithm>
#include<stdio.h>
#include<string.h>
#include<math.h>
using namespace std;
int main()
{
    int n,a[100001];
    scanf("%d",&n);
    for(int i=0; i<n; i++)
    {
        scanf("%d",&a[i]);
    }
    sort(a,a+n);
    int f=0;
     for(int i=0; i<n; i++)
    {
      if(a[i]==a[i+1])
       {
           a[i]=a[i+1]=0;
           f+=2;
           i=i+1;
       }
    }
    printf("%d\n",n-f);
    return 0;
}

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

#include<stdio.h>
#include<algorithm>
int main()
{
    int n,a[100005],q=0;
    scanf("%d",&n);
    for(int i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    sort(a,a+n);
    for(int i=0;i<n;i=j)
    {
        for(int j=i+1;j<n;j++)
        {
            if(a[i]!=a[j]&&(j-i)%2!=0)
            {
                ++q;
                break;
            }
        }
        if(a[i]==a[n-1]&&(n-i)%2==0)
            ++q;
    }
    printf("%d\n",q);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   11 |     sort(a,a+n);
      |     ^~~~
      |     std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:12:23: error: 'j' was not declared in this scope
   12 |     for(int i=0;i<n;i=j)
      |                       ^
Language: C++

#include <bits/stdc++.h>
using ll=long long;
using namespace std;
#define rep_i(i, n) for (int i = 0; i < (n); ++i)
#define rep_ll(i, n) for (long long i = 0; i < (n); ++i)
#define r_rep_i(i, start, end) for (int i = (start); i < (end); ++i)
#define r_rep_ll(i, start, end) for (long long i = (start); i < (end); ++i)
#define debug_vi(v) copy((v).begin(), (v).end(), ostream_iterator<int>(cout, " "));
#define debug_vll(v) copy((v).begin(), (v).end(), ostream_iterator<long long>(cout, " "));
#define debug_vd(v) copy((v).begin(), (v).end(), ostream_iterator<double>(cout, " "));
#define sort_v(v) sort((v).begin(), (v).end()); //昇順
#define d_sort_vi(v) sort((v).begin(), (v).end(), greater<int>()); //降
#define d_sort_vd(v) sort((v).begin(), (v).end(), greater<double>()); //昇順
#define say(t) cout << (t) << endl;
#define sum_vi(v) accumulate((v).begin(), (v).end(), 0);
#define sum_vll(v)accumulate((v).begin(), (v).end(), 0LL);

int main(){
  int nums[1000000000];
  int n; cin >> n;
  int tmp;
  rep_i(i, n){
    cin >> tmp;
    nums[tmp - 1] += 1;
  }
  int c;
  rep_i(i, nums.size()){
    if (nums[i]%2 == 1){
      c += 1;
    }
  }
  say(c);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:17: error: request for member 'size' in 'nums', which is of non-class type 'int [1000000000]'
   27 |   rep_i(i, nums.size()){
      |                 ^~~~
a.cc:4:42: note: in definition of macro 'rep_i'
    4 | #define rep_i(i, n) for (int i = 0; i < (n); ++i)
      |                                          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
	int n;
  	cin>>n;
  	ll arr[n];
  	map<ll,ll>mp;
    for(int i=0;i<n;i++) 
    {
      int a;
      cin>>a;
      arr[i]=a;
      mp[a]++;
    }
  	ll count=0;
  	auto itr=mp.begin();
  	for(itr;itr!=mp.end();itr++)
    {
      if((mp->second)%2 !=0)
        count++;
    }
  	cout<<count<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:13: error: base operand of '->' has non-pointer type 'std::map<long long int, long long int>'
   21 |       if((mp->second)%2 !=0)
      |             ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
	int n;
  	cin>>n;
  	ll arr[n]
  	map<ll,ll>mp;
    for(int i=0;i<n;i++) 
    {
      int a;
      cin>>a;
      arr[i]=a;
      mp[a]++;
    }
  	ll count=0;
  	auto itr=mp.begin();
  	for(itr;itr!=mp.end();itr++)
    {
      if((mp->second)%2 !=0)
        count++;
    }
  	cout<<count<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected initializer before 'map'
    9 |         map<ll,ll>mp;
      |         ^~~
a.cc:14:7: error: 'arr' was not declared in this scope
   14 |       arr[i]=a;
      |       ^~~
a.cc:15:7: error: 'mp' was not declared in this scope
   15 |       mp[a]++;
      |       ^~
a.cc:18:18: error: 'mp' was not declared in this scope
   18 |         auto itr=mp.begin();
      |                  ^~
Language: C++

def ABC073C_WriteAndErase():
    N = int(input().strip())
    
    Ai = []
    for i in range(N):
        num = int(input())

        if num in Ai:
            Ai.remove(num)
        else:
            Ai.append(num)

    print(len(Ai))
    

def main():
    ABC073C_WriteAndErase()

if __name__ == "__main__":
    main()


Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def ABC073C_WriteAndErase():
      | ^~~
Language: C++

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

int main() {
    int N; cin >> N;
    vector<ll> l(N);
    for (int i = 0; i < N; i++){
        cin >> l[i];
    }
    sort(l.begin(), l.end());
    ll tmp = l[0];
    int ans = 0;
    int cnt = 1;
    int i = 1;
  /*for (int j = 0; j < N; j++){
    cout << l[j] << endl;
  }*/
    while (i < N) {
      //cout << cnt << endl;
        if (tmp == l[i]) {
            cnt++;
        }
        else {
            if (cnt % 2 == 1){
                ans++;
            }
            tmp = l[i];
            cnt = 1;
        }
        i++;
    }
  if (cnt % 2 == 1){
                ans++;
            }
            tmp = l[i];
            cnt = 1;}
    cout << ans << endl;
}



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

#include <bits/stdc++.h>
using namespace std;
int main(){
	int n,i,a;
	set <int> s;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a);
		if(s.find!=s.end)
		s.insert(a);
		else{
			s.erase(a);
		}
	}
	printf("%d",s.size());
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:30: error: invalid use of member function 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::end() const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; iterator = std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator]' (did you forget the '()' ?)
    9 |                 if(s.find!=s.end)
      |                            ~~^~~
      |                                 ()
Language: C

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

int compare_int(const void *a, const void *b) {
    return *(int*)a - *(int*)b;
}

int main() {
	int N;
	scanf("%d", &N);
	int A[100001];
	for (int i = 0; i < 100001; i++) A[i] = 0;

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

	qsort(A, N, sizeof(int), compare_int);

	int ans = 0, flag = 1;
	int hoge = a[0];
	for (int i = 1; i < N; i++) {
		if (hoge == a[i]) {
			flag = !flag;
		}
		else {
			ans += flag;
			hoge = a[i];
			flag = 1;
		}
	}

	ans += flag;
	printf("%d\n", ans);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:20: error: 'a' undeclared (first use in this function)
   21 |         int hoge = a[0];
      |                    ^
main.c:21:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
using namespace std;
int x[1e10];
int main()
{
	int n,a,cnt=0;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>a;
		if(x[a]==1)x[a]=0;
		else x[a]=1;
	}
	for(int i=1;i<=n;i++)
	{
		if(x[i]==1)cnt++;
	}
	cout<<cnt<<endl;
	return 0;
}

Compiler output:
a.cc:3:7: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    3 | int x[1e10];
      |       ^~~~
a.cc:3:7: error: could not convert '1.0e+10' from 'double' to 'long unsigned int'
    3 | int x[1e10];
      |       ^~~~
      |       |
      |       double
a.cc:3:7: error: size of array 'x' has non-integral type 'double'