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

Solution (Python):
import heapq
from collections import deque
from enum import Enum
import sys
import math
from _heapq import heappush, heappop

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001



N = int(input())
SET = set()

for _ in range(N):
    number = int(input())
    if number in SET:
        SET.discard(number)
    else:
        SET.add(number)

print(len(SET))

Solution (Python):
from collections import defaultdict


int_n = int(input())

counter = defaultdict(int)

for i in range(int_n):
    counter[int(input())] += 1

written = 0
for c in counter.values():
    if c % 2 == 1:
        written += 1


print(written)

Solution (Python):
def c_write_and_erase(N, A):
    from collections import Counter
    
    return len([1 for v in Counter(A).values() if v % 2 == 1])

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

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

Solution (Python):
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
    
check = {}
for i in set(a):
    check[i] = 0
for i in a:
    check[i] += 1
    
count = 0
for i in check.items():
    if i[1] % 2 != 0:
        count += 1
print(count)

Solution (Python):



















from collections import defaultdict, Counter
import math
from bisect import bisect_left, bisect_right
import numpy as np

N=int(input())
A=[int(input()) for i 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 IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return input()
n=I()
a=[]
for i in range(n):
    t=I()
    a.append(t)
b=list(set(a))
c={}
cnt=0
for i in b:
    c[i]=0
for i in a:
    c[i]+=1
for i in c.keys():
    if c[i]%2==1:
        cnt+=1
print(cnt)

Solution (Python):
from collections import Counter

N = int(input())
A = Counter([int(input()) for i in range(N)])
count = [1 for value in A.values() if value % 2]
print(len(count))

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

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

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

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

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

Solution (Python):
from collections import Counter

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

print(len([True for x in a.values() if (x % 2) == 1]))

Solution (Python):
from collections import Counter
n=int(input())
a=[int(input()) for i in range(n)]
b=Counter(a)
c=[k for k,v in b.items() if v%2==1]
print(len(c))

Solution (Python):
import collections

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

Solution (Python):
N = int(input())
memo = {}
for i in range(N):
  A = int(input())
  if(A in memo):
    memo[A] += 1
  else:
    memo[A] = 1
cnt = 0
for k, v in memo.items():
  cnt += v%2
print(cnt)

Solution (Python):
N = input()
d = {}
for _ in range(N):
    a = input()
    d[str(a)] = d.get(str(a), 0)
    d[str(a)] ^= 1

print sum(d.values())

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

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

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

Solution (Python):
N=int(input())
A=[]
for i in range(0,N):
    A.append(int(input()))
A.sort()
def histogram_sorted(data):
    result=[]
    item = data[0]
    c=1
    for i in range(1,len(data)):
        if item==data[i]:
            c=c+1
        else:
            result.append([item,c])
            c=1
            item=data[i]
    result.append([item,c])
    return result
a=histogram_sorted(A)
kosu=0
for i in range(len(a)):
        if a[i][1]%2==1:
             kosu=kosu+1
print(kosu)

Solution (Python):
from collections import defaultdict
d=defaultdict(int)
N=int(input())
ans=0
for _ in range(N):
  a = int(input())
  if d[a]==0:
    ans+=1
    d[a]=1
  else:
    d[a]=0
    ans-=1
print(ans)

Solution (Python):
import collections
N = int(input())
A = [int(input()) for i in range(N)]
acount = collections.Counter(A)
a = acount.most_common()
count = 0
alen = len(a)
for j in range(alen):
    if a[j][1]%2 == 1:
        count+=1
print(count)

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

H = {}
R = 0

for a in A:
    if a in H.keys():
        del H[a]
        R -= 1
    else:
        H[a]  = True
        R    += 1

print(R)

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

count = 0
score = 0
A.sort()

for i in range(0, N):
    count += 1
    if A[i] != A[i+1]:
        score += count % 2
        count = 0

print(score)

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

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

for i in range(n):
    if a[i] not in A:
        A.add(a[i])
    else:
        A.remove(a[i])
print(len(A))

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

n = int(input())
dic = {}
cou = 0
for _ in range(n):
    a = int(input())
    if a not in dic:
        dic[a] = 1
    else:
        dic[a] += 1
for a in dic:
    if dic[a] % 2 == 1:
        cou += 1

print(cou)

Solution (Python):
from collections import Counter

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

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

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

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

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

ans = len(se)

print(ans)

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

Solution (Python):
from collections import Counter
n = int(input())
A = Counter([int(input()) for i in range(n)]).most_common()
B = []

for i in range(len(A)):
    if A[i][1] % 2 == 1:
        B.append(A[i][1])
        
print(len(B))

Solution (Python):


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

main()

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

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

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

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

Solution (Python):
N = int(input())
s = set()
ans = 0
for _ in range(N):
    a = int(input())
    if a in s:
        s.remove(a)
        ans -= 1
    else:
        s.add(a)
        ans += 1
print(ans)

Solution (Python):
import sys
N = int(input())
A = [0]*N
s = set()
for i in range(N):
    A[i] = int(input())
    if(A[i] in s):
        s.remove(A[i])
    else:
        s.add(A[i])
print(len(s))

Solution (Python):
def ai():return input()
def a():return int(input())
def ma():return map(int, input().split())
def ms():return map(str, input().split())
def lma():return list(map(int, input().split()))
def lms():return list(map(str, input().split()))
k= []
l = []
f = 0
def say(i):return print("Yes" if i == 0 else "No")
def Say(i):return print("YES" if i == 0 else "NO")

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

Solution (Python):
import collections
n = int(input())
A = [int(input()) for _ in range(n)]
counter = collections.Counter(A)
cnt = 0

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

print(cnt)

Solution (Python):
from collections import Counter
n=int(input())
s=[int(input())for i in range(n)]
d=Counter(s)
c=0
for a,b in d.items():
    if b%2==1:
        c+=1
print(c)

Solution (Python):
N = int(input())
s = {}
count = 0
for i in range(N):
    a = input()
    if a not in s:
        s[a] = 1
        count += 1
    elif s[a] % 2:
        s[a] += 1
        count -= 1
    else:
        s[a] += 1
        count += 1


print(count)

Solution (Python):
import sys
from collections import Counter

sys.setrecursionlimit(200000)


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


def solve():
    N = ii()
    A = imi(N)
    c = Counter(A)
    ans = 0
    for v in c.values():
        if v % 2 == 1:
            ans += 1
    return ans


if __name__ == "__main__":
    print(solve())

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

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

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

Solution (Python):
import collections

n = int(input())
nums = [int(input())for i in range(n)]
counterNums = collections.Counter(nums)

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

Solution (Python):
N = int(input())
A = [int(input()) for i in range(N)]
S = set()
for i in A:
    if i in S:
        S.remove(i)
    else:
        S.add(i)

print(len(S))

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

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

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

Solution (Python):

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

count = 0
for i in b.values():
    if i%2==1:
        count += 1
print(count)

Solution (Python):
a=set()
N=input()

for i in range(N):
    A=input()
    if(A in a):
        a.remove(A)
    else:
        a.add(A)
        

print(len(a))

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

Solution (Python):
from collections import Counter

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

Solution (Python):
import collections

N = int(input())
A = [int(input()) for i in range(N)]
ans = 0
num = collections.Counter(A).most_common()

for a, b in num:
    if b % 2 != 0:
        ans += 1

print(ans)

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

a=[]

for i in range(n):
    n=int(input())
    a.append(n)
    
import collections
l=collections.Counter(a)


ans=0

for i,j in l.most_common():
    if j%2==1:
        ans+=1

print(ans)

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

print(len(Paper))

Solution (Python):
N = int(input())
b = {}
count = 0
for i in range(N):
    tmp = int(input())
    if tmp not in b:
        b[tmp] = 1
    else:
        b[tmp] += 1
for i in b:
    count += b[i]%2
print(count)

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

    for num in a_count:
        if a_count[num] % 2:
            ans += 1
    print(ans)


abc073_c()

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

memo = {}
for a in A:
  if(a not in memo):
    memo[a] = 0
  else:
    memo.pop(a)
print(len(memo))

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

if len(a)==1:
    print(1)
    exit(0)

a.sort()
ans=0

prev=a[0]
tmp=0

for i in range(n):
    if a[i]!=prev:
        if tmp%2==1:
            ans+=1
        tmp=1
    else:
        tmp+=1
    
    prev=a[i]

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

print(ans)

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

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

if len(a) == 1:
    print(1)
    exit(0)

a.sort()
ans = 0

prev = a[0]
tmp = 0

for i in range(n):
    if a[i] != prev:
        if tmp % 2 == 1:
            ans += 1

        tmp = 1

    else:
        tmp += 1

    prev = a[i]

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

print(ans)

Solution (Python):
import sys
import collections
import itertools
import math
import re
from collections import Counter
from collections import deque
from collections import defaultdict
import bisect

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


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

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

print(ret)

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

A.sort()
prev = A[0]
tmp = 0
ans = 0
if len(A) == 1:
    print(1)
    exit()
for a in A:
    if a != prev:
        if tmp % 2 == 1:
            ans += 1
        tmp = 1
    else:
        tmp += 1
    prev = a
if tmp % 2 == 1:
    ans += 1
print(ans)

Solution (Python):
def main():
    n = int(input())
    aa = [int(input()) for _ in range(n)]
    nums = dict()
    for a in aa:
        if not a in nums:
            nums[a] = True
        else:
            nums.pop(a)
    print(len(nums))


if __name__ == '__main__':
    main()

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

import collections
c = collections.Counter(joisino)
ans = 0
for count in c.values():
  if count % 2 == 1:
    ans += 1

print(ans)

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

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

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

print(ans)

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

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

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

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

L.sort()
ptr = 0
temp = 0
num = 1
ans = 0
while ptr < N:
    cc = L[ptr]
    f = 0
    while ptr < N and L[ptr] == cc:
        f += 1
        ptr += 1
    ans += f%2

print(ans)

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

Solution (Python):

n = int(input())
s = set()
for _ 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 = [int(input()) for _ in range(N)]
s = set()
for a in A:
    s ^= set([a])
print(len(s))

Solution (Python):
from collections import Counter

n = int(input())
ans = 0
num_list = [int(input()) for _ in range(n)]
no_dups = Counter(num_list).most_common()

for num in reversed(no_dups):
    if num[1]%2 == 1:
        ans += 1
print(ans)

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

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

for _ in range(N):
    A = int(input())
    if A in maps:
        maps.pop(A)
    else:
        maps[A] = 1

print(len(maps))

Solution (Python):
n = int(input())
a = [0 for i in range(n)]
for i in range(n):
    a[i] = int(input())
if n == 1:
    print(1)
    exit()
a = sorted(a)
a.append(-1)  
written = []  
counter = 1

for i in range(1, len(a)):  
    
    
    if a[i] == a[i - 1]:
        counter += 1
    else:
        if counter % 2 == 1:
            written.append(a[i - 1])
        counter = 1
    
print(len(written))

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

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

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

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

a = [int(m) for m in a]
c = collections.Counter(a)
count = 0
for i in c:
    if c[i] % 2 != 0:
        count += 1
print(count)

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

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

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

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

l = 0
m = 1
ans = 0

for l in range(N-1):
	if A[l] == A[l+1]:
		m += 1
	else:
		ans += m%2
		m = 1
if A[N-1] != A[N-2]:
	ans += 1
else:
	ans += m%2
print(ans)

Solution (Python):
N=int(input())
Sister={}
Paper=0
for i in range(N):
  index=int(input())
  if index not in Sister:
    Sister[index]=1
  else:
    Sister[index]+=1
for i in Sister:
  if Sister[i]%2==1:
    Paper+=1
print(Paper)

Solution (Python):
import collections

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

lc=collections.Counter(l)
L=lc.most_common()

ans=0
for j in range(len(L)):
    if L[j][1]%2==1:
        ans+=1
print(ans)

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

import collections
A_c=collections.Counter(A)

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

Solution (Python):
N = int(input())
D = {}
for i in range(N) :
    index = int(input())
    if index not in D :
        D[index] = 1
    else :
        D[index] += 1
ans = 0
for i in D :
    if D[i] % 2 != 0 :
        ans += 1
print(ans)

Solution (Python):
import collections
N = int(input())
A = [None for i in range(N)]
for i in range(N):
    A[i] = int(input())
count = collections.Counter(A)
count = count.most_common()
ans = 0
for i in range(len(count)):
    if count[i][1] % 2 == 1:
        ans += 1

print(ans)

Solution (Python):
import collections
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
count = collections.Counter(A)
count = count.most_common()
ans = 0
for i in range(len(count)):
    if count[i][1] % 2 == 1:
        ans += 1

print(ans)

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

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

n=int(input())
l=[int(input()) for i in range(n)]
ls=collections.Counter(l)

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

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

for a in A:
    if a in m:
        del m[a]
    else:
        m[a] = 1
print(len(m.keys()))

Solution (Python):

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

A.sort()

tag = -1
cnt = 0
ans = 0
for Ai in A:
    if Ai > tag:
        tag = Ai
        ans += cnt % 2
        cnt = 0
    cnt += 1
else:
    ans += cnt % 2
        
print(ans)

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

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

a = sorted(a)

ans = n
flag = 0
for i in range(1, n):
    if a[i] != a[i-1] or flag == 1:
        flag = 0
    else:
        flag = 1
        ans -= 2

print(ans)

Solution (Python):
from collections import Counter


def solve(N, As):
    c = Counter(As)
    return len([k for k, v in c.items() if v % 2 == 1])


if __name__ == "__main__":
    N = int(input())
    As = [int(input()) for _ in range(N)]
    print(solve(N, As))

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

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

Solution (Python):
import sys
def 解():
    iN = int(input())
    aA = [int(_) for _ in sys.stdin.readlines()]
    d = set()
    for a in aA:
        if a in d:
            d.remove(a)
        else:
            d.add(a)
    print(len(d))
解()

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(raw_input())
A = []
for i in range(N):
    A.append(int(raw_input()))

A.sort()
prev=A[0]
count=1
all_count=0
for i in range(1,N):
    if prev==A[i]:
        count+=1
    else:
        prev=A[i]
        all_count+=count%2
        count=1
all_count+=count%2

print all_count

Solution (Python):
H = dict([])
N = int(input())
L = [input() for _ in range(N)]

ctr = 0
for i in range(N):
    H[L[i]] = 0
    if len(H) == ctr:
        H.pop(L[i])
    ctr = len(H)
    
        
        
print(len(H))

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

Solution (Python):
N = int(input())
L = [int(input()) for i in range(N)]
L.sort()
res = 0
i = 0
while i < len(L)-1:
    if L[i] == L[i+1]:
        res += 2
        i += 1
    i += 1
    
print(len(L)-res)

Solution (Python):
N=int(input())
ans=0
dic={}
for i in range(N):
    a=int(input())
    if dic.get(a,0)==0:
        ans+=1
        dic[a]=1
    else:
        ans-=1
        dic[a]=0
print(ans)

Solution (Python):

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

ans_dict = {}
for A in An:
    if A in ans_dict:
        ans_dict[A] = abs(ans_dict[A] - 1)
    else:
        ans_dict[A] = 1

sum = 0
for i in ans_dict.values():
    sum += i

print(sum)

Solution (Python):
from collections import defaultdict
N = int(input())
D = defaultdict(int)
for i in range(N):
    D[int(input())] += 1
ans = 0
for key in D:
    if D[key] % 2 != 0:
        ans += 1
print(ans)

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

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

    
    paper.sort()

    preNum = paper[0]
    sameNumCount = 1
    ans = 0
    for num in paper[1:]:
        if preNum == num:
            sameNumCount += 1
        else:
            ans += sameNumCount % 2
            preNum = num
            sameNumCount = 1
    
    if paper[-1] == preNum:
        ans += sameNumCount % 2

    print(ans)

if __name__ == '__main__':
    main()

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

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

print(len(p))

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

A = sorted(A)

x = A[0]
s = 0
c = 0
for i in range(N):
	if A[i] == x:
		c += 1
	else:
		x = A[i]
		if c % 2 == 1:
			s += 1
		c = 1

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

print(s)

Solution (Python):
n = int(input())
d = {}
for _ in [0]*n:
  k = int(input())
  if k in d:
    d[k] = 1-d[k]
  else:
    d[k]=1
print(sum(d.values()))

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

Solution (Python):
import collections

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

dic = collections.Counter(A)

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

print(ans)

Solution (Python):
N = int(input())
a = [int(input()) for _ in range(N)]
a.sort()
ans = 0
now = 0
cnt = 0
for x in a:
    if x == now:
        cnt += 1
        continue
    if cnt % 2 == 1:
        ans += 1
    cnt = 1
    now = x
if cnt % 2 == 1:
    ans += 1
print(ans)

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

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

print(len(kami))

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

l = set([])
for _ in range(N):
    a = int(input())
    if a in l:
        l.remove(a)
    else:
        l.add(a)
print(len(l))

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

Solution (Python):
list_a = []
n = int(input())
for i in range(n):
    list_a.append(int(input()))
dict_ans = {}
for i in range(n):
    try:
        del dict_ans[list_a[i]]
    except KeyError:
        dict_ans[list_a[i]] = 1
print(len(dict_ans))

Solution (Python):


INF = float('inf')


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


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

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

print(ans)

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

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

print(num)

Solution (Python):
def fa(): 
    global ans
    print(ans)
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

N = getN()
space = {}

for i in range(N):
    k = getN()
    if k in space:
        space[k] = space[k] ^ 1
    else:
        space[k] = 1


print(sum(space.values()))

Solution (Python):



def main():
    from collections import Counter

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

    for key, value in a.items():
        if value % 2 == 1:
            ans += 1

    print(ans)


if __name__ == '__main__':
    main()

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

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

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

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

from collections import Counter

n = ni()
a = [ni() for _ in range(n)]

cnt = Counter(a)

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

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

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

Solution (Python):
d=set()
for i in[0]*input():d^={input()}
print len(d)

Solution (Python):
d=set()
for i in[0]*int(input()):d^={input()}
print(len(d))

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

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