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



Sample input:
3
6
2
6


Sample output:
1

Submission status: Wrong Answer

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

A = sorted(A)


count = 0
ans = 0
firstnum = A[0] 
for i in range(1,N):
    if firstnum == A[i]:
        count = count + 1
    
    elif firstnum != A[i]:
        if count == 0 or count % 2 == 0:
            ans = ans + 1
            count = 0
        else:
            count = 0

    firstnum = A[i]  
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a=[]
b=0
for i in range(n):
  j=int(input())
  if j in a:
    b-=1
  else:
    b+=1
print(len(a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
ans = 0
a = A[0]
n = 0
if N == 1:
    print(1)
    sys.exit()
for i in range(N):
    if a == A[i]:
        n += 1
    else:
        if n % 2 == 1:
            ans += 1
        n = 1
        a = A[i]
    #print(A[i],"1",n,n%2,ans)
if A[-1] == A[-2] and n % 2 == 1:
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
ans = 0
a = A[0]
n = 0
for i in range(N):
    if a == A[i]:
        n += 1
    else:
        if n % 2 == 1:
            ans += 1
        n = 1
        a = A[i]
    #print(A[i],"1",n,n%2,ans)
if A[-1] == A[-2] and n % 2 == 1:
    ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import math

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
   
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N=int(input())
cnt=0
li=[]

for _ in range(N):
	li.append(int(input()))
	
so=sorted(li)
ct=1

for i in range(N-1):
	if so[i]==so[i+1]:
		ct+=1
	else:
		if ct%2==1:
			cnt+=1
		ct=1
		
if so[N-2]!=so[N-1]:
		cnt+=1

if ct!=1:
	cnt+=1


if N==1:
	print(1)
else:	
	print(cnt)

Submission status: Wrong Answer

Solution code:
import sys
import math

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
   
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N=int(input())
cnt=0
li=[]

for _ in range(N):
	li.append(int(input()))
	
so=sorted(li)
ct=1

for i in range(N-1):
	if so[i]==so[i+1]:
		ct+=1
	else:
		if ct%2==1:
			cnt+=1
		ct=1
		
if so[N-2]==so[N-1]:
		ct+=1
else:
		if ct%2==1:
			cnt+=1
		ct=1		

if N==1:
	print(1)
else:	
	print(cnt)

Submission status: Wrong Answer

Solution code:
import sys
import math

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
   
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N=int(input())
cnt=1
li=[]

for _ in range(N):
	li.append(int(input()))
	
so=sorted(li)
ct=1

for i in range(N-1):
	if so[i]==so[i+1]:
		ct+=1
	else:
		if ct%2==1:
			cnt+=1
		ct=1

if N==1:
	print(1)
else:	
	print(cnt)

Submission status: Wrong Answer

Solution code:
import sys
import math

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
   
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N=int(input())
cnt=0
li=[]

for _ in range(N):
	li.append(int(input()))
	
so=sorted(li)
ct=1

for i in range(N-1):
	if so[i]==so[i+1]:
		ct+=1
	else:
		if ct%2==1:
			cnt+=1
		ct=1

if N==1:
	print(1)
else:	
	print(cnt)

Submission status: Wrong Answer

Solution code:
import sys
import math

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
   
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N=int(input())
cnt=0
li=[]

for _ in range(N):
	li.append(int(input()))
	
so=sorted(li)
ct=1
print(so)

for i in range(N-1):
	if so[i]==so[i+1]:
		ct+=1
	else:
		if ct%2==1:
			cnt+=1
		ct=1

if N==1:
	print(1)
else:	
	print(cnt)

Submission status: Wrong Answer

Solution code:
N=int(input())
sisterN=[]
for n in range(N):
    _=int(input())
    sisterN.append(_)
Ans=len(set(sisterN))
print(Ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = []

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

i = 0
while i< len(A):
    C = A.count(A[i])
    P = A[i]
    if(C > 1 and C % 2 == 0):
        for j in range(C):
            A.remove(P)
    elif(C > 1):
        for k in range(C- 1):
            A.remove(P)
        i+= 1
    else:
        i+= 1
    
print(len(A))
print(A)

Submission status: Wrong Answer

Solution code:
N = int(input())
list_A = []

for i in range(N):
  list_A.append(input())

i = 0

while i< len(list_A):
  if(list_A.count(list_A[i]) > 1):
    a = list_A[i]
    list_A.remove(a)
    list_A.remove(a)
  else:
    i+= 1

ans = len(list_A)

print(ans)
print(list_A)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
dict = {}
count = 0
for i in a:
  if i not in dict:
    dict[i] = 1
  elif i in dict:
    dict[i]+= 1
       
for i in a:
  if dict[i]%2!=0:
    count += 1
    
    
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

arr.sort()
cnt = 0
num = 1

a = arr[0]

for i in range(1,N):
  if arr[i] == a:
    num += 1
  else:
    if num % 2 == 1:
      cnt += 1
    num = 1
    a = arr[i]
print(int(cnt))

Submission status: Wrong Answer

Solution code:
N = int(input())

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

arr.sort()
cnt = 0
num = 1

a = arr[0]

for i in range(1,N):
  if arr[i] == a:
    num += 1
  else:
    num = 1
    a = arr[i]
    if num % 2 == 1:
      cnt += 1
print(int(cnt))

Submission status: Wrong Answer

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

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

dic = dict()

for a in A:
	if a in dic:
		dic[a] ^= 1
	else:
		dic[a] = 1

print(dic)
ans = 0
for x in dic:
	ans += dic[x]
print(ans)

Submission status: Wrong Answer

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

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

dic = defaultdict(int)

for a in A:
	#print(dic[a])
	dic[a] ^= 1

print(dic)
ans = 0
for x in dic:
	ans += dic[x]
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = sorted([int(input()) for i in range(n)])
ans = 0
s = 1
for i in range(n - 1):
  if a[i] != a[i + 1]:
    ans += s % 2
    s = 1
  else:
    s += 1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
n=int(input()) #　a1
lap = [int(input()) for i in range(n)]
lap.sort()

lcnt=0
cnt=1
for i in range(n-1):
  if lap[i]==lap[i+1]:
    cnt+=1
  else:
    if cnt%2==0:
      cnt=1
    else:
      lcnt+=1
  
print(lcnt)

Submission status: Wrong Answer

Solution code:
n=int(input())
temp=set()
for i in range(0,n):
  a=int(input())
  if a not in temp:
    temp.add(str(a))
  else:
    temp.remove(str(a))
print(len(temp))

Submission status: Wrong Answer

Solution code:

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

a.sort()

res = 0
cnt = 1
for i in range(1,N):
    if a[i] == a[i-1]:
        cnt+=1
    else:
        if cnt%2:
            res+=1
        else:
            cnt=1
            

print(res)

Submission status: Wrong Answer

Solution code:
N=int(input())
A=dict()
for i in range(N):
	tmp=int(input())
	if not tmp in A:
		A[tmp]=1
	else:
		A[tmp]=0
print(sum(A.values()))

Submission status: Wrong Answer

Solution code:
import math
import queue
from collections import defaultdict

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def printQueue(q):
	r=qb
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
def dq():
	return queue.deque()
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): # root
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): # much time
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} # 1~n
def bitArr(n):#ビット全探索
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): #j:aの個数
			k = i-a*j
			if k%b==0:
				return i
	return -1

n = readInt()
d = defaultdict(int)
for i in readInts():
	d[i]+=1
ans = 0
for i in d.values():
	if i%2==1:
		ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    import sys
    from itertools import groupby
    *_, = sys.stdin.read()
    __ = _ [2::2]
    __.sort()
    ___ = 0
    ________ = 2
    for ____, _____ in groupby(__):
        ______ = tuple(_____)
        _______ = len(______)
        _______ %= ________
        ___ += _______

    print(___)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    from itertools import groupby
    n, *a = open(0).read().split('\n')
    a.sort()
    ans = 0
    for k, g in groupby(a):
        t = tuple(g)
        n = len(t)
        n %= 2
        ans += n

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []

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

a.sort()

print(len(set(a)) - (len(a) - len(set(a))))

Submission status: Wrong Answer

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


d = {}
for i in a:
    if i not in d:
        d[i] = 0
        d[i] +=1
    elif i in d:
        d[i] -=1
        
        
l =[]
for i in d.keys():
    if d[i] != 0:
        l.append(d[i])
print(len(l))

Submission status: Wrong Answer

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


d = {}
for i in a:
    if i not in d:
        d[i] =0
        d[i] +=1
    elif i in d:
        d[i] -=1
l =[]
for i in d.keys():
    if d[i] != 0:
        l.append(d[i])
print(len(l))

Submission status: Wrong Answer

Solution code:
from collections import Counter

N = int(input())
a = Counter(list(map(int, input().split())))

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

Submission status: Wrong Answer

Solution code:
from sys import stdin


def main():
    n = int(stdin.readline())
    a = [int(stdin.readline()) for _ in range(n)]
    a.sort()
    ans = 0
    tmp = a[0]
    count = 0
    for i in range(1, n):
        if a[i] == tmp:
            count += 1
        else:
            if count % 2 == 0:
                ans += 1
            tmp = a[i]
            count = 0
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import collections

n = int(input())
a = [int(input()) for i in range(n)]
x = collections.Counter(a)
y = x.most_common()
ans = 0
for i in range(len(y)):
    if y[i][1]%2==1:
        ans+=y[i][1]
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = {}

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

print(sum(list(A.values())))

Submission status: Wrong Answer

Solution code:
n = int(input())

dic = {}

for i in range(n):
    a = int(input())
    if dic.get(a) is None:
        dic[a] = 1
    else:
        dic[a] += 1 %2
        
    
val = list(dic.values())
ans = int(sum(val))

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
for i in range(n):
    s = int(input())
    a.append(s)
a.sort()
i = 0
cnt = 0
while i < n:
    j = i+1
    chk = 0
    if j >= n:
        cnt += 1 
        break
    while a[i] == a[j]:
        chk += 1
        j += 1
        if j >= n:
            break
    if chk%2 == 1:
        cnt += 1 
    i = j
print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = {}
for i in range(n):
    s = int(input())
    if s not in a.keys():
        a[s] = 1
    else:
        a[s] = 0
print(sum(a.values()))

Submission status: Wrong Answer

Solution code:
import sys
readline = sys.stdin.readline
from collections import Counter

def main():
    N = int(readline())
    A = [int(readline()) for _ in range(N)]
    c = Counter(A)
    ans = 0
    for _, v in zip(c.keys(), c.values()):
        if v % 2 == 1:
            ans += v
    
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
sorted_A = sorted(A)

pre = sorted_A[0]
ans = 0
if len(sorted_A) == 1:
    print(1)
else:
    count = 1
    for i in range(1, len(sorted_A)):
        if sorted_A[i] == pre:
            count += 1
        else:
            if i == len(sorted_A)-1:
                ans += 1
            if count % 2 == 1:
                ans += 1
            pre = sorted_A[i]
            count = 1
    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
sorted_A = sorted(A)

pre = sorted_A[0]
ans = 0
if len(sorted_A) == 1:
    print(1)
else:
    count = 1
    for i in range(1, len(sorted_A)):
        if sorted_A[i] == pre:
            count += 1
        else:
            if count % 2 == 1:
                ans += 1
            pre = sorted_A[i]
            count = 1
    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
d = {}
a = []
for _ in range(N):
    A = int(input())
    a.append(A)
    if A in d:
        d[A] = 0
        continue
    d[A] = 1


ans = 0
for i in range(N):
    if d[a[i]]==1:
        ans = ans + 1
        continue
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
A = [[]]*301
count = 0
i = 0
while i < n:
    a0 = int(input())
    r = a0%301
    p = a0//301
    if p in A[r]:
        A[r].remove(p)
        count -= 1
    else:
        A[r].append(p)
        count += 1
    i += 1
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

if N == 1:
    print(1)
    exit()

A.sort()

current_number = A[0]
current_count = 1
count = 0

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

print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

if N == 1:
    print(1)
    exit()
    
A.sort()

current_number = A[0]
current_count = 1
count = 0

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

print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(input())for i in range(n)]
cnt = {}
for x in a:
    if x not in cnt:cnt[x] = 1
    else:cnt[x] -=1
ans = 0
for key in cnt:
    ans += cnt[key] >0
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
s=set()
for i in range(N):
  a=set(input())
  s^=a
print(len(s))

Submission status: Wrong Answer

Solution code:
N=int(input())
s=set()
for i in range(N):
  a=set(input())
  s^=a
print(len(a))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#
# Written by NoKnowledgeGG @YlePhan
# ('ω')
#
#import math
#mod = 10**9+7
#import itertools
#import fractions
#import numpy as np
#mod = 10**4 + 7
"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""

""" n! mod m 階乗
mod = 1e9 + 7
N = 10000000
fac = [0] * N
def ini():
  fac[0] = 1 % mod
  for i in range(1,N):
    fac[i] = fac[i-1] * i % mod"""

"""mod = 1e9+7
N = 10000000
pw = [0] * N
def ini(c):
  pw[0] = 1 % mod
  for i in range(1,N):
    pw[i] = pw[i-1] * c % mod"""

"""
def YEILD():
  yield 'one'
  yield 'two'
  yield 'three'
generator = YEILD()
print(next(generator))
print(next(generator))
print(next(generator))
"""
"""def gcd_(a,b):
  if b == 0:#結局はc,0の最大公約数はcなのに
    return a
  return gcd_(a,a % b) # a = p * b + q"""
"""def extgcd(a,b,x,y):
  d = a
  if b!=0:
    d = extgcd(b,a%b,y,x)
    y -= (a//b) * x
    print(x,y)
  else:
    x = 1
    y = 0
  return d"""
# 最大公約数 と 最小公倍数
"""def gcd(a,b):
  if b == 0:
    return a
  return gcd(b, a % b)
def lcm(a,b):
  g = gcd(a,b)
  return (a * b) // g"""

def readInts():
  return list(map(int,input().split()))
mod = 10**9 + 7

def main():
  n = int(input())
  dic = {}
  for i in range(n):
    a = int(input())
    if a in dic:
      dic[a] = 0
    else:
      dic[a] = 1
  cnt = 0
  for k,v in dic.items():
    cnt += v
  print(cnt)
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
n = int(input())
d = {}
for i in range(n):
    a = int(input())
    if a not in d:
        d[a] = 1
    else:
        d[a] -= 1

ans = 0
for kk in d.keys():
    if d[kk] == 1:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n,*a=open(0).read().split()
s=set()
for i in a:
  s^=set(i)
print(len(s))

Submission status: Wrong Answer

Solution code:
n,a,*b=open(0).read().split()
s=set(a)
for i in b:
  s^=set(i)
print(len(s))

Submission status: Wrong Answer

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

A.sort()

odd = 0
count = 1
a = A[0]
for i in A[1:]:
  print(i,a)
  if i == a:
    count += 1
  else:
    a = i
    if count % 2 == 1:
      odd += 1
    count = 1
if count % 2 == 1:
      odd += 1
print(odd)

Submission status: Wrong Answer

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

A.sort()

odd = 0
count = 1
a = A[0]
for i in A[1:]:
  if i == a:
    count += 1
  else:
    a = i
    if count % 2 == 1:
      odd += 1
    count = 1
print(odd)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
B = 0
for i in A:
    if A.count(i)%2 == 1: 
        B += 1
    else:
        while i in A:A.remove(i)
print(B)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
B = 0
for i in A:
    if A.count(i) > 1:
        if A.count(i)%2 == 1:
            B += 1
    else :
        break
print(B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
a = []
cnt = 0
for i in range(N):
    b = int(input())
    if not b in a:
        a.append(b)
    else:
        cnt+=1
print(len(a)-cnt)

Submission status: Wrong Answer

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

print(len(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=int(input())
b=[input() for i in range(a)]
print((len(b)-(len(b)-len(set(b)))*2))

Submission status: Wrong Answer

Solution code:
a=int(input())
b=[input() for i in range(a)]
print((len(b)-(len(b)-len(set(b)))*2))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[int(input())for _ in range(n)]
be=0
count=0

a.sort()
for i in range(n):
  if be==a[i]:
    if count==0:
      pass
    else:
      count-=1
  else:
    count+=1
  be=a[i]
    
print(count)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[int(input())for _ in range(n)]
be=0
count=0

a.sort()
for i in range(n):
  if be==a[i]:
    count-=1
  else:
    count+=1
  be=a[i]
    
print(count)

Submission status: Wrong Answer

Solution code:
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)
print(c.values())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input().strip())
a = [int(input().strip()) for _ in range(n)]
a.sort()
ans = 0
for i in range(len(a) - 1):
    if a[i + 1] == a[i]:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
dic = {}
for i in range(N):
  A = int(input())
  if A not in dic:
    dic[A]=0
  else:
    dic[A]^=1
print(sum(dic.values()))

Submission status: Wrong Answer

Solution code:
from collections import Counter
n=int(input())
a=list(map(int,input().split()))
c=Counter(a)
ans=0
for i in c.values():
    if i%2!=0:
        ans+=1

print(ans)

Submission status: Wrong Answer

Solution code:
ans=0
n=int(input())
a=[int(input()) for _ in range(n)]
a.sort()
res=a[0]
cnt=1

for i in a[1:]:
    if res==i:
        cnt+=1
    else:
        if cnt%2!=0:
            ans+=1
            res=i
            cnt=1
        else:
            res=i
            cnt=1
            
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
ans = 0
start = 0
if (N == 1): ans += 1
for i in range(0, N):
    if A[i] != A[start]:
        if i == N-1 and i - start == 1:
            ans += 1
        if (i - start) % 2 == 1:
            ans += 1
        start = i
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

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

Submission status: Wrong Answer

Solution code:
n = int(input())
A = {}
for i in range(n):
    a = int(input())
    if a not in A: A[a] = 1
    else: A[a] = 0
c = 0
for i in A:
    if A[i] == 1:
        c += 1
print(c)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = [int(input()) for i in range(N)]
ans.sort()
total = 0
tmp = 1
for i in range(N-1):
  if ans[i]  == ans[i+1]:
    tmp += 1
  else:
    if tmp %2 == 1:
      total += 1
    tmp = 1
print(total)

Submission status: Wrong Answer

Solution code:
n=int(input())
sum=0
l=[]
for i in range(n):
  l.append(int(input()))
while len(l)!=0:
  k=l.count(l[0])
  for i in range(k):
    l.remove(l[0])
  if k%2==1:
    sum+=1
print(sum)

Submission status: Wrong Answer

Solution code:
N=int(input())
p=[]
count=0
for i in range (N):
  a=int(input())
  p.append(a)
list.sort(p)
flag=1
for j in range (N-1):
  if p[j]==p[j+1]:
    flag*=-1
  else:
    if flag>0:
      count+=1
    flag=1
if flag<0:
  count+=1
print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())
p=[]
count=0
for i in range (N):
  a=int(input())
  p.append(a)
list.sort(p)
flag=1
for j in range (N-1):
  if p[j]==p[j+1]:
    flag*=-1
  else:
    if flag>0:
      count+=1
    else:
      count-=1
    flag=1
if flag>0:
  count-=1
else:
  count+=1
print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())
p=[]
count=0
for i in range (N):
  a=int(input())
  p.append(a)
list.sort(p)
flag=1
for j in range (N-1):
  if p[j]==p[j+1]:
    flag*=-1
  else:
    if flag>0:
      count+=1
    else:
      count-=1
    flag=1
print(count)