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())
listForA=[]

index=0
while index < n:
   listForA.append(int(input()))
   index+=1

listForA.sort()
index2 =0
beforeC=""
count=0
allCount=0
while index2 < n:
    if index2==0:
        beforeC=listForA[index2]
        count=1
    else:
        if beforeC == listForA[index2]:
            count+=1
        else:
            if count%2==1:
                allCount+=1
            beforeC = listForA[index2]
            count=1
    index2+=1
if count%2==1:
    allCount+=1

print(allCount)

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

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

N_dict = {}
count = 0

for a in A:
    if a not in N_dict:
        count += 1
        N_dict[a] = 1
    elif N_dict[a] % 2 == 0:
        count += 1
        N_dict[a] += 1
    else:
        count -= 1
        N_dict[a] += 1

print(count)

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

Solution (Python):
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
A.sort()
i = 1
cnt = 1
ans = 0
while True:
    if i >= len(A):
        break
    if A[i] == A[i - 1]:
        cnt += 1
    else:
        if cnt % 2 != 0:
            ans += 1
        cnt = 1
    i += 1
if cnt % 2 != 0:
    ans += 1
print(ans)

Solution (Python):
from collections import Counter

n = int(input())
a = [int(input()) for _ in range(n)]
c = Counter(a)
ans = 0
for key in c.keys():
    if c[key] & 1:
        ans += 1
print(ans)

Solution (Python):

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

Solution (Python):
import sys
from collections import Counter

input = sys.stdin.readline

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

ans = len([v for v in Counter(A).values() if v % 2 == 1])
print(ans)

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

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

count = 0
for a, i in a_list.items():
    if i % 2 == 0:
        continue
    else:
        count += 1
print(count)

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]

def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def main():
    N = int(input())
    m = defaultdict(int)
    for _ in range(N):
        A = int(input())
        m[A] += 1

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


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
d = {}
for _ in range(n):
    a = int(input())
    if a not in d.keys():
        d[a] = 1
    else:
        d[a] += 1

print(sum([1 for i in d.values() if i % 2 == 1]))

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

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

num = {}
for i in range(n):
    if not a[i] in num.keys():
        num[a[i]] = 1
    elif num[a[i]] == 1:
        num[a[i]] = 0
    else:
        num[a[i]] = 1
        
ans = 0
for k in num.keys():
    if num[k] > 0:
        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())

paper = set()
X = []
for i in range(N):
  X.append(int(input()))
  
for x in X:
  if x in paper:
    paper.remove(x)
  else:
    paper.add(x)
    
print(len(paper))

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

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

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

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


a_set = set()
for ai in a:
    if ai in a_set:
        a_set.remove(ai)
    else:
        a_set.add(ai)
        
print(len(a_set))

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

cnt = 0

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


print(cnt)

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

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

dic = {}
for i in range(N):
    a = int(input())
    if a in dic:
        dic.pop(a)
    else:
        dic[a] = 1
ans = len(dic)
print(ans)

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

Solution (Python):
N = int(input())
ans = 0
n = [0] * N
for i in range(N):
  n[i] = int(input())
n.sort()
i=0
cnt = 1
while(i<N-1):
  if n[i] == n[i+1]:
    cnt += 1

  else:
    if cnt % 2 == 1:
      ans += 1
    cnt = 1

  i += 1

if cnt % 2 == 1:
  ans += 1
 
print(ans)

Solution (Python):
N = int(input())
ans = 0
n = []
for i in range(N):
  n.append(int(input()))
n.sort()
i=0
cnt = 1
while(i<N-1):
  if n[i] == n[i+1]:
    cnt+=1
  else:
    if cnt%2==1:
      ans+=1
    cnt = 1
    
  i+=1
if cnt%2==1:
  ans+=1

print(ans)

Solution (Python):
from collections import Counter

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

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

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

Solution (Python):
from collections import Counter
from functools import reduce

N = int(input())
c = Counter(input() for _ in range(N))
print(reduce(lambda a, x: a + (x & 1), c.values(), 0))

Solution (Python):
N, = map(int, raw_input().split())
d = {}
for i in range(N):
  a, = map(int, raw_input().split())
  d[a] = d.get(a, 0)+1
r = 0
for k in d.keys():
  r += 0 if d[k]%2==0 else 1
print r

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

Solution (Python):
from itertools import groupby
n = int(input())
a = [int(input()) for _ in range(n)]
a = sorted(a)
g = groupby(a)
res = 0
for k,v in g:
    res += len(list(v))%2
print(res)

Solution (Python):
from collections import defaultdict

N = int(input())
a = [ int(input()) for i in range(N) ]
d = defaultdict(int)

cnt = 0
for i in a:
    if d[i] == 1:
        d[i] = 0
        cnt -= 1
    else:
        d[i] = 1
        cnt += 1


print(cnt)

Solution (Python):
from collections import defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
AtoZ = [chr(i) for i in range(65,65+26)]
atoz = [chr(i) for i in range(97,97+26)]

def inpl(): return list(map(int, input().split()))
def inpl_s(): return list(input().split())

N = int(input())
dd = defaultdict(int)
ans = 0
for i in range(N):
	a = int(input())
	if dd[a] == 0:
		dd[a] = 1
		ans += 1
	else:
		dd[a] = 0
		ans -= 1

print(ans)

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

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

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

Solution (Python):

"""
Created on Fri Aug 10 05:13:17 2018

@author: Yuki
"""

import collections

N = int(input())

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

A_dict = collections.Counter(A)

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

Solution (Python):
n = int(input())
dict = {}
for i in range(0, n):
    ai = int(input())
    if not ai in dict.keys():
        dict[ai] = 1
    else:
        dict.pop(ai)

print(len(dict))

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

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

A.sort()


tmpcount = 1
count = 0
A.append(-1)

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

print(count)

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

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

count_dct = {}
for input_num in a_list:
    if input_num in count_dct.keys():
        count_dct[input_num] += 1
    else:
        count_dct[input_num] = 1
        
counter = 0
for i, j in count_dct.items():
    if j%2 == 1:
        counter +=1
    else:
        pass
    
print(counter)

Solution (Python):
from collections import defaultdict
N = int(input())
dd = defaultdict(int)
for _ in range(N):
    a = int(input())
    dd[a] ^= 1
print(sum(dd.values()))

Solution (Python):
import sys

n = int(input())

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

d = dict()
for a_i in a:
	if a_i not in d:
		d[a_i] = 0
	d[a_i] = (d[a_i]+1) % 2

print(sum(d.values()))

Solution (Python):
import sys

n = int(input())

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

d = dict()
for a_i in a:
	if a_i not in d:
		d[a_i] = 0
	d[a_i] = (d[a_i]+1) % 2

print(sum(d.values()))

Solution (Python):
import sys

n = int(input())

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

d = dict()
for a_i in a:
	if a_i not in d:
		d[a_i] = 0
	d[a_i] = (d[a_i]+1) % 2

print(sum(d.values()))

Solution (Python):

from collections import Counter

def main():
    n = int(input())
    a_list = []
    for _ in range(n):
        a_list.append(int(input()))
    
    ans = 0
    cnt = Counter(a_list)
    for i in set(a_list):
        if cnt[i] % 2 != 0:
            ans += 1
    print(ans)



if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
A = sorted(A)
ans = 0
K = A[0]
cnt = 0
for i in range(N):
    if A[i] == K:
        cnt = (cnt + 1)%2
    else:
        K = A[i]
        ans += cnt
        cnt = 1
if A[N-1] == K:
    ans += cnt
print(ans)

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

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

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

for i in range(N) :
    n = int(input())
    
    if n in d.keys() :
        d[n] += 1
    else : d[n] = 1

cnt = 0
for k in d.keys() :
    if d[k] % 2 != 0 :
        cnt += 1
        
print(cnt)

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

for k,v in counter.items():
    if v % 2 !=0:
        b.append(k)
print(len(b))

Solution (Python):
from collections import Counter

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

cntr = Counter(A)

ans = 0
for v in cntr.values():
    ans += v%2

print(ans)

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_list = []
for i in range(N):
    A_list.append(int(input()))
    
A_list.sort()

res = 0
cnt = 0
ans = 0
for a in A_list:
    if res == a:
        cnt += 1
    else:
        ans += cnt%2
        res = a
        cnt = 1
        
ans += cnt%2

print(ans)

Solution (Python):

from bisect import bisect_left,bisect_right

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

A_unique = list(set(A_list))


A_list.sort()

ans = 0
for a in A_unique:
    if (bisect_right(A_list,a)-bisect_left(A_list,a))%2 == 1:
        ans += 1
        
print(ans)

Solution (Python):


from collections import Counter 

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


AN_dict = Counter(AN)

cnt = 0
for key, value in AN_dict.items():
    if value % 2 != 0:
        cnt += 1
print(cnt)

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

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):
x=int(input())
a=[]
B={-1}
for i in range(x):
  Y=int(input())
  if Y not in B:
    B.add(Y)
  else:
    B.discard(Y)
print(len(B)-1)

Solution (Python):
N=int(input())
a={}
for i in range(N):
    x = input()
    if x in a:
        a[x] = 1^a[x]
    else:
        a[x] = 1
print(sum(a.values()))

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

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

a=[0]*N

for i in range(N):
  a[i]=int(input())
  
a.sort()
count=1
ans=[]

for i in range(N-1):
  if a[i]==a[i+1]:
    count+=1
  else:
    if count%2==1:
      ans.append(a[i])
    count=1
    
if count%2==1:
  ans.append(a[i])

print(len(ans))

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

Solution (Python):
n=int(input())
d={}
for _ in [0]*n:
    v=int(input())
    d[v]=(d.get(v,0)+1)%2
    
print(sum(d.values()))

Solution (Python):
N=int(input())
A=[]
for i in range(N):
    A.append(int(input()))
bucket={}
for number in A:
    bucket[number]=0
for number in A:
    bucket[number]+= 1
count=0
for key in bucket:
    if bucket[key]%2==1:
        count+=1
    else:
        pass
print(count)

Solution (Python):
N = int(input())
a = list()
ans = 0
ptr = 0

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

A = sorted(a)

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())
a={}
for i in range(n):
    b=int(input())
    if b in a:
        del a[b]
    else:
        a[b]=1

print(len(a))

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):
from collections import defaultdict

dict=defaultdict(int)
N=int(input())
for i in range(N):
  a=int(input())
  dict[a]^=1
  
ans=0
for k,v in dict.items():
  if v==1:
    ans+=1
print(ans)

Solution (Python):

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

A = sorted(A)
i = 0
ans = 0

while i < N:
    k = 1
    while (i + k) < N and A[i] == A[i + k]:
        k += 1
    if (k - 1) % 2 == 0:
        ans += 1
    i = i + k

print(ans)

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

from collections import Counter

print(sum(c % 2 for x, c in Counter(A).items()))

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

xs = {}
r = 0

for a in A:
    if a in xs and xs[a] == 1:
        xs[a] = 0
        r -= 1
    else:
        xs[a] = 1
        r += 1

print(r)

Solution (Python):
N = int(input())
a = []
for i in range(N):
    a.append(input())
a.sort()
b = []
b.append(1)
j =1
k = 0
while j < N:
  if j == N:
    break
  elif a[j-1] == a[j]:
    b[k] += 1
    j += 1
  elif a[j-1] != a[j]:
    b.append(1)
    k += 1
    j += 1
ans = 0
for c in b:
  if c %2==1:
    ans += 1
print(ans)

Solution (Python):


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

B = {}
for a in A:
    if a not in B:
        B[a] = 1
    else:
        B[a] += 1

ans = 0
for b in B.keys():
    if B[b] % 2:
        ans += 1

print(ans)

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

dic = {}
for i in range(n):
	tmp = int(input())
	if dic.has_key(tmp):
		dic[tmp] += 1
	else :
		dic[tmp] = 1

count = 0 
for i in dic.values():
	count += i%2

print count

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

Solution (Python):
nums = set()
for _ in [0] * int(input()):
    A = int(input())
    if A in nums:
        nums.remove(A)
    else:
        nums.add(A)
print(len(nums))

Solution (Python):
numbers = {}
for _ in [0] * int(input()):
    A = int(input())
    numbers[A] = numbers.get(A, 0) ^ 1
print(sum(numbers.values()))

Solution (Python):
from collections import Counter

N = int(input())
inupt_dict = Counter(int(input()) for i in range(N))
count = 0

for value in inupt_dict.values():
    count += (value%2)

print(count)

Solution (Python):
N=int(input())
A=[None]*N

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

Ans=0
A.sort()
A+=[-1]
j=1
for i in range(1,N+1):
    if A[i]==A[i-1]:
        j+=1
    else:
        if j%2==1:
            Ans+=1
        j=1

print(Ans)

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

paper = {}
for i in range(N):
    t = int(input())

 
    if t in paper:
        paper[t] = not(paper[t])
    else:
        paper[t] = True

ans = 0
for b in paper.values():
    if b:
        ans +=1

print(ans)

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

c = Counter(a)
ans = 0

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

print(ans)

Solution (Python):
N=int(input())
hairetsu={}
x=0
for i in range(N):
    x=int(input())
    if x in hairetsu.keys():
        del hairetsu[x]
    else:
        hairetsu[x]=x
print(len(hairetsu))

Solution (Python):
N=int(input())
sister=[]
for i in range (N):
    A=int(input())
    sister.append(A)
sister
import collections
c=collections.Counter(sister)
sister_unique=list(set(sister))
count=0
for j in range (len(sister_unique)):
    if c[sister_unique[j]]%2!=0:
        count+=1
print (count)

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

Solution (Python):
import collections

n = int(input())

array = [int(input()) for x in range(n)]
dict_array = collections.Counter(array)
res = 0
for i, j in dict_array.items():
    if j % 2 != 0:
        res += 1
print(res)

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

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

print(ans)

Solution (Python):
def m():
    N = int(input())
    A = [int(input()) for _ in range(N)]
    A.sort()
    tmp = -1
    cnt = 0
    ans = 0
    for i in range(N):
        if tmp == A[i]:
            cnt +=1
        else:
            if cnt % 2 == 0: pass
            else: ans +=1
            tmp = A[i]
            cnt = 1

    if cnt % 2 == 0: pass
    else: ans += 1
    return ans

print(m())

Solution (Python):
N = int(raw_input())
A = []
for i in range(0, N):
	A.append(int(raw_input()))
A.sort()
i = 0
while i < len(A)-1:
	if A[i] == A[i+1]:
		A.pop(i)
		A.pop(i)
	else:
		i = i + 1

print len(A)

Solution (Python):
from collections import Counter

n = int(input())
a = []
for i in range(0,n):
    a.append(int(input()))
ac = Counter(a)

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

print(ans)

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

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

Solution (Python):

n = int(input())

s = set([])
for _ in range(n):
    x = int(input())
    if x in s:
        s.remove(x)
    else:
        s.add(x)

print(len(s))

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

print(len(list(filter(lambda x: x%2==1, D.values()))))

Solution (Python):
from collections import Counter
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
C = Counter(A).most_common()
Ans = 0
for i in range(len(C)):
    x,y = C[i]
    if y%2 == 1:
        Ans += 1
print(Ans)

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

ss = set()
for a in src:
    if a in ss:
        ss.remove(a)
    else:
        ss.add(a)
print(len(ss))

Solution (Python):
from collections import Counter

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

A_counter = Counter(A_list)

num_odd = sum([count % 2 for count in A_counter.values()])
print(num_odd)

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

Solution (Python):
from collections import defaultdict

N = int(input())

A = defaultdict(int)
for i in range(N):
    A[input()] += 1
    
ans = 0

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

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

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

cnt = 0

for i in times:
    if times[i]%2 == 1:
        cnt += 1

print(cnt)

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

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

    try:
        nums.remove(a)
    except KeyError:
        nums.add(a)

print(len(nums))

Solution (Python):
import collections as c

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

d = c.Counter()
for i in a:
    d[i] += 1

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

print (ans)

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

ans = 0
for e in C:
    ans += C[e]%2
print(ans)

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

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

nlll = {}
    
for i in range(n):
    aaa = int(input())
    if aaa in nlll:
        del nlll[aaa]
    else:
        nlll.update({aaa:1})

sums = 0
for i in nlll.values():
    sums = sums + i
print(sums)

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





if __name__ == '__main__':
    from collections import Counter

    n = int(input())
    a = [0] * n
    count = 0

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

    for key, value in Counter(a).items():
        if value % 2 != 0:
            count += 1

    print(count)

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

Solution (Python):
from collections import Counter
N = int(input())
A,Ans = [],0
for i in range(N):
    A.append(int(input()))
cA = Counter(A).most_common()
for k,v in cA:
    if v%2 != 0:
        Ans += 1
print(Ans)

Solution (Python):
from collections import Counter
n = int(input())
a = [input() for _ in range(n)]
counter = Counter(a)
count = 0
for name, cnt in counter.most_common():
    if cnt%2 != 0:
        count += 1
print(count)

Solution (Python):
N=int(input())
s=[int(input()) for i in range(N)]
d,ans={},0
for j in s:
    d[j]=d.get(j,0)+1
d=list(d.values())
for k in d:
    if k%2==1:
        ans+=1
print(ans)

Solution (Python):
N=int(input())
s=[int(input()) for i in range(N)]
d,ans={},0
for j in s:
    d[j]=d.get(j,0)+1
d=list(d.values())
for k in range(len(d)):
    if d[k]%2==1:
        ans+=1
print(ans)

Solution (Python):
import collections
N = int(input())
list_A = [0]*N
for i in range(N):
    list_A[i] = int(input())
c = collections.Counter(list_A)
c_odd_even = [i%2 for i in list(c.values())]
print(sum(c_odd_even))

Solution (Python):
from collections import defaultdict


def solve():
    N = int(input())
    d = defaultdict(int)
    for i in range(N):
        a = int(input())
        if d[a] == 0:
            d[a] = 1
        else:
            del d[a]
    print(len(d))


solve()

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

dict = {}
for _ in range(N):
    x = int(input())
    if x in dict.keys():
        dict[x] += 1
    else:
        dict[x] = 1

print(sum(list(map(lambda x : x%2, dict.values()))))

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

Solution (Python):
d = {}
for _ in range(int(input())):
    x = int(input())
    d[x] = d.get(x, 0) + 1
c = 0
for v in d.values():
    if v % 2: c += 1
print(c)

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

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


for _ in range(loops):
    key = input()
    if key not in d: 
        d[key] = 1
    else:
        d[key] += 1


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

Solution (Python):
import sys

stdin = sys.stdin

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

n = ni()
s = set()
for i in range(n):
    x = ni()
    if x in s:
        s.remove(x)
    else:
        s.add(x)
print(len(s))

Solution (Python):
import math
import sys

def getinputdata():

    
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result





arr_data = getinputdata()

n = int(arr_data[0][0])

mysum=0


hash01={}
for i in range(1,1+n):


    
    cnt=hash01.get(int(arr_data[i][0]),0)+1
    
    hash01[int(arr_data[i][0])]=cnt
    


for k in hash01:
    
    if hash01[k] % 2!=0:
        
        mysum+=1
        
print(mysum)

Solution (Python):
N = int(input())
A = set()
x = 0
for i in range(N):
    s = int(input())
    if s in A:
        A.remove(s)
    else:
        A.add(s)



print(len(A))

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

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

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

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

Solution (Python):
from collections import Counter

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

Solution (Python):
N = int(input())
memo = {}
for _ in range(N):
    A = int(input())
    if (A not in memo) or memo[A] == 0:
        memo[A] = 1
    else:
        memo[A] = 0
print(sum(memo.values()))

Solution (Python):
from collections import defaultdict
n = int(input())
dic = defaultdict(int)
for i in range(n):
    a = int(input())
    dic[a] ^= 1

print(sum(dic.values()))

Solution (Python):
n=int(input())
a=[int(input())for i in range(n)]
import collections
data=collections.Counter(a)
count=0
for i,j in data.items():
    if j%2==1:
        count+=1
print(count)

Solution (Python):
n = int(input())
l = [int(input()) for i in range(n)]
l.sort()

def f():
  ans = 0
  count = 1
  now = l[0]

  if n == 1:
    return 1

  for i in range(1, n):
    if l[i] == now:
      count += 1
    else:
      if not count % 2 == 0:
        ans += 1
      count = 1
      now = l[i]
    
    if i == n-1 and not count % 2 == 0:
      ans += 1
  return ans

print(f())

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