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: Runtime Error

Solution code:
import numpy as np

def search(now,r,dist,ans):
    if len(r)==0:
        return ans
    min_=float('inf')
    for i,x in enumerate(r):
        if i < len(r)-1:
            min_=min(min_,search(x,r[:i]+r[i+1:],dist,ans+dist[now][x]))
        else:
            min_=min(min_, search(x,r[:i],dist,ans+dist[now][x]))
    return min_

N,M,R=list(map(int,input().split()))
r=list(map(int,input().split()))
r=[x-1 for x in r]
dist=[[float('inf') for _ in range(N)] for _ in range(N)]
for i in range(M):
    A,B,C=list(map(int,input().split()))
    dist[A-1][B-1]=C
    dist[B-1][A-1]=C
for i in range(N):
    dist[i][i]=0
dist=np.array(dist)

ans=float('inf')
for i in range(N):
    for j in range(N):
        dist[i][j]=min(dist[i]+dist[j])

ans=float('inf')
for i,x in enumerate(r):
    if i < len(r)-1:
        ans=min(ans, search(x,r[:i]+r[i+1:],dist,0))
    else:
        ans=min(ans, search(x,r[:i],dist,0))
print(ans//1)

Submission status: Runtime Error

Solution code:
n = int(input())
a = [0]*(1000000001)
for _ in [0]*n:
  k = int(input())
  a[k] = 1-a[k]
print(sum(a))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
L = [0 for i in range(10*9)]
for j in range(N):
  L[A[j]] += 1
ans = 0
for k in range(len(L)):
  if (L[k] == 0):
    None
  elif (L[k]%2 == 0):
    None
  else:
    ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
L = [int(input()) for i in range(N)]
L.sort()
k = 1
for i in range(len(L)):
  if (L[i] == L[i+1]):
    k -= 1
  else:
    k += 1
print(k)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from collection import defaultdict
n = input()
dic = defaultdict(int)
for i in range(n):
	z = input()
	dic[z] += 1
ans = 0
for i in dic:
	if dic[i]&1:
		ans += 1
print ans

Submission status: Runtime Error

Solution code:
N = int(input())
A = [False] * 10 ** 9
cnt = 0
for i in range(N):
  a = int(input())
  A[a - 1] = not A[a - 1]
  cnt += 1 if A[a - 1] else -1
print(cnt)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
"""
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)

Submission status: Runtime Error

Solution code:
import sys

n = int(input())
a = map(int, sys.stdin.read().split("\n"))
# 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()))

Submission status: Runtime Error

Solution code:
import sys

n = int(input())
a = map(int, sys.stdin.read().split("\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))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
list=[]
a=0
b=0
def search(a,b):
    def loop(x,a):
        if x<=len(a)-1:    
            if b==a[x]:
                return x
            else:
                return loop(x+1,a)
        else:
            return None
    return loop(0,a)
def out(a,b):
    k=search(a,b)
    return a[:k]+a[k+1:]
def sort(a):
    if a==[]:
        return []
    else:
        return [min(a)]+sort(out(a,min(a)))
for i in range(n):
	list.append(int(input()))
list=sort(list)
for i in range(n-1):
	a=1
	if list[i]==list[i+1]:
		a+=1
	else:
		if a%2==0:
			b=b+0
		else:
			b=b+1
print(b)

Submission status: Runtime Error

Solution code:
n=int(input())
list=[]
a=1
b=0
def search(a,b):
    def loop(x,a):
        if x<=len(a)-1:    
            if b==a[x]:
                return x
            else:
                return loop(x+1,a)
        else:
            return None
    return loop(0,a)
def out(a,b):
    k=search(a,b)
    return a[:k]+a[k+1:]
def sort(a):
    if a==[]:
        return []
    else:
        return [min(a)]+sort(out(a,min(a)))
for i in range(n):
	list.append(int(input()))
list=sort(list)
for i in range(n-1):
	a=1
	if list[i]==list[i+1]:
		a+=1
	else:
		if a%2=0:
			b=b+0
		else:
			b=b+1
print(b)

Submission status: Runtime Error

Solution code:
n=int(input())
list=[]
a=1
b=0
def search(a,b):
    def loop(x,a):
        if x<=len(a)-1:    
            if b==a[x]:
                return x
            else:
                return loop(x+1,a)
        else:
            return None
    return loop(0,a)
def out(a,b):
    k=search(a,b)
    return a[:k]+a[k+1:]
def sort(a):
    if a==[]:
        return []
    else:
        return [min(a)]+sort(out(a,min(a)))
for i in range(n):
	list.append(int(input()))
list=sort(list)
for i in range(n-1):
	a=1
	if list[i]==list[i+1]:
		a+=1
	else:
		if a%2==0:
			b=b+0
		else:
			b=b+1
print(b-1)

Submission status: Runtime Error

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

print(len(a))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
b = [0]*1000000001
cnt = 0
for i in range (N):
    b[A[i]] += 1
for i in range (N):
    if b[i]%2 == 1:
        cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
n = int(input())

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

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

Submission status: Runtime Error

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

b = list(set(a))

for i in b:
    if a.count(i) % 2 == 0:
        b.remove(i)
    else:
        None
        
print(len(list(b))

Submission status: Runtime Error

Solution code:
import sys

stdin = sys.stdin

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

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

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

Submission status: Runtime Error

Solution code:
print(len(set(list(lambda x: not x%2, set([input() for i in range(int(input()))])))))

Submission status: Runtime Error

Solution code:
N = int(raw_input())
A = [0] * 100001

for i in range(N):
    a = int(raw_input())
    A[a] += 1

print sum([ 0 if A[i] % 2 == 0 else 1 for i in range(100001)])

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
list = []
number = int(input())
for n in range(0, number):
  if number in list:
    list.remove(number)
  else :
    list.append(number)
    pass

  print(Len(list))

Submission status: Runtime Error

Solution code:
list = []
number = int(input())
for n in range(0,number):
if number in list:
  list.remove(number)
else :
  list.append(number)
    pass

print(Len(list))

Submission status: Runtime Error

Solution code:
list = []
number = int(input())
for n in range(0,number):
if number in list:
  list.append(number)
else :
  list.remove(number)
    
  pass

print(Len(list))

Submission status: Runtime Error

Solution code:
n = int(input())
di = {}

for x in range(n):
  i = int(input())
  if (i in di.keys()):
    di.pop()
  else:
    di[i] = i
print(len(di))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np

N = int(input())

a = np.zeros([100000])
for i in range(N):
    idx = int(input())
    a[idx] += 1
    a[idx] = a[idx]%2
ans = int(np.sum(a))
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
l = set()

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

    if a in l:
        l.remove(a)
    else:
        l.append(a)

print(len(l))

Submission status: Runtime Error

Solution code:
n = int(input())
paper = []
for _ in range(n):
    p = input()
    if p not in paper:
        paper.append(p)
    else:
        paper.remove(p)]
print(len(paper) - 1)

Submission status: Runtime Error

Solution code:
paper = [0,0,0,0,0,0,0,0,0,0]
N = int(input())
for _ in range(N):
    number = int(input())
    paper[number] += 1
sum = 0
for x in range(10):
    if paper[x] % 2 == 1:
        sum += 1
print(sum)

Submission status: Runtime Error

Solution code:
paper = [0,0,0,0,0,0,0,0,0,0]
N = int(input())
for _ in range(N):
    number = int(input())
    paper[number] += 1
sum = 0
for x in range(10):
    if paper[x] % 2 == 1
        sum += 1
print(sum)

Submission status: Runtime Error

Solution code:
paper = [0,0,0,0,0,0,0,0,0,0]
N = int(input())
for _ in range(N):
    number = int(input())
    paper[number] += 1
sum = 0
for x in range(10)
    if paper[x] % 2 == 1
        sum += 1
print(sum)

Submission status: Runtime Error

Solution code:
N = raw_input()
N = int(N)

a = {}
for i in range(N):
	s_input = raw_input()
	s_input = int(s_input)
	if s_input in a:
		del a[s_input]
	else:
		a[s_input] += 1

print(len(a))

Submission status: Runtime Error

Solution code:
N = raw_input()
N = int(N)

a = []
for i in range(N):
	s_input = raw_input()
	s_input = int(s_input)
	if s_input in a:
		a.remove(s_input)
	else:
		a.append(s_input)
    a.sort()

print(len(a))

Submission status: Runtime Error

Solution code:
TorF = [False for i in range(100000)]
n = int(input())
final_writing = 0
for _ in range(n):
    p = int(input())
    TorF[p] = not(TorF[p])
print(TorF.count(True))

Submission status: Runtime Error

Solution code:
TorF = [False for i in range(100000)]
n = int(input())
final_writing = 0
for _ in range(n):
    p = int(input())
    TorF[p] = not(TorF[p])

for i in range(100000):
    if TorF[i] == True:
        final_writing += 1

print(final_writing)

Submission status: Runtime Error

Solution code:
TorF = [False for i in range(100000)]
n = int(input())
for _ in range(n):
    p = int(input())
    TorF[p] = not(TorF[p])

for i in range(n):
    if TorF[i] == True:
        print(i)

Submission status: Runtime Error

Solution code:
import numpy as np

n = int(input())

num = np.zeros(10 ** 9, dtype = bool)

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

    num[a] = not(num[a])

sum = np.where(num == True) 

print(len(sum[0]))

Submission status: Runtime Error

Solution code:
import numpy as np


def getInput():
    """

    :return: list of list of str. 1st dim: row, 2nd dim: column.
    """
    separator = ' '
    ret_array = []
    while True:
        try:
            row = input().split(sep=separator)
            ret_array.append(row)
        except EOFError:
            break
    return ret_array


g = getInput()

# number
N = np.array(list(map(int, g[0])), dtype=np.int32)
# l,r
note = np.zeros(((10 ** 9),), dtype=np.bool)
for row_idx in range(1, len(g)):
    note[int(g[row_idx][0])] = not note[int(g[row_idx][0])]

print(note.sum())

Submission status: Runtime Error

Solution code:
n = int(input())
list = []
for i in range(n):
    a = bay(input())
    if a in list:
        list.remove(a)
    else:
        list.append(a)
print(len(list))

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 0
nums = set([])
for _ in range(N):
    A = int(input())
    if A in nums:
        ans -= 1
        nums.clear(A)
    else:
        ans += 1
        nums.add(A)
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
A = [int(input()) for i in range(n)]
 
B = set()
lenB = 0
for a in A:
    if a in B:
        B.remove(a)
        lenB -= 1
    else:
        b.add(a)
        lenB += 1
print(lenB)

Submission status: Runtime Error

Solution code:
# coding: utf-8
import sys

def main():
    a = []
    b = []
    countNum = 0

    N = input()
    for i in range(int(N)):
        a.append(input())
    b=a[:]
    for j,num in enumerate(a):
        for k in range(j+1,int(N)):
            if k<int(N):
                if a[k]==num:
                    b.pop(j)
                    b.pop(k-1)
                    countNum += 1
    return print(countNum)


if __name__=="__main__":
    main()

Submission status: Runtime Error

Solution code:
# coding: utf-8
import sys

def main():
    a = []
    b = []
    countNum = 0

    N = input()
    for i in range(int(N)):
        a.append(input())
    print(a)
    b=a[:]
    for j,num in enumerate(a):
        for k in range(j+1,int(N)):
            if k<int(N):
                print(k)
                print(a)
                if a[k]==num:
                    b.pop(j)
                    b.pop(k-1)
                    countNum += 1
    print(b)
    return print(countNum)


if __name__=="__main__":
    main()

Submission status: Runtime Error

Solution code:
N = int(input())
Ex = [False for i in range(100001)]
for i in range(N):
	A = int(input())
	Ex[A] = not Ex[A]
count = 0
for tf in range(100001):
	if Ex[tf]:
		count += 1
print(count)

Submission status: Runtime Error

Solution code:
li = []
for i in range(int(input())):
  num = int(input())
  if len(li) == 0:
    li.append(num)
  else:
    lo, hi = 0, len(li)-1
    while lo <= hi:
      mid = int((lo+hi)/2)
      if num == li[mid]:
        li.remove(num)
        lo = hi+1000
      elif num > li[mid]:
        lo = mid+1
        a = True
      else:
        hi = mid-1
        a - False
    if lo-hi < 100:
      if a == False:
        li.insert(hi, num)
      else:
        li.insert(lo, num)
print(len(li))

Submission status: Runtime Error

Solution code:
import math


def BS(array, TARGET):

	low = 0
	high = len(array)
	isFound = False

	while (low != high): # 検索したい値が存在しない場合は終了
		center = math.floor((low + high) / 2)
		if (array[center] < TARGET):
			low = center + 1
		elif (TARGET < array[center]):
			high = center
		else:
			#print(array[center], center)
			isFound = True
			return(isFound,center)
			break # 検索したい値が見つかった
	#if not(isFound):
		#print('not found')
	return(isFound,high)


N = int(input())

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

	if len(x) == 0:
		x.append(a)
	else:
		isFound, ind = BS(x,a)

		if isFound:
			del x[ind]
		else:
			x.insert(ind,a)

print(len(x))

Submission status: Runtime Error

Solution code:
list = []
n = input()
for i range n:
    add = input()
    if(add in list):
        del list(add)
    else:
        list.append(add)
print(len(list))

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Here your code !
list = []
for i in range(1000):
    list.append(0)
N = int(input())
for i in range(N):
    a = int(input())
    if list[a - 1] == 0:
        list[a-1] = 1
    else:
        list[a-1] = 0
print(list.count(1))

Submission status: Runtime Error

Solution code:
N = int(input())
ans = []
for i in range(N):
    num = int(input())
    check = ans.count(num)
    if check == 0:
        ans.append(num)
    else:
        ans.pop(check)
print(len(ans))

Submission status: Runtime Error

Solution code:

N = int(input())
x=int(input())
y=[x]


for i in range(1,N):
    x=int(input())
    a=0
    flag=1
    while a < i:
        if y[a]==x:
            del y[a]
            flag=-1
            break
        a+=1
    if flag==1:
        y.append(x)

print(len(y))

Submission status: Runtime Error

Solution code:
n = int(input())
a = []
for i in range(n):
    a.append(int(input())
ans = 0
for i in set(a):
    if i in a:
        ans += 1
print(ans)

Submission status: Runtime Error

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

b = list()
for a in A:
    b.add(a)
    if len(set(b)) != len(b):
        b.pop(-1)
        b.remove(a)
print(len(b))

Submission status: Runtime Error

Solution code:
N = int(input())
ans = []
check = 0
for i in range(N):
    num = int(input())
    for n in range(len(ans)):
        if ans[n] == num:
            check = -1
            break
        else:
            check = n
    if check == -1:
        ans.remove(num)
    else:
        ans.append(num)
print(len(ans))

Submission status: Runtime Error

Solution code:
# coding;utf-8

n=int(input())
ans_dict={}
for i in range(0, n):
    a=input()
    if not a in ans_dict:
        ans_dict[a]=1
    else:
        ans_dict[a]+=1
sum=0
for thing in ans_dict:
    if thing%2:
        sum+=0

Submission status: Runtime Error

Solution code:
n = int(input())
A = [int(input()) for i in range(n)] 
 
counter = [0]*max(A)
cnt = 0
for a in A:
    counter[a-1] += 1
for c in counter:
    if c % 2 == 0 & c != 0:
        cnt += 1
print(cnt)

Submission status: Runtime Error

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

counter = [0]*1000000000
cnt = 0
for a in A:
    counter[a-1] += 1
for c in counter:
    if c % 2 == 0 & c != 0:
        cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
import defaultdict from collections
N = int(raw_input())
d = defaultdict(int)
for i in xrange(N):
    A = int(raw_input())
    d[A] = (d[A] + 1) % 2
ans = 0
for v in d.values():
    ans += v
print ans

Submission status: Runtime Error

Solution code:
import numpy as np
hoge = input()
N = int(hoge)
paper = set([])
for i in range(N):
    hoge = input()
    hoge = hoge.strip()
    if paper.issuperset(hoge):
        paper = paper - set([hoge])
    else:
        paper = paper + set([hoge])
    
print(len(paper))

Submission status: Runtime Error

Solution code:


n=int(input())

A=[]
count=0
for i in range(n):
    number=int(input())
    j=0
    while not j<len(A):
        if not A[j]==number:
            j+=1
        else:
            break
    if j<n:
        del A[j]
        count-=1
    else:
        A.append(number)
        count+=1
print(count,end='')

Submission status: Runtime Error

Solution code:

def duplicate_check(value, value_list):
	if value_list.count(value) == 2:
		while value in value_list: value_list.remove(value)
	return ()value_list
value_list = []
result_list = []
while True:
	try:
		number_of_test = int(input())
		value = int(input()
		value_list.append(value)
		result_list = duplicate_check(value, value_list)
	except EOFError:
		break

print(len(result_list))

Submission status: Runtime Error

Solution code:
ans = []
i = 0
for i in range(int(input()):
    now = input()
    if now in ans:
        ans.remove(now)
    else:
        ans.append(now)
print(len(ans))

Submission status: Runtime Error

Solution code:


n=int(input())

A=[]
count=0
for i in range(n):
    number=int(input())
    j=0
    while not j<len(A) and A[j]==number:
        j+=1
    if j<n:
        del A[j]
        count-=1
    else:
        A.append(number)
        count+=1
print(count,end='')

Submission status: Runtime Error

Solution code:


n=int(input())

A=[]
count=0
for i in range(n):
    number=int(input())
    j=0
    while not A[j]==number and j<len(A):
        j+=1
    if j<n:
        del A[j]
        count-=1
    else:
        A.append(number)
        count+=1
print(count,end='')

Submission status: Runtime Error

Solution code:
N = int(input())
list = []
for i in range(N):
    number = int(input())
    if  number in list:
        list.append(number)
    else:
        list.remove(number)
print(len(list))

Submission status: Runtime Error

Solution code:
l=int(input())

list=[0]*1000000000
for i in range(l):
    a=input()
    if list[a]==1:
        list[a]=0
    else:
        list[a]=1

print(list.count(1))

Submission status: Runtime Error

Solution code:
# coding: utf-8

A = [False for i in range(100000+1)]

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

print(A.count(True))

Submission status: Runtime Error

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

for a in A:
    L[a] = not L[a]
print(sum(L))

Submission status: Runtime Error

Solution code:
def quicksort(seq):
	if len(seq) < 1:
		return seq
	pivot = seq[0]
	left = []
	right = []
	for x in range(1, len(seq)):
		if seq[x] <= pivot:
			left.append(seq[x])
		else:
			right.append(seq[x])
	left = quicksort(left)
	right = quicksort(right)
	foo = [pivot]
	return left + foo + right

N = int(input())
array = []

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

#array = [1,4,3,2,610, 12, 11, 1,2,2,2,333]
asrted = quicksort(array)
#print(asrted)
prev = asrted[0]
cnt = 0

even = False
for i in range(1,len(asrted)):
	#print(asrted[i])
	if prev == asrted[i]:
		#print("true")
		even = not(even)
	else:
		if even == False:
			cnt += 1
			#print("counted")
		else:
			even = False
		prev = asrted[i]
if even == False:
	cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:

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

y=[0]*(100000+1)


for i in range(N):
    if y[x[i]]==0:
        y[x[i]]=1
    else:
        y[x[i]]=0

sum=0
for i in y:
    sum+=i

print(sum)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

import os
import sys
import math
import numpy as np


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

counter = np.zeros(np.max(A)+1)

for a in A:
    counter[a] += 1

counter %= 2

print(int(np.sum(counter)))

Submission status: Runtime Error

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


for a in A:
    L[a] = not L[a]

print(sum(L))

Submission status: Runtime Error

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


for a in A:
    L[a] = not L[a]

print(sum(L))

Submission status: Runtime Error

Solution code:
n = int(input())
m = set()
while n:
    x = int(input())
    if x in m:
        m.remove(x)
    else:
        m.add(x)
print(len(m))

Submission status: Runtime Error

Solution code:
N = int(input())
writing = [0 for i in range(1 << 9)]
for n in range(N):
    A = int(input()) - 1
    writing[A] += 1
    writing[A] %= 2
print(sum(writing))

Submission status: Runtime Error

Solution code:
N=int(raw_input())

n=[0]*(10**9+1)

for i in range(N):
    a=int(raw_input())
    n[a]^=1

print n.count(1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
a = []
for _ in n:
  i = int(input())
  if i in n:
    a.remove(i)
  else:
    a.append(i)
print(len(a))