stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<iostream>

#include<algorithm>

using namespace std;

int cmp(const void* a,const void* b){

	return *(const int*)a-*(const int*)b;

}

int main(){

	int n=0;

	cin>>n;

	int *a=new int[n];

    int count=0;

    int i=0;

	while(i<n){

	cin>>a[i++];

	}

	qsort(a,n,sizeof(int),cmp); 

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

		int temp=1;

		while(i<(n-1)&&a[i]==a[i+1]){

		   temp++;

		   i++;

	    }

		if(temp&0x01)count+=1 ;

	}

	cout<<count;

}

// Faster C++ solution for the same problem (measured speedup: 5.231070203019051x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include<iostream>

#include<set>

using namespace std;

int main(){

	int n,cnt=0;

	cin>>n;

	set<int> people;

	set<int>::iterator it;

	for(int i=0;i<n;i++)

	{

		int t;

		cin>>t;

		it=people.find(t);

		if(it!=people.end())

			people.erase(it);

		else

			people.insert(t);

	}

	cout<<people.size();

    

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.273546380144432x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include<cstdio>

#include<map>

using namespace std;

int main()

{

    map<int,bool>mp;

    map<int,bool>::iterator it;

    long long cnt;

    int n,id;

   scanf("%d",&n);

    {

         cnt=0;

         mp.clear();

         while(n--)

         {

             scanf("%d",&id);

             it=mp.find(id);

             if(it==mp.end())

             {

                 mp.insert(make_pair(id,true));

                 cnt++;

             }

             else

             {

                 if(it->second)

                 {

                     it->second=false;

                     cnt--;

                 }

                 else

                 {

                     it->second=true;

                     cnt++;

                 }

             }



         }

    } printf("%lld\n",cnt);

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 4.849177591755558x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

set<int> ss;

int main()

{

    int n,num;

    scanf("%d",&n);

    for(int i = 0; i < n; ++i)

    {

        scanf("%d",&num);

        if(ss.find(num) != ss.end())

            ss.erase(num);

        else

            ss.insert(num);

    }

    cout << ss.size() << endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.2401199595537875x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include<stdio.h>

#include<string.h>

#include<stdlib.h>

#include<iostream>

#include<algorithm>

#include<string>

#include<map>

#include<set>

#define maxn 1005

using namespace std;

typedef long long  LL;

map<string,int>mp;

int main()

{

    int n;

    scanf("%d",&n);

    set<int>s;

    while(n--)

    {

        int t;

        scanf("%d",&t);

        if(s.count(t))

        {

            s.erase(t);

        }

        else

            s.insert(t);

    }

    cout<<s.size()<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.238712380681994x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include <stdio.h>

#include <set>

using namespace std;

int main()

{

    int n,x;

    scanf("%d",&n);

    set<int> st;

    for(int i=0;i<n;i++)

    {

       scanf("%d",&x);

       if(st.count(x)==0)

            st.insert(x);

       else

        st.erase(x);

    }

    printf("%d\n",st.size());

}


// Faster C++ solution for the same problem (measured speedup: 4.847199771336018x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include<cstdio>

#include<cstdlib>

#include<algorithm>

#include<cstring>

using namespace std;



const int maxn = 100010;



int main()

{

	int n;

	int a[maxn];

	memset(a, 0, sizeof(a));

	scanf("%d", &n);

	for (int i = 0; i < n; i++)

	{

		scanf("%d", &a[i]);



	}

	sort(a, a + n);

	int num = 0;

	for (int i = 0; i <=n; i++)

	{

		if (a[i] != a[i + 1])

		{

			num++;

		}

		else

			i++;

	}

	printf("%d", num);





	system("pause");

	return 0;



}

// Faster C++ solution for the same problem (measured speedup: 3.124141620053639x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include<iostream>

#include<algorithm>

using namespace std;





int main() {

	int n;

	cin >> n;

	int* x=new int[n];

	int k;

	for (int i = 0; i < n; i++)cin >> x[i];

	sort(x, x + n);

	//for (int i = 0; i < n; i++)cout << x[i];

	k = x[0];

	int num = 1;

	int sum = 0;

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

		if (x[i] == k) {

			num++;

		}

		else {

			if (num % 2)sum++;

			k = x[i];

			num = 1;

		}

	}

	if (num % 2)sum++;

	cout << sum;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.224741792787465x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include<stdio.h>

#include<set>

using namespace std;

int main(){

	

	set<int> s;

	int n;

	scanf("%d",&n);

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

		int x;

		scanf("%d",&x);

		if(s.count(x)==0)

		s.insert(x);

		else

		s.erase(x);

		}

		printf("%d\n",s.size());

		return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 4.8471153691268825x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include<iostream>

#include<map>

using namespace std;

map<int, bool> m;

int main()

{

	int n,temp,num=0;

	cin >> n;

	for (int i = 0; i < n; i++)

	{

		cin >> temp;

		if (m[temp] == 1)

		{

			m[temp] = 0; num--;

		}

		else

		{

			m[temp] = 1; num++;

		}

	}

	cout << num;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.238887518776858x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include<iostream>

#include<cstdio>

#include<string>

#include<vector>

#include<algorithm>

#include<set>

using namespace std;



int main()

{

	int n, number;

	cin >> n;

	set<int> s;

	for(int i = 0; i < n; i++)

	{

		cin >> number;

		if(s.count(number) == 0)

		{

			s.insert(number);

		}

		else 

		{

			s.erase(number);

		}

	}

	cout << s.size() << endl;

	

	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.281775455098888x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int n,input,l;

set<int>total;

int main()

{

    total.clear();

    cin>>n;

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

            l=total.size();

        cin>>input;

        total.insert(input);

        int k=total.size();

        if(l==k){

            total.erase(input);

        }

    }

    cout<<total.size();

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.235270736657285x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

const int N = 100001;

struct str{

    long long s,g;

}f[N];

long long n,z,c;

long long a[N];

void chong()

{

    f[1].s=a[1];f[1].g=1;c=1;

    for(int i = 2;i<=n;i++)

    {

        if(a[i] != a[i-1])

        	f[++c].s=a[i],f[c].g=1;

        else f[c].g++;

    }

}

int main()

{

    cin>>n;

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

		cin>>a[i];

	}

    sort(a+1,a+n+1);

    chong();

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

    	if(f[i].g%2==1){

    		z++;

    	}

    }

    cout<<z<<endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.225633436824111x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

using namespace std;



const int M = 1e5+10;

int a[M];



int main()

{

	int n;

	cin>>n;

	for(int i=0;i<n;i++)

		cin>>a[i];

	sort(a,a+n);

	int cnt=0;

	a[n] = a[0]-1;

	for(int i=0;i<n;i++)

		if(a[i] != a[i+1])

			cnt++;

		else

			i++;

	cout<<cnt<<endl;

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.228457582490134x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include<iostream>

#include<string.h>

#include<cstdio>

#include<map>

using namespace std;





int main(){



   int n, l, r;

   while(cin >> n){

      map<int, int> mp;

      //memset(flag, 0, sizeof(flag));

      int a;

      int cnt = 0;

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

         int a;cin >> a;

         mp[a]++;

         if(mp[a] & 1){

            cnt++;

         }else{

            cnt--;

         }

      }

      cout << cnt <<endl;

   }





   return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.291686844435508x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include <iostream>

#include <set>

using namespace std;



int main(){



    int n;

    set<int> a;

    int x;

    cin >> n;

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

        cin >> x;

        if(!a.insert(x).second)

            a.erase(x);

    }

    cout << a.size() << endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.281463166925086x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include<iostream>

#include<algorithm>

#include<map>

using namespace std;

int a[100010];

int main()

{

	int n,i,num=0,k=1;

	cin>>n;

	for(i=0;i<n;i++)

	{

		cin>>a[i];

	}

	sort(a,a+n);

	for(i=0;i<n-1;i++)

	{

		if(a[i]==a[i+1])

			k=(k+1)%2;

		else

		{

			num+=k;

			k=1;

		}

	}

	if(k%2==1)

	  num+=1;

	cout<<num<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.228520708601626x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include<cstdio>

#include<iostream>

#include<set>

using namespace std;

typedef long long ll;

set<ll>s;

int main()

{

    int n;

    cin>>n;

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

        ll t;

        cin>>t;

        if(s.count(t))s.erase(s.find(t));

        else s.insert(t);

    }

    cout<<s.size();

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.245103973199588x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include<iostream>

#include<map>

using namespace std;

map<int,int>mp;

int main()

{

	int n,t,ans=0;

	cin >> n;

	for(int i=0;i<n;i++)

	{

		cin >> t;

		if(mp[t]==0)

		{

			mp[t]=1;

			ans++;

		}

		else

		{

			mp[t]=0;

			ans--;

		}

	}

	cout << ans;

}

// Faster C++ solution for the same problem (measured speedup: 5.240392054861942x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int n;

map<int,int> mp;

int main(){

    while(~scanf("%d",&n)){

        mp.clear();

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

            int id;

            scanf("%d",&id);

            if(!mp.count(id)){

                mp[id] = 1;

            }

            else{

                mp[id] = mp[id] ^ 1;

            }

        }

        int ans = 0;

        for(auto it : mp){

            if(it.second == 1) ans++;

        }

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

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.226056641578238x):
#include <cstdio>

#include <algorithm>

using namespace std;



int main()

{

    int n;

    scanf("%d", &n);

    int a[n];

    for (int i = 0; i < n; i++)

    {

        scanf("%d", &a[i]);

    }

    sort(a, a + n);

    int c = 1, ans = 0;

    for (int i = 0; i < n; i++)

    {

        if (a[i] == a[i + 1])

        {

            c++;

        }

        if (a[i] != a[i + 1])

        {

            if (c % 2 == 0)

            {

                ans--;

                c = 1;

            }

            if (c % 2 == 1)

            {

                ans++;

                c = 1;

            }

        }

    }

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

}