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):
n = int(input())
a = sorted([int(input()) for _ in range(n)])
length = len(a)
cnt = 1
ans = 0
for i in range(length - 1):
  if a[i] == a[i+1]:
    cnt += 1
  else:
    ans += cnt % 2
    cnt = 1
  
ans += cnt % 2
    
    
print(ans)

Solution (Python):
import heapq
n=int(input())
a=[]
for i in range(n):
    a.append(int(input()))
heapq.heapify(a)
ans=0
cnt=0
x=0
while len(a)>0:
    d=heapq.heappop(a)
    
    if cnt!=d:
        cnt=d
        ans+=1
        x=1
    elif cnt==d and x%2==1:
        ans-=1
        x+=1
    elif cnt==d and x%2==0:
        ans+=1
        x+=1
print(ans)

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

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

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

A = {}

for i in range(n):
    a = int(input())
    if a in A:
        A[a] += (-1)**A[a]
    else:
        A[a] = 1

ans = 0
for k, v in A.items():
    ans += v

print(ans)

Solution (Python):
N = int(input())
D = {}
ans = 0
for _ in range(N):
    a = int(input())
    if a in D:
        del D[a]
        ans -= 1
    else:
        D[a] = 1
        ans += 1
print(ans)

Solution (Python):
N = int(input())
arr = [int(input()) for _ in range(N)]
dic = {}
for i in arr:
    if i in dic:
        dic[i] += 1
    else:
        dic[i] = 1
a = 0
for value in dic.values():
    if value % 2 == 1:
        a += 1
print(a)

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

A.sort()
ans = 0
cnt = 1
temp = A[0]
for i in range(1, N):
    if A[i] == temp:
        cnt += 1
    else:
        ans += cnt%2
        cnt = 1
        temp = A[i]
        
ans += cnt%2
print(ans)

Solution (Python):
from collections import Counter
n=int(input())
L=[int(input()) for i in range(n)]
LC=Counter(L)
c=0
for k in LC.keys():
    if LC[k]%2==1:
        c+=1
print(c)

Solution (Python):
def examC():
    N = I()
    d = defaultdict(int)
    for _ in range(N):
        A = I()
        d[A] +=1
    ans = 0
    for i in d.values():
        if i%2==1:
            ans +=1
    print(ans)

import sys
import copy
import bisect
import heapq
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examC()

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

Solution (Python):
N=int(input())
A=[int(input())for _ in range(N)]
A.sort()
ans=0
ptr=0

while(ptr<N):
    cc=A[ptr]
    f=0

    while ptr<N and A[ptr]==cc:
        f += 1
        ptr += 1
    
    ans += f%2

print(ans)

Solution (Python):
N=int(input())
D={}
for i in range(N):
    a=int(input())
    if a in D:
        D[a]+=1
    else:
        D[a]=1

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

Solution (Python):
N = int(input())
A = [int(input()) for i in range(N)]
keys = list(set(A))
values = [0]*len(keys)
dic = {}
dic.update(zip(keys,values))
for i in A:
    dic[i] += 1
tmp = [i%2 for i in dic.values()]
print(sum(tmp))

Solution (Python):
N=int(input())
A=[int(input())for _ in range(N)]
A.sort()
ans=0
check=0
ptr=0
while(ptr<N):
    cc=A[ptr]
    f=0
    while ptr<N and A[ptr]==cc:
        f+=1
        ptr+=1
    ans+=f%2
print(ans)

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

c = collections.Counter(a)

ans = [k for k,v in c.items() if v%2]
print(len(ans))

Solution (Python):
from collections import Counter
n=int(input())
m=0
a=[int(input()) for _ in range(n)]
d=list(Counter(a).values())
for i in range(len(d)):
  if d[i]%2==1:
    m+=1
print(m)

Solution (Python):
import collections as col

n = int(input())
li = [int(input()) for _ in range(n)]
c = col.Counter(li)
ans = 0
for i in c.keys():
  if c[i]%2 == 1:
    ans += 1
print(ans)

Solution (Python):
n = int(input())
paper = {}
cnt = 0
for i in range(n):
    ai = input()
    if paper.get(ai, 0) == 0:
        paper[ai] = 1
        cnt += 1
    else:
        paper[ai] = 0
        cnt -= 1
print(cnt)

Solution (Python):
N = int(input())
A_set = set()
for _ in range(N):
    A = int(input())
    if A in A_set:
        A_set.remove(A)
    else:
        A_set.add(A)

print(len(A_set))

Solution (Python):
n=int(input())
s=[]
for _ in range(n):
    s.append(int(input()))


i=1
cnt=1
ans=0
s.sort()


tmp=s[0]
for i in range(1,n):
    
    if tmp==s[i]:
        cnt+=1
    else:
        tmp=s[i]
        if cnt % 2 == 1:
            ans+=1
        cnt=1
    if i==n-1 and cnt%2==1:
        ans+=1

print(ans)

Solution (Python):

N = int(input())
A = [0 for i in range(N)]
for i in range(N):
    A[i] = int(input())
A.sort()
n = 1
p = 0
for i in range(N-1):
    if A[i] != A[i+1]:
        n = n + 1
        p = 0
    else:
        if p == 0:
            n = n - 1
            p = p + 1
        else:
            n = n + 1
            p = p - 1
print(n)

Solution (Python):
n=int(input())
a=[0]*n
for i in range(n):
  a[i]=int(input())

import collections
counter=collections.Counter(a)

ans=0
for val in counter.values():
  ans+=(val%2==1)

print(ans)

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

dict = {}

for a in A:
    if a not in dict.keys():
        dict[a] = 1
    else:
        dict[a] += 1

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

print(cnt)

Solution (Python):
import collections
N=int(input())
L = [int(input()) for i in range(N)]
count=collections.Counter(L)
count_values=count.values()
print(len([i for i in count_values if i %2==1]))

Solution (Python):
import collections

n = int(input())
a = list()

for i in range(n):
    a.append(int(input()))

dic = collections.Counter(a)
    
dic_list = list(dic.values())
ans = 0
for i in range(len(dic_list)):
    if dic_list[i] % 2 == 1:
        ans += 1

print(ans)

Solution (Python):
N = int(input())
a =set([])
for i in range(N):
  b = int(input())
  if b in a:
    a.remove(b)
  else:
    a.add(b)
print(len(a))

Solution (Python):
N=int(input())
A=[0]*N
for i in range(N):
  A[i]=int(input())
s=set()

for i in range(N):
  if A[i] in s:
    s.remove(A[i])
  else:
    s.add(A[i])
    
print(len(s))

Solution (Python):
import sys
from collections import Counter

N = int(input())
A = Counter([int(sys.stdin.readline()) for _ in range(N)])
ans = 0
for key, num in A.items():
  if num%2==1: ans += 1
print(ans)

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

ns = set()

for i in range(n):
    a = int(input())
    if a not in ns:
        ns.add(a)
    else:
        ns.remove(a)

print(len(ns))

Solution (Python):
n = int(input())
A = [0] * n
for i in range(n):
  A[i] = int(input())
from collections import Counter
C = Counter(A)
counter = 0
for val in C.values():
  counter += val % 2
print(counter)

Solution (Python):
from collections import Counter
N = int(input())
A = []
for i in range(N):
    ai = int(input())
    A.append(ai)
dic = Counter(A)
cnt=0
for idx, val in dic.items():
    if val%2 != 0:
        cnt+=1
print(cnt)

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

ans = 0
paper = {} 



for i in range(N):
    A = int(input())
    
    if A not in paper:
        paper[A] = 1
        ans += 1
    else:
        paper[A] += 1
        if paper[A]%2 == 0:
            ans -= 1
        else:
            ans += 1
    
print(ans)

Solution (Python):
import collections
n=int(input())
a=[int(input()) for _ in range(n)]
ca = collections.Counter(a)
cak = list(ca.values())
res = [i for i in cak if i % 2 ==1]
print(len(res))

Solution (Python):
from collections import defaultdict

N = int(input())
nums = {}

for _ in range(N):
    a = int(input())
    if a in nums:
        nums[a] = (nums[a] + 1) % 2
    else:
        nums[a] = 0

cnt = 0

for key,value in nums.items():
    if value == 0:
        cnt += 1

print(cnt)

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

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

num_list.sort()
num_list2 = []
i = 0
while i < n:
    if i == n-1:
        num_list2.append(num_list[i])
        break
    elif num_list[i] == num_list[i+1]:
        i += 2
    else:
        num_list2.append(num_list[i])
        i += 1


print(len(num_list2))

Solution (Python):


def read_input():
  n = int(input())
  a = []
  for i in range(n):
    a.append(int(input()))
  return n,a

def TLE():
  n,a = read_input()
  sheet = []
  for item in a:
    if item not in sheet:
      sheet.append(item)
    else:
      sheet.pop(sheet.index(item))
  print(len(sheet))
  
def TLE2():
  n,a = read_input()
  items = list(set(a))
  count = 0
  for item in items:
    if a.count(item)%2 != 0:
      count += 1
  print(count)

def main():
  n,a = read_input()
  a.sort()
  items = list(set(a)).sort()
  t = 1
  count = 0
  for i in range(len(a)):
    if i+1 == len(a):
      count += t%2
      break
    if a[i] == a[i+1]:
      t += 1
    else:
      count += t%2
      t = 1
  print(count)

if __name__ == '__main__':
  main()

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

Solution (Python):
N=int(input())
numset=set()
for i in range(N):
    num=int(input())
    if(num in numset):
        numset.discard(num)
    else:
        numset.add(num)

print(len(numset))

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

Solution (Python):
N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
cnt = 1
ans = 0
if len(A) == 1:
    print(1)
    exit()
for i in range(1,N):
    if A[i-1] == A[i]:
        cnt += 1
    else:
        ans += cnt%2
        cnt = 1
if cnt >= 1:
    ans += cnt%2
print(ans)

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

n, *a = (int(x) for x in stdin.read().split())

count = 0
for v in Counter(a).values():
    if v % 2 == 1: count += 1

print(count)

Solution (Python):
from sys import stdin

n, *a = (int(x) for x in stdin.read().split())

each_count = {n: 0 for n in set(a)}


for n in a:
    each_count[n] += 1

count = 0
for v in each_count.values():
    if v % 2 == 1: count += 1

print(count)

Solution (Python):
N = int(input())
A = []
for i in range(N):
    a = int(input())
    A.append(a)

A.sort()
sa = sorted(set(A))

ans_dict = {}
for num in sa:
    ans_dict[num] = -1

for num in A:
    ans_dict[num] *= -1

ans = []
for num, value in ans_dict.items():
    if value == 1:
        ans.append(num)

print(len(ans))

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

Solution (Python):
n=int(input())
a=sorted([int(input()) for _ in range(n)])
ans=0
k=1
for i in range(1,n):
  if a[i]==a[i-1]:
    k+=1
  else:
    ans+=k%2
    k=1
ans+=k%2
print(ans)

Solution (Python):
from collections import defaultdict

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

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

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

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

Solution (Python):
n=int(input())
a=[int(input()) for i in range(n)]
a.sort()
k=1
count=0
for i in range(1,n):
    if a[i]==a[i-1]:
        k+=1
    else:
        if k%2==1:
            count+=1
        k=1
if k%2==1:
    count+=1
print(count)

Solution (Python):
def main():
    N = int(input())
    A = []
    for _ in range(N):
        A.append(input())

    A.sort()

    d = {}
    x = A[0]
    cnt = 1
    
    for ai in A[1:]:
        if ai == x:
            cnt += 1
        else:
            d[x] = cnt
            x = ai
            cnt = 1
    d[x] = cnt

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

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
def main():
    N = int(input())
    A = []
    for _ in range(N):
        A.append(input())

    d = {}
    for ai in A:
        if d.get(ai):
            d[ai] += 1
        else:
            d[ai] = 1

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

    print(cnt)


if __name__ == "__main__":
    main()

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

print(len(list(filter(lambda x: x[1]%2 == 1, c.items()))))

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

dict_ = dict()
for key in list_:
    dict_[key] = dict_.get(key, 0) + 1
print(sum(num % 2 for num in dict_.values()))

Solution (Python):
N = int(input())
A = [int(input()) for i in range(N) ]
paper = {}
for a in A:
  if a in paper:
    paper.pop(a)
  else:
    paper[a] = True
print( len(paper) )

Solution (Python):
N=int(input())
A=[int(input()) for i in range(N)]
A.sort()
c=1
ans=0

for i in range(1,N):
    if A[i]!=A[i-1]:
        if c%2==1:
            ans+=1
        c=1
    else:
        c+=1

if c%2==1:
    ans+=1

print(ans)

Solution (Python):
from collections import Counter

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

a_c = Counter(a).most_common() 
ans = 0
for i in a_c: 
    if i[1] % 2 == 1:
        ans += 1
print(ans)

Solution (Python):
import collections
n=int(input())
a=[]
for _ in range(n):
    a.append(int(input()))
c = collections.Counter(a)
ans=0
for k,v in c.items():
    if v % 2 != 0:
        ans += 1
print(ans)

Solution (Python):
import collections
n=int(input())
a=[int(input()) for _ in range(n)]
c = collections.Counter(a)
ans=0
for k,v in c.items():
    if v % 2 != 0:
        ans += 1
print(ans)

Solution (Python):
a=int(input())
lis=[]
anlis=[]
for j in range(a):
  lis+=[int(input())]
lis.sort()
i=0
while i<len(lis):
  if i==len(lis)-1:
    anlis+=[lis[i]]
  elif lis[i]!=lis[i+1]:
    anlis+=[lis[i]]
  else:
    i+=1
  i+=1
print(len(anlis))

Solution (Python):
import collections

n = int(input())
a = [ input() for _ in range(n)]
b = collections.Counter(a)
c = b.values()
c = list(c)
m = len(b)
ans = 0
for i in range(m):
    if c[i]%2==0:
        continue
    else:
        ans +=1
print(ans)

Solution (Python):
import collections

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

counter = collections.Counter(a)
ans = 0
for k, v in counter.items():
    if v % 2 != 0:
        ans += 1
print(ans)

Solution (Python):
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import fractions
from functools import reduce
import bisect
import sys
import logging
import heapq



input = sys.stdin.readline

setrecursionlimit(1000000)


def main():
	n = int(input())
	d = defaultdict(int)
	for _ in range(n):
		t = int(input())
		if(d[t] == 0):
			d[t] += 1
		else:
			d[t] -= 1
	ans = 0
	for v in d.values():
		ans += v
	print(ans)

def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n**0.5//1))+1):
		if temp%i==0:
			cnt=0
			while temp%i==0:
				cnt+=1
				temp //= i
			arr.append([i, cnt])

	if temp!=1:
		arr.append([temp, 1])

	if arr==[]:
		arr.append([n, 1])

	return arr

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def lcm(numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

class PriorityQueue():
	def __init__(self):
		self.queue = []
	def push(self,i):
		heapq.heappush(self.queue,-i)
	def pop(self):
		return -1 * heapq.heappop(self.queue)
	def sum(self):
		return -sum(self.queue)

main()

Solution (Python):
from collections import Counter

def main():
    N, *A = map(int, open(0).read().split())

    c = Counter(A)


    print(sum(v & 1 for v in c.values()))

if __name__ == "__main__":
    main()

Solution (Python):
import sys
from functools import reduce
import copy
import math
from pprint import pprint
import collections
import bisect


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def solve(inputs):
    numbers = inputs
    number_set = set()

    for n in numbers:
        if n in number_set:
            number_set.remove(n)
        else:
            number_set.add(n)
    return len(number_set)


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    N = int(input())
    ret = solve(int_inputs(N))
    print(ret)

Solution (Python):
n = int(input())
ary = [int(input()) for _ in range(n)]
dic = {}
cnt = 0
for num in ary:
    if num in dic:
        dic[num] += 1
    else:
        dic[num] = 1
for item in dic.items():
    if item[1] % 2 == 1:
        cnt += 1
print(cnt)

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

Solution (Python):
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
d = {}
ans = 0
for i in range(N):
    if A[i] in d:
        d[A[i]] += 1
    else:
        d[A[i]] = 1

for i in d:
    if d[i] % 2 == 1:
        ans += 1
print(ans)

Solution (Python):
import collections
table=collections.defaultdict(int)
N=int(input())
for i in range(N):
  table[input()]+=1
table=list(table.values())
table=[table[i] for i in range(len(table)) if table[i]%2==1]
print(len(table))

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

Solution (Python):
import collections

N=int(input())
A=[int(input()) for i in range(N)]
c=collections.Counter(A)
l=list(c.values())
s=0
for i in l:
    s+=i%2
print(s)

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())
a = set()
for _ in range(n):
    a ^= {input()}
print(len(a))

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

numSet = set()

for i in range(n):
    
    num = int(input())
    if num in numSet:
        numSet.remove(num)
    else:
        numSet.add(num)

print(len(numSet))

Solution (Python):
import collections

N = int(input())

List = {}
for i in range(N):
    A = int(input())
    if List.get(A,None)==None:
        List[A]=1
    else:
        del List[A]

c = collections.Counter(List)

print(len(c))

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

dic = {}

for i in range(n):
    a = input()

    if a in dic.keys():
        dic[a] += 1
    else:
        dic[a] = 1

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



print(ans)

Solution (Python):
Dic = {}
N = int(input())
for _ in range(N):
    a = int(input())
    if a in Dic.keys():
        Dic[a] += 1
    else:
        Dic[a] = 1
ans = 0
for v in Dic.values():
    if v % 2 == 1:
        ans += 1
print(ans)

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

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

count=collections.Counter(A)
ans=0
for i in count.values():
    if i%2:ans+=1
print(ans)

Solution (Python):
dic={}
for _ in range(int(input())):
	a=int(input())
	if a in dic:
		dic[a]=1-dic[a]
	else:
		dic[a]=1
print(sum(dic.values()))

Solution (Python):
N = int(input())
A = [int(input()) for i in range(N)]
cnt = {}
for a in A:
   if a in cnt:
      cnt[a] +=1
   else:
      cnt[a] = 1
ans = 0
for value in cnt.values():
   if value % 2:
        ans+=1
print(ans)

Solution (Python):
n=int(input())
l=[int(input()) for i in range(n)]
from collections import Counter 
c=Counter(l)
s=0 
for i in c: 
    s+=(c[i]&1)
print(s)

Solution (Python):
import collections
n = int(input())
list_a = [int(input()) for _ in range(n)]
count = collections.Counter(list_a)
result = 0
for k, v in count.items():
  if v % 2 != 0:
    result += 1
print(result)

Solution (Python):
import collections
N = int(input())
x = [0] * N
for i in range(N):
  x[i] = int(input())
  
q = collections.Counter(x)
value = q.values()

count = 0
for i in value:
  if i % 2 == 1:
    count += 1

print(count)

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

dict = {}
for _ in range(N):
    a = int(input())
    if a not in dict:
        dict[a] = 1
    elif dict[a] == 1:
        dict[a] = 0
    else:
        dict[a] = 1

print(sum(dict.values()))

Solution (Python):
import collections
N=int(input())
li=[]
for n in range(N):
    A=int(input())
    li.append(A)
li_count=collections.Counter(li)
ans=0
for k in li_count.keys():
    if li_count[k]%2!=0:
        ans+=1
print(ans)

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

import collections

c = collections.Counter(A)

res = 0

for item in c.most_common():
        if item[1]  % 2 != 0:
                res+=1

print(res)

Solution (Python):
import collections

def test():
    n = int(input())
    a = [int(input()) for i in range(n)]
    b = collections.Counter(a)
    ans = 0
    for i in b.values():
        if i % 2 != 0:
            ans += 1
    print(ans)


if __name__ == "__main__":
    test()

Solution (Python):
from collections import Counter
N = int(input())
a = []
count = 0

for i in range(N):
    A = int(input())
    a.append(A)

c = Counter(a)
for i in c:
    if c[i] % 2 == 1:
        count += 1

print(count)

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

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())
s=set()
for i in range(n):s^={input()}
print(len(s))

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

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

for i in range(N):
    A ^= {int(input())}

print(len(A))

Solution (Python):
n=int(input())
a=[]
for i in range(n):
    a.append(int(input()))
a2=sorted(a)
num=a2[0]
count=1
ans=0
for i in range(1,n):
    if a2[i]==num:
        count+=1
    else:
        if count%2==1:
            ans+=1
        num=a2[i]
        count=1
if count%2==1:
        ans+=1
print(ans)

Solution (Python):
from collections import Counter

n = int(input())
a = Counter([int(input()) for _ in range(n)]).values()
res = len(list(filter(lambda x: x%2==1, a)))
print(res)

Solution (Python):
def main():
    N = int(input())
    A = [int(input()) for i in range(N)]
    from collections import Counter
    c = Counter(A)
    ans = 0
    for v in c.values():
        if v&1:
            ans += 1
    
    print(ans)

if __name__ == '__main__':
    main()

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

s = set()
for _ in range(n):
    s ^= {input()}

print(len(s))

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

Solution (Python):
dat = dict()

n = int(input())
import bisect
for i in range(n):
    x = int(input())
    if x in dat:
        del dat[x]
    else:
        dat[x] = 1

print(len(dat))

Solution (Python):
n=int(input())
a=[int(input()) for i in range(n)]
a.append(1000000001)
a.append(0)
a.sort()
c=0
ans=0
s=0

for i in range(1,n+2):
    if a[i]==c:
        s+=1
    else:
        ans+=(s%2)
        c=a[i]
        s=1
    
print(ans)

Solution (Python):
import collections

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

A_count = collections.Counter(A)

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

print(ans)

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

for _ in range(n):
    a = int(input())
    if a in ans:
        del ans[a]
    else:
        ans[a] =1
        
print(len(ans))

Solution (Python):
def input():
    import sys
    return sys.stdin.readline().rstrip()


def main():
    import math
    import collections
    import itertools

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

    counter_a = collections.Counter(as_)
    ans = 0
    for key, count in counter_a.items():
        if count % 2 == 1:
            ans += 1
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
from collections import Counter
N = int(input())
A = []
cnt = 0
for i in range(N):
    a = str(input())
    A.append(a)
c = Counter(A)
set_A = list(set(A))
for i in set_A:
    if int(c[str(i)]) < 2:
        cnt += 1
    else:
        cnt += int(c[str(i)]) % 2
print(cnt)

Solution (Python):
N = int(input())
A = sorted([int(input()) for _ in range(N)])
cnt = 0
cur = 0
for i in range(1,N):
    if A[i]!=A[cur]:
        if (i-cur)%2==1:
            cnt += 1
        cur = i
if (N-cur)%2==1:
    cnt += 1
print(cnt)

Solution (Python):

N = int(input())
S = set()

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

Solution (Python):


N = int(input())

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

B = set()

for a in A:
    if a in B:
        B.remove(a)
    else:
        B.add(a)

print(len(B))

Solution (Python):
from collections import Counter

def main():
  n = int(input())
  ans = 0
  A = Counter((int(input()) for _ in range(n)))
  for i in A.values():
    if i%2 != 0:
      ans += 1
  print(ans)

if __name__=='__main__':
  main()

Solution (Python):
from collections import Counter

n = int(input())
ans = 0

A = Counter((int(input()) for _ in range(n)))

for j in A.values():
  if j%2 != 0:
    ans += 1
print(ans)

Solution (Python):
N =int(input())
from collections import defaultdict
A = defaultdict(int)
for i in range(N):
  A[input()] += 1

print(sum([value%2 for value in A.values()]))

Solution (Python):

from collections import Counter


def main():
    N, *A = map(int, open(0))
    cnt = Counter(A)
    ans = sum(i % 2 for i in cnt.values())
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):

def main():
    N, *A = map(int, open(0).read().split())
    store = set()
    for a in A:
        if a in store:
            store.remove(a)
        else:
            store.add(a)
    ans = len(store)
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):


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

print(len(s))

Solution (Python):
from collections import Counter

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

A = Counter(A)
count = 0

for a in A.values():
    count += a%2

print(count)

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

result = set()

for _ in range(n):
  a = int(input())
  result.add(a) if a not in result else result.remove(a)
  
print(len(result))

Solution (Python):
n=int(input())
l=[]
for i in range(n):
    l.append(int(input()))
l.sort()
l.append(10000000000000000000000)
f=1
ans=0
for i in range(n):
    if l[i]==l[i+1]:
        f+=1
    else:
        ans+=f%2
        f=1
print(ans)

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

Solution (Python):
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))

D = dict()
for i in range(N):
    if A[i] not in D:
        D[A[i]] = 1 
    else:
        D[A[i]] += 1

res = 0
for v in D.values():
    res += v % 2
print(res)

Solution (Python):
def slove():
    import sys
    import collections
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    a = collections.Counter([int(input().rstrip('\n')) for _ in range(n)])
    cnt = 0
    for k, v in a.items():
        if v % 2 != 0:
            cnt += 1
    print(cnt)


if __name__ == '__main__':
    slove()

Solution (Python):
import collections
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
cnt = dict(collections.Counter(A))
ans = 0
for key in cnt.keys():
    value = cnt[key]
    if value%2!=0:
        ans+=1
print(ans)

Solution (Python):
from collections import defaultdict
d = defaultdict(int)

N = int(input())

for i in range(N):
    tmp = input()
    d[tmp] += 1

counter = 0

for j,v in d.items():
    if v % 2 == 1:
        counter += 1

print(counter)

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

Solution (Python):
N=int(input())
A=[]
for i in range(N):
    a=int(input())
    A.append(a)

r=set()
for a in A:
    if a in r:
        r.remove(a)
    else:
        r.add(a)

print(len(r))

Solution (Python):
s = set()

for i in range(int(input())):
  s^={input()}

print(len(s))