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 = [int(input()) for _ in range(N)]
dic = {num: 0 for num in set(A)}
for i in range(N):
    dic[A[i]] = 1 if dic[A[i]]==0 else 0
ans = 0
for num in set(A):
    ans += dic[num]
print(ans)

Solution (Python):
n=int(input())
A=[int(input()) for _ in range(n)]
B={}
for i in A:
    if i in B:
        B[i]=(1+B[i])%2
    else:
        B[i]=1
print(sum(B.values()))

Solution (Python):
N = int(input())
numbers = {}
for i in range(N):
    x = int(input())
    if x in numbers:
        del numbers[x]
    else:
        numbers[x] = 1
print(len(numbers))

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
print(sum(d.values()))

Solution (Python):
import collections
n=int(input())
l = [input() for i in range(n)]
c = collections.Counter(l)
ans = 0

for x,y in c.items():
    if y%2 != 0:
        ans += 1
print(ans)

Solution (Python):
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

c = Counter(l)

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

print(ans)

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    N = INT()
    A = [INT() for _ in range(N)]

    ctr = Counter(A)
    ans = 0
    for c in ctr.values():
        if c % 2 == 1:
            ans += 1

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect, bisect_left, bisect_right

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = [INT() for i in range(N)]

S = set(A)
C = Counter(A)

cnt = 0
for s in S:
    if C[s] % 2 != 0:
        cnt += 1
print(cnt)

Solution (Python):
import collections as c;print(sum([i%2!=0 for i in c.Counter([int(input()) for _ in range(int(input()))]).values()]))

Solution (Python):
import collections as c
print(sum([1 for i in c.Counter([int(input()) for _ in range(int(input()))]).values() if i%2!=0]))

Solution (Python):


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

a.sort()

i = 0

while i < n:
    ko = 1
    while (i + ko) < n and a[i] == a[i + ko]:
        ko += 1
    if ko % 2 == 1:
        ans += 1
    i += ko

print(ans)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = [INT() for _ in range(N)]
count = [0]*N
zipped = {x:i for i, x in enumerate(set(A))}
A = [zipped[x] for x in A]

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

print(sum(x%2==1 for x in count))

Solution (Python):
import collections


def solve():
    pass


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

c = collections.Counter(A)
cnt = 0
for k, v in c.items():
    if v % 2 == 0: continue
    else: cnt += 1
print(cnt)

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

Solution (Python):
import collections
N=int(input())
L=list()
for i in range(N):
  L.append(int(input()))
c = collections.Counter(L)
a=list(c.values())
a=[i%2 for i in a]
print(sum(a))

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

    A = sorted(A)

    i = 0
    k = 0
    ans = 0

    while i < N:
        tmp = A[i]
        n = 0
        while k < N and tmp == A[k]:
            n += 1
            k += 1
        i = k
        if n%2 == 1:
            ans += 1

    print(ans)
            
        


if __name__ == "__main__":
    solve()

Solution (Python):




import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """3
6
2
6"""
        output = """1"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """4
2
5
5
2"""
        output = """0"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """6
12
22
16
22
18
12"""
        output = """2"""
        self.assertIO(input, output)


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

    AM = {}
    for a in A:
        AM.setdefault(a, 0)
        AM[a] += 1

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

    print(ans)


if __name__ == "__main__":
    
    resolve()

Solution (Python):
N=int(input())
d={}

for i in range(N):
    a=int(input())
    d[a] = not(d.get(a, 0))
print(sum(d.values()))

Solution (Python):
from collections import defaultdict
n = int(input())
dd = defaultdict(int)
for i in range(n):
  s = int(input())
  dd[s]+=1
res = 0
for i in dd.keys():
  if dd[i]%2:
    res+=1
print(res)

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

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

Solution (Python):
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext

def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    n = i_input()
    num_list = i_row(n)

    num_counter = Counter(num_list)

    count = 0

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

    print(count)

if __name__ == '__main__':
    main()

Solution (Python):
def main():
    N = int(input())
    A = dict()

    for _ in range(N):
        num = int(input())
        if num in A:
            del A[num]
        else:
            A[num] = 1

    print(len(A))


if __name__ == "__main__":
    main()

Solution (Python):

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

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

Solution (Python):
N = int(input())
a = [input() for _ in range(N)]
d = {}
for i in range(N):
    if a[i] not in d:
        d[a[i]] = 1
    else:
        d.pop(a[i])
print(len(d))

Solution (Python):
dic = {}
N = int(input())

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

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

print(len(dic))

Solution (Python):
n = int(input())
l = {}
ans = 0
for _ in range(n):
    a = int(input())
    if a in l:
        l[a] += 1
    else:
        l[a] = 1
for v in l.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)
cnt=0
for i in c:
    if c[i]%2==1:
        cnt+=1
print(cnt)

Solution (Python):
import collections
n=int(input())
num=[]
l=[]
count=0
for _ in range(n):
    a=int(input())
    l.append(a)
l=collections.Counter(l)
for i in l.values():
    if i%2!=0:
        count+=1
print(count)

Solution (Python):
import collections
print(len(list(filter(lambda c: c % 2 == 1, list(collections.Counter([int(input()) for i in range(int(input()))]).values())))))

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

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

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

Solution (Python):

N = int(input())
N_Dict = {}
for i in range(N):
    moji = str(input())
    if moji in N_Dict:
        N_Dict.pop(moji)
    else:
        N_Dict[moji] = 1
print(len(N_Dict))

Solution (Python):
n = int(input())
dic = {}
for i in range(n):
    a = int(input())
    dic.setdefault(a,0)
    dic[a] += 1
    if dic[a] == 2:
        dic.pop(a)

print(len(dic))

Solution (Python):
def main():
    n = int(input())
    indic = dict()
    ans = 0

    for _ in range(n):
        a = int(input())
        if a in indic:
            indic[a] += 1
        else:
            indic[a] = 1
    for k in indic:
        if indic[k] % 2 != 0:
            ans += 1
    
    print(ans)




if __name__ == "__main__":
    main()

Solution (Python):
from collections import Counter
from typing import List


def main(n: int, a: List[int]):
    c = Counter(a)
    ans = 0

    for t in c.values():
        if t % 2 == 1:
            ans += 1

    print(ans)


if __name__ == "__main__":
    n = int(input())
    a = [int(input()) for _ in range(n)]

    main(n, a)

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

dic = {}

for a in A:
    if a in dic:
        dic[a] += 1

    else:
        dic[a] = 1

ans = 0

for a in dic:
    if dic[a] % 2 != 0:
        ans += 1

print(ans)

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):
import sys

input = sys.stdin.readline
d = {}
for _ in range(int(input())):
    i = int(input())
    if i in d:
        del d[i]
    else:
        d[i] = True
print(len(d))

Solution (Python):
n=int(input())
A=[]
for i in range(n):
    A.append(input())
import collections
B = collections.Counter(A)
C=list(set(A))
cnt=0
for j in range(len(C)):
    if B[C[j]] %2 != 0:
        cnt+=1
print(cnt)

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

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



res=0
i=0
while i<N:
  c=A[i]
  f=0
  while i<N and A[i]==c:
    f+=1
    i+=1
  res+=f%2
print(res)

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

Solution (Python):
import collections

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

ans = 0
cnt = collections.Counter(table).most_common()

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

print(ans)
exit()

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

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

Solution (Python):
from collections import Counter

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

c = Counter(A)

if len(c)==N:
  print(N)
  exit()
elif len(c)==N-1:
  print(N-2)
  exit()

ans = 0
for k in c.keys():
  if c[k] % 2 == 1:ans += 1
    
print(ans)

Solution (Python):
import collections
cc = collections.Counter()
for _ in range(int(raw_input())):
	v = int(raw_input())
	cc[v] += 1
	if cc[v] == 2:
		cc[v] = 0
s = 0
for k in cc:
	if cc[k] == 1:
		s +=1
print s

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

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

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

Solution (Python):
from collections import defaultdict

N = int(input())

dic = defaultdict(bool)
for _ in range(N):
  a = int(input())
  dic[a] = not dic[a]

print(sum(dic.values()))

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

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 i in range(N)]

c = Counter(A)

ret = list(filter(lambda x: x % 2 == 1,  c.values()))

print(len(ret))

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 i in range(N)]

c = Counter(A)

ret = 0
for key, item in c.items():
    if item % 2 == 1:
        ret += 1

print(ret)

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

a.sort()
count = 0
temp = a[0]
tempcount = 1
for i in range(1,n):
    if a[i]==temp:
        tempcount += 1
    else:
        if not tempcount%2 == 0:
            count += 1
        tempcount = 1
    temp = a[i]
    
if tempcount%2 == 1:
    count += 1
print(count)

Solution (Python):
import sys
import itertools

import time
import math
import heapq
from collections import defaultdict
from collections import Counter
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 18
MOD = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines



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

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

cnt = 0
for i in range(n):
    ai = int(input()) - 1

    if ai in a:
        cnt -= 1
        del a[ai]
    else:
        cnt += 1
        a[ai] = 1

print(cnt)

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

dic = {}
for i in range(n):
  a = int(input())
  if not a in dic:
    dic[a] = 1
  else:
    dic[a] += 1
print(len([k for k, v in dic.items() if v % 2 != 0]))

Solution (Python):
n = int(input())
d = dict()
for _ in range(n):
    k = int(input())
    if d.get(k) == None or d.get(k) == 0:
        d[k] = 1
    else:
        d[k] = 0

print(sum(d.values()))

Solution (Python):
from typing import List


def main():
    n = int(input())
    nums = [input() for _ in range(n)]
    print(wae(n, nums))


def wae(n: int, nums: List[str]) -> int:
    s = set()

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

    return len(s)


if __name__ == '__main__':
    main()

Solution (Python):
def c(s):
    n = input()
    if n in s:
        s.remove(n)
    else:
        s.add(n)

def main():
    n = int(input())
    s = set()

    for i in range(n):
        c(s)

    print(len(s))


if __name__ == '__main__':
    main()

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

Solution (Python):
import collections

n=int(input())

arr=[]

for i in range(n):

    a=int(input())
    arr.append(a)

c = collections.Counter(arr)

ans=0

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

print(ans)

Solution (Python):
n=int(input())
d={}
for x in range(n):
  s=int(input())
  if s in d:
    if d[s]==0:
      d[s]=1
    else:
      d[s]=0
      
  if s not in d:
    d[s]=1
  
ans=0
for y in d:
  if d[y]==1:
    ans+=1
    
print(ans)

Solution (Python):
import sys
import collections
import bisect


def main():
    n = int(input())
    A = [int(input()) for _ in range(n)]
    c = collections.Counter(A)
    sumA = 0
    cKeys = c.keys()
    for cKey in cKeys:
        sumA += c[cKey] % 2
    print(sumA)


if __name__ == '__main__':
    main()

Solution (Python):
from itertools import groupby

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

A=sorted(A)

ans=0
for i,k in groupby(A):
    if (len(list(k)))%2==1:
        ans+=1

print(ans)

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

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


def main():
    N = int(input())
    d = set()
    for _ in range(N):
        a = int(input())
        if a in d:
            d.remove(a)
        else:
            d.add(a)
    print(len(d))



if __name__ == "__main__":
    main()

Solution (Python):
n=int(input())
a=[int(input()) for i in range(n)]
num={}
counter=0
for i in range(n):
    num.setdefault(a[i],0)
    num[a[i]]+=1

for i in num:
    if num[i]%2!=0:
        counter+=1

print(counter)

Solution (Python):
import sys
n=int(input())
a=list(map(int,sys.stdin.read().split()))
a.sort()

ptr,res=0,0
while ptr < n:
  cc=a[ptr]
  f=0
  while ptr < n and a[ptr]==cc:
    f+=1
    ptr+=1
  res+=f%2
print(res)

Solution (Python):
from collections import defaultdict
import sys
n=int(input())
a=list(map(int,sys.stdin.read().split()))
a.sort()
curc=0
cntc=0
ans=0
for aa in a:
  if aa == curc:
    cntc+=1
  else:
    curc=aa
    ans+=cntc%2
    cntc=1
ans+=cntc%2
print(ans)

Solution (Python):
from collections import defaultdict
import sys
n=int(input())
a=list(map(int,sys.stdin.read().split()))
dd=defaultdict(lambda: 0)
for aa in a:
  dd[aa]+=1
ans=0
for e in dd.values():
  if e%2==1:
    ans+=1
print(ans)

Solution (Python):
import collections

N,*A = map(int, open(0).read().split())
B = collections.Counter(A)
print(len([v for k,v in B.items() if v % 2]))

Solution (Python):
import sys
from heapq import heapify, heappop
read=sys.stdin.read

n,*a=map(int,read().split())
a.append(max(a)+1)
heapify(a)
x=heappop(a)
f=1
ans=0
while a:
  y=heappop(a)
  if x==y:
    f^=1
  else:
    ans+=f
    f=1
    x=y
print(ans)

Solution (Python):
import sys
from collections import Counter
read=sys.stdin.read

n,*a=map(int,read().split())
x=Counter(a)
print(sum(list(map(lambda n:n%2, list(x.values())))))

Solution (Python):









import os
import sys


from collections import Counter


def main():
    n = int(input())
    a = []
    for _ in range(n):
        a.append(int(input()))
    a_cnt = Counter(a)
    keys = a_cnt.keys()
    values = a_cnt.values()
    cnt = 0
    for k, v in zip(keys, values):
        if v % 2 == 1:
            cnt += 1
    print(cnt)


if __name__ == "__main__":
    main()

Solution (Python):
import collections
N = int(input())
A = collections.Counter(int(input()) for T in range(N)).most_common()
Num = 0
for T in range(len(A)):
    if A[T][1]%2!=0:
        Num += 1
print(Num)

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

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

    d = dict()
    for a in A:
        if a in d and d[a]:
            d[a] = False
        else:
            d[a] = True

    ans = sum(1 for flag in d.values() if flag)

    print(ans)
    return


if __name__ == '__main__':
    main()

Solution (Python):
import sys
from collections import defaultdict

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

    d = defaultdict(bool)
    for a in A:
        if d[a]:
            d[a] = False
        else:
            d[a] = True

    ans = sum(1 for f in d.values() if f)
    
    print(ans)
    return


if __name__ == '__main__':
    main()

Solution (Python):
import collections

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

A = dict(collections.Counter(A))

cnt = 0
for a in A:
    if A[a] % 2 == 1:
        cnt += 1
        
print(cnt)

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

Solution (Python):
from collections import Counter
n=int(input())
a=[int(input()) for _ in range(n)]
a_count=Counter(a)
count=0
for i in a_count:
    if a_count[i]%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()

odd = 0
prev = A[0]
cnt = 1

for i in range(1,n):
    if A[i] != prev:
        if cnt % 2 == 1:
            odd += 1
        cnt = 1
        prev = A[i]
    else:
        cnt += 1

if cnt % 2 == 1:
    odd += 1

print(odd)

Solution (Python):
from collections import Counter
N=int(input())

numbers=[]

for _ in range(N):
    A=int(input())
    numbers.append(A)

answers=Counter(numbers)

answer=0
for value in answers.values():
    if value%2==1:
        answer+=1
print(answer)

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

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


c = collections.Counter(A)
count = 0
for i in c:
    count+=c[i]%2
print(count)

Solution (Python):
from collections import Counter
N = int(input())
c = Counter([input() for _ in range(N)])
print(sum(i%2 for i in c.values()))

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

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

Solution (Python):
n = int(input())
a = [0]*n

for i in range(n):
  a[i] = int(input())
  
a.sort()
a.append(-1)
ans = []
cn = 0
c = 1

for i in range(n):
  if a[i] != a[i+1]:
    ans.append(c)
    c = 1
  else:
    c += 1


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

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

Solution (Python):
from collections import Counter
n = int(input())
lst = []
for _ in range(n):
    lst.append(int(input()))

C_lst = Counter(lst)

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

Solution (Python):
from collections import Counter

n = int(input())
A = [0]*n
for i in range(n):
    A[i] = int(input())

C = Counter(A)
values, counts = zip(*C.most_common())
print(len([i for i in counts if i % 2 == 1]))

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

Solution (Python):

from collections import defaultdict
n, *a = map(int, open(0).read().split())
b = defaultdict(int)
for i in a:
    b[i] += 1
print(sum(i % 2 > 0 for i in b.values()))

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

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

Solution (Python):
import collections
n=int(input())
lst=[int(input()) for i in range(n)]
xs=list(set(lst))
ans=0
lst=collections.Counter(lst)
for i in xs:
  if lst[i]%2==1:
    ans+=1

print(ans)

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

Solution (Python):

from collections import Counter

def isOdd(x):
  return x % 2

def solve(n,a):
  d = Counter(a)
  return sum(map(isOdd,d.values()))


def main():
  N = int(input())
  a = [int(input()) for _ in range(N)]
  print(solve(N,a))
  return

if __name__ == '__main__':
  main()

Solution (Python):

from collections import Counter

def isOdd(x):
  return x % 2

def solve(n,a):
  d = Counter(a)
  return sum(1 for x in d.values() if isOdd(x))


def main():
  N = int(input())
  a = [int(input()) for _ in range(N)]
  print(solve(N,a))
  return

if __name__ == '__main__':
  main()

Solution (Python):
from collections import Counter
n = int(input())
l = []
for i in range(n):
   l.append(int(input()))
lcnt = Counter(l)
l_value = list(lcnt.values())
for i in range(len(l_value)):
  if l_value[i]%2 == 0:
    l_value[i] = 0
  else:
    l_value[i] = 1    
print(sum(l_value))

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

ad = dict()
for _ in range(n):
    a = int(input())
    ad.setdefault(a, -1)
    ad[a] *= -1

ans = 0
for c in ad.values():
    if c > 0:
        ans += c
print(ans)

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

l = sorted(a)
same = 1
count = 0
for i in range(1, n):
    if l[i] == l[i - 1]:
        same += 1
        continue
    if same % 2 == 1:
        count += 1
    same = 1
if same % 2 == 1:
    count += 1
print(count)

Solution (Python):
import collections

n = int(input())
A = list(int(input()) for i in range(n))

c = collections.Counter(A)

ans = 0

for x in c.values():
    if x % 2 == 1:
        ans += 1

print(ans)

Solution (Python):
from collections import *
N = int(input())
C = Counter([int(input()) for n in range(N)])
print(sum(v%2==1 for v in C.values()))

Solution (Python):
from collections import *
N = int(input())
C = Counter([int(input()) for n in range(N)])
ans = 0

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

print(ans)

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

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

Solution (Python):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from collections import Counter
def main():
    n = input()
    a = tuple(map(int, readlines()))
    ac = Counter(a)
    ac2 = [c % 2 for c in ac.values()]
    r = sum(ac2)
    print(r)
if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
d=dict()
for _ in range(n):
    a=int(input())
    if a not in d:
        d[a]=0
    else:
        del d[a]
print(len(list(d)))

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

for a, b in dict.items():
    if b % 2 != 0:
        ans += 1
print(ans)

Solution (Python):

N = int(input())
li = []
dict1 = {}
for _ in range(N):
  li.append(int(input()))



for i in range(N):
  if str(li[i]) in dict1:
    
    del dict1[str(li[i])]
  else:
    
    dict1[str(li[i])] = '0'

print(len(dict1))