Problem:
 Score : 300 points    Problem Statement You are playing the following game with Joisino.   Initially, you have a blank sheet of paper.  Joisino announces a number. If that number is written on the sheet, erase the number from the sheet; if not, write the number on the sheet. This process is repeated N times.  Then, you are asked a question: How many numbers are written on the sheet now?   The numbers announced by Joisino are given as A_1, ... ,A_N in the order she announces them. How many numbers will be written on the sheet at the end of the game?      Constraints  1≤N≤100000  1≤A_i≤1000000000(=10^9)  All input values are integers.         Input Input is given from Standard Input in the following format:  N  A_1  :  A_N       Output Print how many numbers will be written on the sheet at the end of the game.        Sample Input 1 3
6
2
6      Sample Output 1 1  The game proceeds as follows:    6 is not written on the sheet, so write 6 .    2 is not written on the sheet, so write 2 .    6 is written on the sheet, so erase 6 .    Thus, the sheet contains only 2 in the end. The answer is 1 .       Sample Input 2 4
2
5
5
2      Sample Output 2 0  It is possible that no number is written on the sheet in the end.       Sample Input 3 6
12
22
16
22
18
12      Sample Output 3 2

Solution (Python):
import collections

N = int(input())

l = list()
for i in range(N):
    l.append(int(input()))

c = collections.Counter(l)

la = list(c.values())
M = len(la)
ans = 0
for i in range(M):
    if la[i] % 2 == 1:
        ans += 1

print(ans)

Solution (Python):
import collections

N = int(input())

l = list()
for i in range(N):
    l.append(int(input()))

c = collections.Counter(l)

la = list(c.values())
M = len(la)
ans = 0
for i in range(M):
    if la[i] % 2 == 1:
        ans += 1

print(ans)

Solution (Python):
from collections import *
N,*A=map(int,open(0).read().split())
print(sum([i&1 for i in Counter(A).values()]))

Solution (Python):
def resolve():
    
    n = int(input())
    
    
    
    A = [int(input()) for i in range(n)]
    
    
    
    

    A = sorted(A)
    Dic = {a:0 for a in set(A)}

    for x in A:
        Dic[x] += 1

    cnt = 0
    for y in Dic:
        if Dic[y] % 2 == 1:
            cnt += 1

    print(cnt)


resolve()

Solution (Python):

import re
import math
from collections import defaultdict
from collections import deque
import collections
from fractions import Fraction
import itertools
from copy import deepcopy
import random
import time
import os
import queue
import sys
import datetime
from functools import lru_cache

readline=sys.stdin.readline
sys.setrecursionlimit(2000000)

alphabet="abcdefghijklmnopqrstuvwxyz"
mod=int(10**9+7)
inf=int(10**20)
def yn(b):
    if b:
        print("yes")
    else:
        print("no")
def Yn(b):
    if b:
        print("Yes")
    else:
        print("No")
def YN(b):
    if b:
        print("YES")
    else:
        print("NO")
class union_find():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(n)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def ispow(a,b):
    now=b
    while now<a:
        now*=b
    if now==a:return True
    else:return False
def getbin(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def getfacs(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod_>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def nextcomb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:return num
def getprimes(n,type="int"):
    if n==0:
        if type=="int":return []
        else:return [False]
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    if(type=="bool"):return A
    B=[]
    for a in range(n+1):
        if(A[a]):B.append(a)
    return B
def isprime(num):
    if(num<=1):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def ifelse(a,b,c):
    if a:return b
    else:return  c
def join(A,c=""):
    n=len(A)
    A=list(map(str,A))
    s=""
    for a in range(n):
        s+=A[a]
        if(a<n-1):s+=c
    return s
def factorize(n,type_="dict"):
    b = 2
    list_ = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            list_.append(b)
        b+=1
    if n > 1:list_.append(n)
    if type_=="dict":
        dic={}
        for a in list_:
            if a in dic:
                dic[a]+=1
            else:
                dic[a]=1
        return dic
    elif type_=="list":
        return list_
    else:
        return None
def pm(x):
    return x//abs(x)
def inputintlist():
    return list(map(int,input().split()))


n=int(input())
A=[0]*n
for a in range(n):
    A[a]=int(input())
C=collections.Counter(A)
ans=set()
for a,b in C.items():
    if b%2==1:
        ans.add(a)
print(len(ans))

Solution (Python):
n=int(input()) 
s=set()
for i in range(n):
  s^={input()}
print(len(s))

Solution (Python):
from collections import Counter

N=int(input())
A=[int(input()) for _ in range(N)]
a=Counter(A)

ans=0
for key,count in a.most_common():
    if count%2==1:
        ans+=1
print(ans)

Solution (Python):
from collections import Counter

n = int(input())
a = [int(input()) for _ in range(n)]

c = Counter(a)

ans = 0
for key, value in c.most_common():
    if value % 2 != 0:
        ans += 1

print(ans)

Solution (Python):
n = int(input())
a = [int(input()) 
     for nesya in range(n)]
s = set()
for b in a:
  if b in s:
    s.discard(b)
  else:
    s.add(b)
print(len(s))

Solution (Python):
import sys
import collections

readline = sys.stdin.readline

def main():
    N = int(readline())
    A = []
    for _ in range(N):
        A.append(int(readline()))
    Aitems = list(zip(*collections.Counter(A).items()))
    Acount = list(Aitems[1])
    tmp = [x%2 for x in Acount]
    ans = sum(tmp)
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
n=int(input())
temp=set()
for i in range(0,n):
  a=int(input())
  if a not in temp:
    temp.add(a)
  else:
    temp.discard(a)
print(len(temp))

Solution (Python):

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(readline())
a = []
for i in range(N):
     a.append(int(readline()))

a.sort()

res = 0
cnt = 1
for i in range(1,N):
    if a[i] == a[i-1]:
        cnt+=1
    else:
        if cnt%2:
            res+=1
        else:
            cnt=1

            

if cnt%2:
    print(res+1)
else:
    print(res)

Solution (Python):
N = int(input())

S = set()
for i in range(N):
    A = int(input())
    if A not in S:
        S.add(A)
    else:
        S.remove(A)

print(len(S))

Solution (Python):
N = int(input())
memo = {}
for _ in range(N):
    Ai = int(input())
    try:
        memo[Ai] += 1
    except:
        memo[Ai] = 1

ans = 0
for i in memo:
    if memo[i] % 2 == 1:
        ans += 1

print(ans)

Solution (Python):
n = int(input())
D = {}
cnt = 0
for _ in range(n):
    a = int(input())
    if a not in D:
        D[a] = 1
    else:
        D[a] += 1
for i in D:
    if D[i] % 2 != 0:
        cnt += 1
print(cnt)

Solution (Python):
from collections import Counter
N = int(input())
AB = [int(input()) for _ in range(N)]
CAB = Counter(AB)
ans = 0

for i,j in CAB.items():
  if j%2 != 0:
    ans += 1

print(ans)

Solution (Python):
import collections

n = int(input())
li = [int(input()) for i in range(n)]
c = collections.Counter(li)
ans = 0

for item in c.items():
    if item[1]%2 == 1:
        ans += 1

print(ans)

Solution (Python):
from collections import defaultdict


N = int(input())
A = [int(input()) for _ in range(N)]

dict = defaultdict(int)
for a in A:
    dict[a] += 1

ans = 0
for value in list(dict.values()):
    if value % 2 == 1:
        ans += 1

print(ans)

Solution (Python):
import collections,sys
def I(): return int(sys.stdin.readline().rstrip())
N = I()
A = [I() for _ in range(N)]
count_A = collections.Counter(A)
print(sum([1 for v in count_A.values() if v%2==1]))

Solution (Python):
from collections import defaultdict

N = int(input())
memo = defaultdict(int)

for _ in range(N):
    memo[int(input())] += 1

ans = list(memo.values())
ans = [x for x in ans if x % 2 == 1]

print(len(ans))

Solution (Python):
n = int(input())
a = [int(input()) for _ in range(n)]

cnt = set([])
for i in a:
    if i in cnt:
        cnt.discard(i)
    else:
        cnt.add(i)
print(len(cnt))

Solution (Python):
N = int(input())
A = sorted([int(input()) for i in range(N)])
c = 0
n = 1
for i in range(N - 1):
    if A[i + 1] == A[i]:
        n += 1
    else:
        if n % 2 == 1:
            c += 1
        n = 1
if n % 2 == 1:
    c += 1
print(c)

Solution (Python):


import numpy as np
import math
import sys
from collections import defaultdict
input = sys.stdin.readline
n = int(input())
d = defaultdict(int)

for i in range(n):
    k = int(input())
    if d[k] ==1:
        d[k] -=1
    else:
        d[k] +=1
print(sum(d.values()))

Solution (Python):
n = int(input())
a = [int(input()) for _ in range(n)]

total = {}
for i in a:
  if i in total:
    total[i] += 1
  else:
    total[i] = 1

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

print(ans)

Solution (Python):
from collections import Counter
N = int(input())
ans = Counter([int(input()) for _ in range(N)])
cnt = 0
for c in ans.values():
    if c%2 == 1:
        cnt += 1
print(cnt)

Solution (Python):
N=int(input())
A=dict()
for i in range(N):
	tmp=int(input())
	if not tmp in A:
		A[tmp]=1
	elif A[tmp]==1:
		A[tmp]=0
	else:
		A[tmp]=1
print(sum(A.values()))

Solution (Python):
n = int(input())
a = [0]*n
for i in range(n):
    a[i] = int(input())
import collections
c = collections.Counter(a)
L = set(a)
b = list(L)
count = 0
for i in range(len(b)):
    if c[b[i]]%2 == 1:
        count += 1
print(count)

Solution (Python):
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline
N = int(readline())

NUMBERS = defaultdict(bool)

for _ in range(N):
  n = int(readline())
  NUMBERS[n] = not NUMBERS[n]

ans = 0
for k,v in NUMBERS.items():
  if v:
    ans += 1

print(ans)

Solution (Python):
n=int(input())

a=[int(input()) for i in range(n)]

dic={}

for i in range(n):
    if a[i] not in dic:
        dic[a[i]]=1
    else:
        dic[a[i]]+=1

ans=0

for val in dic.values():
    if val%2==1:
        ans+=1

print(ans)

Solution (Python):
n=int(input())

a=[int(input()) for i in range(n)]

dic={}

for i in range(n):
    if a[i] not in dic:
        dic[a[i]]=1
    else:
        dic[a[i]]+=1

ans=0

for val in dic.values():
    if val%2==1:
        ans+=1

print(ans)

Solution (Python):
n = int(input())
num_dict = {}
for i in range(n):
    tmp = input()
    num_dict.setdefault(tmp ,1)
    num_dict[tmp] += 1
    
cnt = 0
for i in num_dict.values():
    if i % 2 == 0:
        cnt += 1
print(cnt)

Solution (Python):
import collections

N = int(input())
num_list = [int(input()) for i in range(N)]

CTR_num = collections.Counter(num_list)
summ = 0

for i in CTR_num.keys():
    n = CTR_num[i]
    
    if (n % 2 != 0):
        summ += 1

print(summ)

Solution (Python):
from collections import Counter
N = int(input())
A = [int(input()) for i in range(N)]
dic= Counter(A)
ans = 0
for i in dic:
    if dic[i]%2==1:
       ans += 1
print(ans)

Solution (Python):
from sys import stdin
def main():
    
    readline=stdin.readline
    n=int(readline())
    a=[int(readline()) for _ in range(n)]

    s=set()
    for i in range(n):
        if a[i] in s:
            s.remove(a[i])
        else:
            s.add(a[i])

    print(len(s))
    
if __name__=="__main__":
    main()

Solution (Python):
from collections import Counter
n = int(input())
a = [int(input()) for i in range(n)]
ans = 0
c = Counter(a)
for i in c.values():
    if i%2!=0:
        ans+=1
print(ans)

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

from collections import Counter

n = int(readline())
a = [int(readline()) for _ in range(n)]
ans = 0
for v in Counter(a).values():
    ans += 1 if v % 2 == 1 else 0
print(ans)

Solution (Python):
from collections import Counter

N = int(input())
numbers = [int(input()) for _ in range(N)]
counter = Counter(numbers)

print(len([0 for count in counter.values() if count % 2 == 1]))

Solution (Python):
import collections
N =int(input())
A = [int(input()) for _ in range(N)]
A_col = collections.Counter(A)
ans = 0

for v in A_col.values():
    if v % 2 == 1:
      ans += 1
print(ans)

Solution (Python):
import math
import queue
from collections import defaultdict

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def printQueue(q):
	r=qb
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
def dq():
	return queue.deque()
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): 
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): 
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} 
def bitArr(n):
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): 
			k = i-a*j
			if k%b==0:
				return i
	return -1

n = readInt()
d = defaultdict(int)
for i in range(n):
	d[readInt()]+=1
ans = 0
for i in d.values():
	if i%2==1:
		ans+=1
print(ans)

Solution (Python):
N = int(input())
inputSet = set()

for i in range(N):
    a = input()
    try:
        inputSet.remove(a)
    except KeyError:
        inputSet.add(a)

print (len(inputSet))

Solution (Python):
from collections import Counter
N = int(input())
A = sorted([int(input()) for _ in range(N)])
c = Counter(A)

count = 0
for i, v in c.items():
    if (v % 2 == 0):
        continue
    else:
        count += 1

print(count)

Solution (Python):
from collections import Counter
N = int(input())
A = sorted([int(input()) for _ in range(N)])
c = Counter(A)

count = 0
for i, v in c.items():
    if (v % 2 == 0):
        continue
    else:
        count += 1

print(count)

Solution (Python):
N = int(input())
A = set()
for i in range(N):
    n = int(input())
    if not (n in A):
        A.add(n)
    else:
        A.remove(n)
print(len(A))

Solution (Python):
from collections import defaultdict

n = int(input())
cnt = defaultdict(int)

for i in range(n):
  cnt[int(input())] += 1

ret = 0
for c in cnt.values():
  
  if c % 2 == 1:
    ret += 1

print(ret)

Solution (Python):
n=int(input())
s=set()
for i in range(n):
  x=int(input())
  if x in s:
    s.remove(x)
  else:
    s.add(x)
print(len(s))

Solution (Python):
import collections
N = int(input())
A = [int(input()) for i in range(N)]
c = collections.Counter(A)
num = 0
for i,j in c.items():
  if j%2 != 0:
    num += 1
print(num)

Solution (Python):
import collections
N = int(input())
A = [int(input()) for i in range(N)]
c = collections.Counter(A)
num = 0
for i,j in c.items():
  if j%2 != 0:
    num += 1
print(num)

Solution (Python):
from collections import Counter

N = int(input())
A = [int(input()) for i in range(N)]

c = Counter(A)

ans = 0
for i, j in c.items():
    if j%2 != 0:
        ans += 1

print(ans)

Solution (Python):
import sys
import re
import math
import collections
import decimal
import bisect
import itertools
import fractions

import copy





sys.setrecursionlimit(10000001)
INF = sys.maxsize
MOD = 10 ** 9 + 7

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))




def main():
    n = ni()
    a = set()

    for _ in range(n):
        ai = ni()
        if ai not in a:
            a.add(ai)
        else:
            a.remove(ai)

    print(len(a))


if __name__ == '__main__':
    main()

Solution (Python):
import collections
N = int(input())
A = [int(input()) for i in range(N)]
C = list(collections.Counter(A).values())
counter = 0
for x in C:
  if x%2 == 1:
    counter += 1
print(counter)

Solution (Python):
from collections import Counter

N = int(input())
A = [int(input()) for i in range(N)]

c = Counter(A)

ans = 0
for i, j in c.items():
    if j%2 != 0:
        ans += 1

print(ans)

Solution (Python):
from collections import Counter
n = int(input())
a_input = [int(input()) for i in range(n)]

a_count = Counter(a_input)
print(sum(v%2!=0 for v in a_count.values()))

Solution (Python):
n=int(input())
s=set()
for i in range(n):s^={input()}
print(len(s))

Solution (Python):
import collections

N = int(input())
x = []
for _ in range(N):
    x.append(input())

c = collections.Counter(x)

ct=0
for v in c.values():
    if (v%2)!=0:
        ct+=1

print(ct)

Solution (Python):


from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement

N = int(input())
A = [int(input()) for _ in range(N)]

c = Counter(A)

ct = 0
for i in c.values():
    if i % 2 != 0:
        ct += 1

print(ct)

Solution (Python):

import collections
N = int(input())
A = [int(input()) for _ in range(N)]

C = collections.Counter(A)

ans = 0
for n, t in C.items():
    if t%2 != 0: ans+=1
print(ans)

Solution (Python):
from sys import stdin
from collections import Counter


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    N = int(_in[0])  
    A_arr = []
    for i in range(N):
        _ = int(_in[i+1])  
        A_arr.append(_)
    
    cnt = 0
    count = Counter(A_arr).values()
    count_odd = [_ for _ in count if _%2==1]
    cnt = len(count_odd)
    
    print(cnt)

Solution (Python):
import collections
N = int(input())
A = [int(input()) for _ in range(N)]

c = collections.Counter(A)
cnt = 0
for key, value in c.items():
    if value % 2 == 1:
        cnt += 1
print(cnt)

Solution (Python):
import collections
n = int(input())
a = []
ans = 0
for _ in range(n):
    a.append(int(input()))
acnt = collections.Counter(a)
for cnt in acnt.values():
    if cnt%2 == 1:
        ans += 1
print(ans)

Solution (Python):
from collections import Counter


n = int(input())
m = [int(input()) for _ in range(n)]
s = Counter(m)
print(sum(1 if i % 2 != 0 else 0 for i in s.values()))

Solution (Python):
N = int(input())
A = [int(input()) for _ in range(N)]
B = {}
for i in A:
    if i not in B:
        B[i] = 1
    else:
        if B[i] == 1:
            B[i] -= 1
        else:
            B[i] += 1
cnt = 0
for j in B.keys():
    if B[j] == 1:
        cnt += 1
print(cnt)

Solution (Python):
n = int(input())
candidate = {}

for i in range(n):
    s = str(input().split())
    if s not in candidate.keys():
        candidate[s] = 1
    else:
        candidate[s] += 1

ans = 0
for v in candidate.values():
    if v % 2 == 0:
        continue
    else:
        ans += 1

print(ans)

Solution (Python):
import sys
from collections import Counter

N = int(sys.stdin.readline())

A = []
for _ in range(N):
    a = int(sys.stdin.readline())
    A.append(a)

counter = Counter(A)
ans = 0
for key, count in counter.items():
    if count % 2 == 1:
        ans += 1

print(ans)

Solution (Python):


n = int(input())
a = [int(input()) for _  in range(n)]


d = {}
for i in a:
    if i not in d:
        d[i] = 0
        d[i] +=1
    elif i in d:
        if d[i] == 0:
            d[i] +=1
        else:
            d[i] -=1
        
        
l =[]
for i in d.keys():
    if d[i] != 0:
        l.append(d[i])
print(len(l))

Solution (Python):
from collections import Counter

N = int(input())
a = []
for _ in range(N):
    a.append(int(input()))
    
a = Counter(a)
ans = 0
for value in a.values():
    if value % 2 == 1:
        ans += 1
print(ans)

Solution (Python):
n = int(input())
paper = {}
for _ in range(n):
    a = int(input())
    if a in paper:
        paper[a] += 1
    else:
        paper[a] = 0

count = 0
for val in paper.values():
    if val%2 != 1:
        count += 1
print(count)

Solution (Python):
from collections import defaultdict
n = int(input())
paper = defaultdict(lambda : 0)
for _ in range(n):
    a = int(input())
    if paper[a] == 0:
        paper[a] = 1
    else:
        paper[a] =0
total = 0
for i in paper.values():
    if i > 0:
        total += 1
print(total)

Solution (Python):
from collections import defaultdict
N = int(input())
d = defaultdict(int)
ans = 0

for _ in range(N):
    n = int(input())
    d[n] += 1
    if d[n] % 2 == 0:
        ans -= 1
    else:
        ans += 1

print(ans)

Solution (Python):
import collections
n = int(input())
a = [int(input()) for _ in range(n)]

count = collections.Counter(a)
num =list(count.values())
ans = 0

for i in num:
    if i % 2 == 1:
        ans += 1

print(ans)

Solution (Python):
n = int(input())
a = [int(input()) for _ in range(n)]

paper = set()

for elem in a:
    if elem in paper:
        paper.discard(elem)
    else:
        paper.add(elem)

print(len(paper))

Solution (Python):
from collections import defaultdict

n = int(input())
a = [int(input()) for _ in range(n)]
h = defaultdict(int)
for x in a:
    h[x] += 1
ans = 0
for k in h:
    if h[k] % 2 == 1:
        ans += 1
print(ans)

Solution (Python):
from collections import defaultdict

n = int(input())
a = [int(input()) for _ in range(n)]
h = defaultdict(int)
for x in a:
    h[x] += 1
ans = 0
for k in h:
    if h[k] % 2 == 1:
        ans += 1
print(ans)

Solution (Python):
N = int(input())
A = [input() for i in range(N)]
dic={}
for a in A:
  if a not in dic:
    dic[a] = 1
  elif dic[a] != 1:
    dic[a] = 1
  else:
    dic[a] = 0
print(list(dic.values()).count(1))

Solution (Python):
n=int(input())
li=[input() for i in range(n)]

dic={}
for i in li:
    if i not in dic:
        dic[i] = 1
    elif dic[i] != 1:
        dic[i] = 1
    else:
        dic [i] = 0
        
cnt = 0     
for i in dic:
    if dic[i] == 1:
        cnt += 1
print(cnt)

Solution (Python):


N = int(input())



from collections import Counter

def main():
    A = [int(input()) for _ in range(N)]
    cnt = Counter(A).items()
    ans = 0
    for k, v in cnt:
        if v % 2 == 1:
            ans += 1
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
a = [int(input()) for i in range(n)]
wordcount = {}
for i in a:
  if i in wordcount:
    del wordcount[i]
  else:
    wordcount[i] = 1
print(len(wordcount))

Solution (Python):
n=int(input())
d=dict()
for i in range(n):
  n=int(input())
  if n in d:
    d[n]+=1
  else:
    d[n]=1
ans=0
for i in d:
  if d[i]%2:
    ans+=1
print(ans)

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

Solution (Python):
from sys import stdin


def main():
    n = int(stdin.readline())
    a = [int(stdin.readline()) for _ in range(n)]
    l = {}
    for ai in a:
        if ai not in l:
            l[ai] = 1
        else:
            l[ai] = l[ai] + 1
    ans = 0
    for key in l:
        if l[key] % 2 == 1:
            ans += 1
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
import collections
N=int(input())
a=[]
for i in range(N):
  A=int(input())
  a.append(A)
c=collections.Counter(a)
for i in c.keys():
  if c[i]%2==0:
    N-=c[i]
  else:
    N-=c[i]-1
print(N)

Solution (Python):
def resolve():
	d = {}
	n = int(input())
	for _ in range(n):
		a = int(input())
		if d.get(a):
			del d[a]
		else:
			d[a] = True
	print(len(d.keys()))
resolve()

Solution (Python):
n=int(input())
a=[int(input()) for i in range(n)]
d={}
for i in range(n):
  if a[i] in d:
    d[a[i]]+=1
  else:
    d[a[i]]=1
cnt=0
d=list(d.items())
for i in range(len(d)):
  if d[i][1]%2==1:
    cnt+=1
print(cnt)

Solution (Python):
import sys
import os
import math
import bisect
import collections
import itertools

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def f(A, B, x):
    return math.floor(A * x / B) - A * math.floor(x / B)


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    A = collections.Counter(ii() for _ in range(N))

    print(sum(1 for v in A.values() if v % 2 != 0))


if __name__ == '__main__':
    main()

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

Solution (Python):
from collections import Counter
n = int(input())
a = [int(input()) for _ in range(n)]
d = dict(Counter(a))
cnt = 0
for v in d.values():
    if v%2!=0:
        cnt+=1
print(cnt)

Solution (Python):
from collections import Counter
def main():
    n = int(input())
    l1 = []
    for _ in range(n):
        l1.append(input())
    l1c = Counter(l1)
    l1c2 = [c for c in l1c if l1c[c]%2 != 0]
    print(len(l1c2))

if __name__ == '__main__':
    main()

Solution (Python):
from collections import Counter
N = int(input())
a = [int(input()) for i in range(N)]
C = Counter(a)
ans = 0
for v in C.values():
    if v%2==1:
         ans += 1
print(ans)

Solution (Python):
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    N = int(input())
    d = defaultdict(int)
    for _ in range(N):
        d[int(input())] += 1
    ans = 0
    for i in d.values():
        if i%2==1:
            ans +=1
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
N=int(input())

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

Solution (Python):
n = int(input())
A = [int(input()) for _ in range(n)]

import collections
c = collections.Counter(A)
ans = 0
for key in c.keys():
    if c[key]%2 == 1:
        ans +=1
print(ans)

Solution (Python):
import collections

n = int(input())
a = [int(input()) for i in range(n)]
x = collections.Counter(a)
y = x.most_common()
ans = 0
for i in range(len(y)):
    if y[i][1]%2==1:
        ans+=1
print(ans)

Solution (Python):
N = int(input())
dic = {}
for i in range(N):
    a = input()
    if a not in dic or dic[a] == 0:
        dic[a] = 1
    elif dic[a] == 1:
        dic[a] = 0
cnt = 0
for key,vol in dic.items():
    if vol == 1:
        cnt += 1
print(cnt)

Solution (Python):
from collections import Counter
n = int(input())
l = []
for i in range(n):
  l.append(int(input()))
c = Counter(l)
ans = 0
for i in list(c.values()):
  if i % 2 == 1:
    ans += 1
print(ans)

Solution (Python):
import collections

N = int(input())
A = [int(input()) for i in range(N)]

A_counter = collections.Counter(A)

ans = 0
for a in A_counter.items():
    
    if a[1] % 2 != 0:
        ans += 1

print(ans)

Solution (Python):
from collections import Counter
import sys

def input():
    return sys.stdin.readline().strip()

def main():
    N = int(input())
    A = [input() for _ in range(N)]
    common = Counter(A).most_common()
    ans = 0
    for i in common:
        if i[1] % 2 == 1:
            ans += 1
    print(ans)
    
if __name__ == "__main__":
    main()

Solution (Python):
import math

n = int(input())
counts = {}
for i in range(n):
    a = int(input())
    count = counts.get(a, 0)
    counts[a] = count + 1

c = 0
for k, v in counts.items():
    if v % 2 == 1:
        c += 1
print(c)

Solution (Python):
A = {}

n = int(input())

for _ in range(n):
    a = int(input())
    A[a] = not A.setdefault(a, False)

print(sum(A.values()))

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

Solution (Python):

def resolve():
    '''
    code here
    '''
    import collections

    N = int(input())
    A_list = [int(input()) for _ in range(N)]
    cnt_dic = collections.Counter(A_list)

    cnt = 0
    for v in cnt_dic.values():
        if v % 2 == 1:
            cnt += 1

    print(cnt)

if __name__ == "__main__":
    resolve()

Solution (Python):
import collections
def slove(n, xs):

    count = collections.Counter()

    for i in xs:
        count[i] += 1

    ans = len([value for value in count.values() if value % 2 == 1])
    return ans

if __name__ == "__main__":
    n = int(input())
    xs = [int(input()) for i in range(n)]
    print(slove(n, xs))

Solution (Python):
def main():
    N = int(input())
    A = [int(input()) for a in range(N)]
    S = set()

    for i in range(N):
        if A[i] in S:
            S.remove(A[i])
        else:
            S.add(A[i])
    print(len(S))
if __name__ == "__main__":
    main()

Solution (Python):
A = int(input())
ans = set()
for i in range(A):
    B = int(input())
    if B in ans:
        ans.remove(B)
    else:
        ans.add(B)
print(len(ans))