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

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.buffer.readline().split()]
def I(): return int(sys.stdin.buffer.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n = I()
    a = IR(n)
    s = defaultdict(lambda : 0)
    for i in a:
        s[i] ^= 1
    print(sum(s.values()))
    return


if __name__ == "__main__":
    solve()

Solution (Python):
import collections

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

M = collections.Counter(L)
C = M.most_common()
cnt = 0

for x in C:
    if x[1] % 2 == 1:
        cnt += 1
        
print(cnt)

Solution (Python):
import sys
from collections import Counter

read = sys.stdin.read
n, *A = map(int, read().split())

counter = Counter(A)
ans = 0
for _, v in counter.items():
    if v % 2 == 1:
        ans += 1
print(ans)

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

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

print(ans)

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

Solution (Python):



N=int(input())

dic={}

for _ in range(N):
    A=input()
    if A in dic:
        dic[A]^=1
    else:
        dic[A]=1

ans=dic.values()
print(sum(ans))

Solution (Python):
from collections import defaultdict as dd
n=int(input())
d=dd(int)
for i in range(n):
    a=int(input())
    if d[a]==0:
        d[a]+=1
    elif d[a]==1:
        d[a]-=1

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

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

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

Solution (Python):
def main():
    n = int(input())
    a = dict()
    for _ in range(n):
        x = int(input())
        if x in a:
            a[x] +=1
        else:
            a[x] = 1
    ans = 0
    for v in a.values():
        if v % 2 == 1:
            ans += 1
    print(ans)

if __name__ == '__main__':
    main()

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 % 2:
            ans += 1
    print(ans)


if __name__ == '__main__':
    main()

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

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

Solution (Python):
n = int(input())
li = [int(input()) for i in range(n)]
dic = {}
for i in li:
    if i in dic:
        dic.pop(i)
    else:
        dic[i] = 1
print(len(dic))

Solution (Python):
import sys
import collections
N = int(input())
input = sys.stdin.readline
d = collections.defaultdict(int)
for i in range(N):
    a = int(input())
    d[a] += 1
ans = 0
for x in d:
    if d[x] % 2 == 1:
        ans += 1
print(ans)

Solution (Python):
S = set()
N = int(input())
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*
N=int(input())
A=[int(input()) for _ in range(N)]
c=Counter(A).values()
ans=sum([i%2==1 for i in c])
print(ans)

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

import collections


a = collections.Counter(a)

a=list(a.most_common())

count=0
for i in range(len(a)):
    if a[i][1]%2==1:
        count+=1
print(count)

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0

dic1 = dict()

n = int(readline())
for i in range(n):
    a = int(readline())
    if a in dic1:
        dic1[a] += 1
    else:
        dic1[a] = 1

ans = 0
for i in dic1.values():
    if not even(i):
        ans += 1
print(ans)

Solution (Python):
import collections
n = int(input())
a = [int(input()) for i in range(n)]
a = collections.Counter(a)
a = list(a.values())
cnt = 0
for i in range(len(a)):
    if a[i] % 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):
from itertools import permutations
import sys

sys.setrecursionlimit(10 ** 6)
from bisect import *
from collections import *
from heapq import *

def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def SI(): return sys.stdin.readline()[:-1]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
int1 = lambda x: int(x) - 1
def MI1(): return map(int1, sys.stdin.readline().split())
def LI1(): return list(map(int1, sys.stdin.readline().split()))
p2D = lambda x: print(*x, sep="\n")
dij = [(1, 0), (0, 1), (-1, 0), (0, -1)]

def main():
    n=II()
    s=set()
    for _ in range(n):
        a=II()
        if a in s:s.remove(a)
        else:s.add(a)
    print(len(s))

main()

Solution (Python):

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

ans = 0
c = collections.Counter(a)
tmp = list(set(a))
for i in tmp:
    if c[i] % 2 == 1:
        ans += 1
print(ans)

Solution (Python):

from collections import Counter
def inputlist(): return [int(k) for k in input().split()]

N = int(input())
A = [0]*N
for i in range(N):
    A[i] = int(input())
c = Counter(A)
keys = c.keys()
ans = 0
for i in keys:
    if c[i] % 2 != 0:
        ans +=1
print(ans)

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


if __name__ == '__main__':
    main()

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

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10
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
def debug(*args):
    if debugmode:
        print(*args)
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def FLOAT(): return float(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()))
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 0, 1, -1, 1, -1, -1, 1]
dy = [1, -1, 0, 0, 1, -1, 1, -1]
debugmode = False

n = INT()
arr = []
for i in range(n):
    a = INT()
    arr.append(a)
b = Counter(arr)
c = set(arr)
ans = len(c)
for i in c:
    if b[i] % 2 == 0:
        ans -= 1
print(ans)

Solution (Python):
def r(a):
    ll,l=[],1
    for i in range(len(a)-1):
        if a[i]==a[i+1]:
            l+=1
        else:
            ll.append([l,a[i]])
            l=1
    ll.append([l,a[-1]])
    return ll
n=int(input())
a=[]
for i in range(n):
    a.append(int(input()))
a.sort()
a=r(a)
b=0
for i in range(len(a)):
    if a[i][0]%2==1:
        b+=1
print(b)

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

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

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

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

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

ARR = []

for i in range(N):
    ARR.append(int(input()))


dict = {}


for ar in ARR:
    if dict.get(ar) == None:
        dict.__setitem__(ar,True)
    else:
        dict.__setitem__(ar,not dict.get(ar))

print(sum(dict.values()))

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

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

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

Solution (Python):
from collections import defaultdict 
N = int(input())
d = defaultdict(int)
for i in range(N):
    a = int(input())
    if d[a] == 0:
        d[a] += 1
    else:
        d[a] -= 1
cnt = 0
for k in d.keys():
    if d[k] > 0:cnt+=1
    
print(cnt)

Solution (Python):
n=int(input())
li=[]
ans=0
fl=1

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

li.sort()

for j in range(n-1):
    if li[j]!=li[j+1]:
        if fl%2==1:
            ans+=1
            fl=1
        else:
            fl=1
    else:
        fl+=1


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

print(ans)

Solution (Python):
n=int(input())
li=[]
ans=0
fl=1

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

li.sort()

for j in range(n-1):
    if li[j]!=li[j+1]:
        if fl%2==1:
            ans+=1
            fl=1
        else:
            fl=1
    else:
        fl+=1


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

print(ans)

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

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

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

Solution (Python):
import sys
P=set()
N=int(input())
for s in sys.stdin.readlines():
    n = int(s)
    if n in P:
        P.remove(n)
    else:
        P.add(n)
print(len(P))

Solution (Python):
dicc=dict()

n=int(input())
for i in range(n):
    ai=input()
    if ai in dicc:
        dicc[ai]=1-dicc[ai]
    else:
        dicc[ai]=1
        
icnt=0    
for i in dicc.values():
    icnt=icnt+i
      
print(icnt)

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

c = collections.Counter(A)

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

Solution (Python):
A = set()

for _ in range(int(input())):
    i = int(input())
    if i in A:
        A.remove(i)
    else:
        A.add(i)
        
print(len(A))

Solution (Python):
from collections import defaultdict
n = int(input())
nums = []
for i in range(n):
  num = int(input())
  nums.append(num)
d = defaultdict(int)
for j in nums:
  d[j] += 1
count = 0
for k in d.values():
  if k % 2 == 1:
    count += 1
print(count)

Solution (Python):
from collections import Counter, deque







import sys
sys.setrecursionlimit(10 ** 5 + 10)


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

    AA=Counter(A)
    cnt=0
    for i in AA.values():
        if i%2==1:
            cnt+=1

    print(cnt)

resolve()

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

Solution (Python):
import sys

P = set()
N = int(input())
for s in sys.stdin.readlines():
    n = int(s)
    if n in P:
        P.remove(n)
    else:
        P.add(n)

print(len(P))

Solution (Python):
from collections import defaultdict

cnt = defaultdict(int)

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

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

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

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

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

Solution (Python):


from collections import Counter


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

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

    print(result)


if __name__ == "__main__":
    main()

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

for val in A:
    if val in num:
        num.remove(val)
    else:
        num.add(val)
    
print(len(num))

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


for i in range(N):
    a = int(input())
    if a in C:
        C[a] += 1
    else:
        C[a] = 1

print(len([1 for i in C.values() if i % 2 == 1]))

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

for i in range(n):
  a = int(input())
  if a not in key:
    key[a] = 1
  elif key[a] == 1:
    key[a] = 0
  else:
    key[a] = 1

ans = 0
for value in key.values():
  ans += value
print(ans)

Solution (Python):
import collections

n = int(input())
a = [int(input()) for _ in range(n)]
c = dict(collections.Counter(a))

ans = 0

for _,val in c.items():
  if val % 2 == 1:
    ans += 1
    
print(ans)

Solution (Python):
from collections import Counter
N = int(input())
a = []
for i in range(N):
    inputs = int(input())
    a.append(inputs)
    
ans = dict(Counter(a))
ans1 = [kv[0] for kv in ans.items() if kv[1]%2==1]

print(len(ans1))

Solution (Python):
N = int(input())
dic = dict()
for j in range(N):
    i = int(input())

    if i not in dic.keys():
        dic[i] = 1
    else:
        if dic[i] == 0:
            dic[i] = 1
        else:
            dic[i] = 0



ans = sum(dic.values())

print(ans)

Solution (Python):
import sys

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

a.sort()

number = {}

for item in a:
    if item in number.keys():
        number[item] += 1
    else:
        number[item] = 1
    
cnt = 0
for i in number.values():
    if i % 2 != 0:
        cnt += 1

print("{}".format(cnt))

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

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

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

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

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

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

cnt = Counter(A)

ans = 0

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

print(ans)

Solution (Python):
def main():
    from collections import Counter
    n, *a = map(int, open(0).read().split())
    b = Counter(a)
    ans = sum(v%2==1 for v in b.values())
    print(ans)

if __name__ == '__main__':
    main()

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

Solution (Python):
from collections import defaultdict
d = defaultdict(bool)
n = int(input())
for _ in range(n):
  i = input()
  d[i] = not d[i]
print(sum(1 for key in d if d[key]))

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

import collections
c = collections.Counter(s)

ans_lis = [x for x in list(c.values()) if x %2 != 0]
print(len(ans_lis))

Solution (Python):
N = int(input())
D = {}
for _ in range(N):
    A = int(input())
    D[A] = not D.get(A, False)
print(sum(D.values()))

Solution (Python):
import collections
s=int(input())
k = [input() for i in range(s)]
c = collections.Counter(k)
z=c.values()
lst=[ e for e in z if e%2==1]
print(len(lst))

Solution (Python):
n = int(input())
ans = 0
d = dict()
for i in range(n):
    a = int(input())
    if a not in d:
        d[a] = 0
    d[a] += 1
da = list(d.values())
for i in range(len(da)):
    if da[i] % 2 == 1:
        ans += 1
print(ans)

Solution (Python):
from collections import Counter

N=int(input())
L=[]
for i in range(N):
	X=int(input())
	L.append(X)
M=Counter(L)
count=0
for i,j in M.items():
	if j%2==1:
		count+=1
print(count)

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

d = {}
for i in a:
    if i in d:
        if d[i] == 0:
            d[i] = 1
        else:
            d[i] = 0
    else:
        d[i] = 1

print(list(d.values()).count(1))

Solution (Python):
import sys
f=sys.stdin.readline
l=[f() for _ in range(int(f()))]
from collections import *
c=Counter(l)
print(sum(v%2 for v in c.values()))

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

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

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

for _ in range(n):
    a = int(input())
    if a in dic:
        dic[a] += 1
    else:
        dic[a] = 1

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

print(ans)

Solution (Python):

from collections import Counter
import sys
try:
    from typing import List
except ImportError:
    pass


def solve(N: int, A: "List[int]"):
    ctr = Counter(A)
    print(sum(1 for key in ctr.keys() if ctr[key] % 2 == 1))


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    A = [int(next(tokens)) for _ in range(N)]  
    solve(N, A)


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 n, count in c.items():
  if count % 2 == 1:
    ans += 1

print(ans)

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

s = set()
for _ in range(n):
    num = int(input())
    if num in s:
        s.remove(num)
    else:
        s.add(num)
print(len(s))

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

print(len(s))

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

from collections import Counter

x = 0
for i in Counter(l).values():
    if i%2 == 1:
        x += 1
print(x)

Solution (Python):
from collections import defaultdict
import sys
rline = sys.stdin.readline


def solve():
    N = int(rline())
    counter = defaultdict(int)
    for _ in range(N):
        counter[int(rline())] += 1
    
    ans = 0
    for val in counter.values():
        if val % 2 == 1:
            ans += 1
    print(ans)


if __name__ == '__main__':
    solve()

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

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

ab.sort()
memo = 1
ans = 0
for i in range(n):
    if i == n-1:
        ans += memo%2
    elif ab[i] == ab[i+1]:
        memo += 1
    else:
        ans += memo%2
        memo = 1
print(ans)

Solution (Python):
import collections

N = int(input())

A = []

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

count = collections.Counter(A)

ans = 0
for k in count:
    if count[k] % 2 == 1:
        ans += 1

print(ans)

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

dict = {}
for i in range(n):
  if str(a[i]) in dict:
    dict.pop(str(a[i]))
    continue
    
  if not(str(a[i]) in dict):
    dict[str(a[i])] =1
    continue
  
    
print(len(dict))

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

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

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

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

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

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

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

Solution (Python):
from collections import defaultdict

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

for _ in range(n):
    d[int(input())] += 1

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

print(cnt)

Solution (Python):
n = int(input())
dic = {}
for i in range(n):
    a = str(input())
    try:
        dic[a]
        dic.pop(a)
    except:
        dic[a] = 0

print(len(dic))

Solution (Python):
def main():
  n=int(input())
  a=sorted([int(input()) for _ in [0]*n])
  a.append(0)
  a=tuple(a)
  cnt,x,ans=0,a[0],0
  for i in a:
    if x==i:
      cnt+=1
    else:
      ans+=1 if cnt%2==1 else 0
      cnt,x=1,i
  print(ans)
if __name__=='__main__':
  main()

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

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

Solution (Python):
import collections

n=int(input())
dic=collections.defaultdict(int)
for _ in range(n):
  tmp=int(input())
  dic[tmp]+=1
ans=0
for key in dic.keys():
  if dic[key]%2==1:
    ans+=1
print(ans)

Solution (Python):
from collections import Counter

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

A = Counter(a)

ans = sum([1 for x in A.values() if x % 2 != 0])
print(ans)

Solution (Python):
N=int(input())
numbers={}
for n in range(0,N):
    number=int(input())
    if number in numbers:
        numbers[number]+=1
    else:
        numbers[number]=1
ans=0
for n in list(numbers.values()):
    ans+=n%2
print(ans)

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

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

for k in l.values():
  if k%2 == 1:
    ans += 1
print(ans)

Solution (Python):

import math
import heapq
import bisect
import numpy as np
from collections import Counter


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

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

print(ans)

Solution (Python):

import sys 
from collections import Counter
def main():
    n = int(input())
    a = list(map(int, [input() for i in range(n)]))
    a_count = Counter(a)
    ans = []

    for i in a_count.items():
        if i[1] % 2 != 0:
            ans.append(i[0])

    print(len(ans))
    
if __name__ == '__main__' :
    main()

Solution (Python):

from collections import Counter
n = int(input())
a = [0]*n
dic = dict()

for _ in range(n):
    a = int(input())
    dic.setdefault(a , 0)
    if dic[a] == 0:
        dic[a] = 1
    else:
        dic[a] -= 1
        
print(sum(dic.values()))

Solution (Python):
n = int(input())
a = []
for i in range(n):
  a.append(int(input()))
a.sort()
b = []
for i in range(0,n-1,2):
  if a[i] != a[i+1]:
    b.append(a[i])
    b.append(a[i+1])
  else:
    continue
if n%2 == 1:
  b.append(a[-1])

ans = []
if b != []:
  ans.append(b[0])
  for j in range(1,len(b)-1,2):
    if b[j] != b[j+1]:
      ans.append(b[j])
      ans.append(b[j+1])
  if len(b)%2 == 0:
    ans.append(b[-1])

if ans == []:
  print(0)
else:
  print(len(ans))

Solution (Python):
n = int(input().strip())
a = [input().strip() for _ in range(n)]
dic = {}
for elem in a:
    if dic.get(elem):
        if dic[elem] == 0:
            dic[elem] = 1
        else:
            dic[elem] = 0
    else:
        dic[elem] = 1
print(len(list(filter(lambda x: x == 1, dic.values()))))

Solution (Python):
from collections import Counter

N = int(input())

nums = [int(input()) for i in range(N)]
    
c = Counter(nums)

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

Solution (Python):

def main():
    import sys
    
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    
    from itertools import combinations, permutations
    
    from bisect import bisect_left,bisect_right
    from math import floor, ceil
    

    

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



if __name__ == '__main__':
    main()

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

Solution (Python):
n = int(input())
t = [int(input()) for _ in range(n)]
t.sort()
c = 1
ans = 0
for i in range(1, n):
    if t[i - 1] == t[i]:
        c += 1
    else:
        if c % 2 != 0:
            ans += 1
        c = 1
if c % 2 != 0:
    ans += 1
print(ans)

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

A={}
for i in range(N):
    a=int(input())
    if a in A.keys():
        A[a]+=1
    else:
        A[a]=1

cnt=0
for k,v in A.items():
    if v%2==1:
        cnt+=1

print(cnt)

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

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

from collections import Counter

AC=Counter(A)

cnt=0
for k,v in AC.items():
    if v%2==1:
        cnt+=1

print(cnt)

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

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

print(ans)

Solution (Python):

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

Solution (Python):
import sys
from io import StringIO
import unittest

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline
    n=int(readline())
    d={}
    for _ in range(n):
        a = readline().strip()
        if a in d:
            d[a]+=1
        else:
            d[a]=1
    cnt=0
    for key in d:
        if d[key]%2==1:
            cnt+=1
    print(cnt)
    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

Solution (Python):
def main():
  n = int(input())
  ans = {}
  for i in range(n):
    num = int(input())
    if num in ans:
      del ans[num]
    else:
      ans[num] = True
  count = len(ans)
  print(count)
  
def input_list():
  return map(int, input().split())

def input_list_str():
  return map(str, input().split())

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

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

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)


def divide_two(arg):
  c = 0
  while True:
    if c >= 2:
      break
    if arg % 2 != 0:
      break
    arg //= 2
    c += 1
  return c 

import math
import fractions
from functools import reduce
main()

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

Solution (Python):
from collections import defaultdict
def solve():
    N = int(input())
    d = defaultdict(int)
    for _ in range(N):
        A = int(input())
        d[A] += 1
    
    cnt = 0
    for key, val in d.items():
        if val % 2 != 0:
            cnt += 1
    
    print(cnt)

if __name__ == '__main__':
    solve()

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

Solution (Python):
n = int(input())
a = []
flag = 0
d = 0
for i in range(n):
  a.append(int(input()))
a.sort()
for i in range(n - 1):
  if flag == 1:
    flag = 0
  elif a[i] == a[i + 1]:
    d = d + 2
    flag = 1
print(len(a) - d)

Solution (Python):
import sys
input = sys.stdin.readline

N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
ans = 0
count = 0
current_num = A[0]
for i in range(N):
    if A[i] == current_num:
        count += 1
    else:
        if count % 2 == 1:
            ans += 1
        count = 1
        current_num = A[i]
if count % 2 == 1:
    ans += 1
print(ans)

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

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