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: Time Limit Exceeded

Solution code:
N= int(input())
n=[]
for i in range(N):
    k=int(input())
    if k in n:
        n.remove(k)
    else:
        n.append(k)

print(len(n))

Submission status: Time Limit Exceeded

Solution code:
N= int(input())
n=[]
ans=0
for i in range(N):
    k=int(input())
    if k in n:
        n.remove(k)
    else:
        n.append(k)

ans=len(n)

print(ans)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
e = [int(input()) for i in range(N)]
n = 0
for i in range(10000000001) :
	if e.count(i) %2 == 1 :
		n += 1
print(n)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = input()

l = []

for i in range(N):
    x = input()
    if (x in l):
        l.remove(x)
    else:
        l.append(x)

print len(l)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8

def main():
    a = []
    ans = 0
    temp_index = 0
    count_num = 0

    N = int(input())
    a = [input() for i in range(N)]
    a.sort()

    while temp_index<N:
        temp_value = a[temp_index]
        for comp_value in a[temp_index:]:

            if temp_index<N and comp_value==temp_value:
                count_num += 1
                temp_index += 1

        ans += count_num%2
        count_num = 0
    return print(ans)

if __name__=="__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
times = int(raw_input())
numbers = []

for x in xrange(times):
    number = int(raw_input())
    if number not in numbers:
        numbers.append(number)
    else:
        numbers.remove(number)

print len(numbers)

Submission status: Time Limit Exceeded

Solution code:
#ABC073C

n=int(raw_input())
l=[]
for i in xrange(n):
 l.append(int(raw_input()))
s=set(l)
ls=list(set(s))
cnt=0
for i in xrange(len(ls)):
 if l.count(ls[i])%2:
  cnt+=1
print cnt

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8

def main():
    a = []
    countNum = 0
    index_Num = 0
    res = 0

    N = int(input())
    a = [input() for i in range(N)]
    a.sort()

    while index_Num<N:
        index_NumValue = a[index_Num]

        for target_Num in a[index_Num:]:

            if target_Num==index_NumValue:
                countNum += 1

                if N<=index_Num+countNum:
                    index_Num += countNum
                    break
            else:
                index_Num += countNum
                break

        res += countNum%2
        countNum=0

    return print(res)

if __name__=="__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
ans=[]
for i in range(N):
  s=int(input())
  if s not in ans:
    ans+=[s]
  else:
    ans.remove(s)
print(len(ans))

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
A=[int(input()) for i in range(N)]
se=set(A)
ans=0
for el in se:
  if A.count(el)%2==1:
    ans+=1
print(ans)

Submission status: Time Limit Exceeded

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

for i in range(N):
    Ai = int(input())
    if Ai in A:
        A.remove(Ai)
    else:
        A.append(Ai)

print(len(A))

Submission status: Time Limit Exceeded

Solution code:
N=(int)(input())
List=[]
for i in range(0,N):
    A=(input())
    if A in List:
        List.remove(A)
    else:
        List.append(A)

print(len(List))

Submission status: Time Limit Exceeded

Solution code:
N=int(input())

P=[]

for i in range(N):
    A=input()
    if A in P:
        P.remove(A)
    else:
        P.append(A)
        
print(len(P))

Submission status: Time Limit Exceeded

Solution code:
from collections import deque
N = int(input())
A = [input() for i in range(N)]
count = deque()
for i in range(N):
    if A[i] not in count:
        count.append(A[i])
    else:
        count.remove(A[i])

print(len(count))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = [input() for i in range(N)]
count = list()
for i in range(N):
    if A[i] not in count:
        count.append(A[i])
    else:
        count.remove(A[i])

print(len(count))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = []
ans = 0
for i in range(n):
    a.append(int(input()))
set_a = set(a)
for i in set_a:
    ans += a.count(i) % 2
print(ans)

Submission status: Time Limit Exceeded

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

print(len(buff))

Submission status: Time Limit Exceeded

Solution code:
import bisect
n=input()
l = []
for i in range(n):
  a = input()
  bisect.insort_left(l,a)
flg = l[0]
numflg=0
le = 0
for i in range(len(l)):
  if flg != l[i]:
    if (i - numflg) % 2 == 1:
      le += 1
    flg = l[i]
    numflg = i
print le

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import bisect
n=input()
l = []
for i in range(n):
  a = input()
  m = bisect.bisect_left(l, a)
  if m != len(l) and l[m] == a:
    del l[m]
  else:
    bisect.insort_left(l,a)
print len(l)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import atexit
import io
import sys

temp_buffer = io.BytesIO()
sys.stdout = temp_buffer


@atexit.register
def write():
    sys.__stdout__.write(temp_buffer.getvalue())


result = list()
n = int(raw_input())
for i in range(n):
    m = int(raw_input())
    if m in result:
        result.remove(m)
    else:
        result.append(m)
print(len(result))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
a=input()
b=[]
for i in range(a):
    c=input()
    if c in b:
        b.remove(c)
    else:
        b.append(c)
print len(b)

Submission status: Time Limit Exceeded

Solution code:
import math

def BS(array, TARGET):
	low = 0
	high = len(array)
	while (low != high): # 検索したい値が存在しない場合は終了
		center = math.floor((low + high) / 2)
		if (array[center] < TARGET):
			low = center + 1
		elif (TARGET < array[center]):
			high = center
		else:
			del array[center]
			return array
	array.insert(high,TARGET)
	return array

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

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

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

print(len(x))

Submission status: Time Limit Exceeded

Solution code:
value_list = []
number_of_test = int(input())
while True:
	try:
		value = int(input())
		if value in value_list:
			value_list.remove(value)
		else:
			value_list.append(value)
	except EOFError:
		break
print(len(value_list))

Submission status: Time Limit Exceeded

Solution code:
value_list = []
number_of_test = int(input())
while True:
	try:
		value = int(input())
		if value_list.count(value) == 1:
			value_list.remove(value)
		else:
			value_list.append(value)
	except EOFError:
		break
print(len(value_list))

Submission status: Time Limit Exceeded

Solution code:
import sys

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

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


    b = sorted(a)

    point = 0

    buf = 0

    for i in b:
        if i!=buf:
            if b.count(i)%2==1:
                point += 1

            buf = i

    print(point)

if __name__=='__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
list = [[0]] * 10000000
total = 0

x = input()

for i in range(0, int(x)):
    flag = 0
    y = input()

    for a in range(0,len(list[int(y) % 10000000])):
        if list[int(y) % 10000000][a] == int(y):
            flag = 1
            list[int(y) % 10000000].pop(a)
            break
    if flag == 0:
        list[int(y) % 10000000].append(int(y))
        total += 1
    else:
        flag = 0
        total -= 1

print(total)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

for i in range(N):
    a = int(input())
    if i==0:
       array = [a]
    elif a in array:
       array.pop(array.index(a))
    else:
       array.append(int(a))
print(len(array))

Submission status: Time Limit Exceeded

Solution code:
import heapq
n = int(input())
a_list = []

for i in range(n):
    a = int(input())
    if a in a_list:
        a_list.remove(a)
    else:
        heapq.heappush(a_list, a)

print(len(a_list))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
arr = []
count = 0
for i in range(n):
    num = int(input())
    if num not in arr:
        arr.append(num)
        count += 1
    else:
        arr.remove(num)
        count -= 1

print(count)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
x=int(input())
y=[x]

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

print(len(y))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

b = list()
lenB = 0
for a in A:
    b.append(a)
    lenB += 1
    if len(set(b)) != lenB:
        b.pop(-1)
        b.remove(a)
        lenB -= 2
print(len(b))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

print(len(list))

Submission status: Time Limit Exceeded

Solution code:
value_list = []
number_of_test = int(input())
while True:
	try:
		value = int(input())
		value_list.append(value)
		if value_list.count(value) == 2:
			value_list.remove(value)
			value_list.pop()
	except EOFError:
		break
print(len(value_list))

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8
# Here your code !
list = []
for i in range(1000000000):
    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: Time Limit Exceeded

Solution code:
n = int(input())
arr = []
for i in range(n):
    num = int(input())
    if num not in arr:
        arr.append(num)
    else:
        arr.remove(num)
print(len(arr))

Submission status: Time Limit Exceeded

Solution code:
list = [[]] * 10000000
total = 0

x = input()

for i in range(0, int(x)):
    y = input()
    if int(y) in list[int(y) % 10000000]:
        list[int(y) % 10000000].remove(int(y))
        total -= 1
    else:
        list[int(y) % 10000000].append(int(y))
        total += 1

print(total)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
list = [[]] * 1000000
total = 0

x = input()

for i in range(0, int(x)):
    y = input()
    if int(y) in list[int(y) % 1000000]:
        list[int(y) % 1000000].remove(int(y))
        total -= 1
    else:
        list[int(y) % 1000000].append(int(y))
        total += 1

print(total)

Submission status: Time Limit Exceeded

Solution code:
list = [[]] * 100000
total = 0

x = input()

for i in range(0, int(x)):
    y = input()
    if int(y) in list[int(y) % 100000]:
        list[int(y) % 100000].remove(int(y))
        total -= 1
    else:
        list[int(y) % 100000].append(int(y))
        total += 1

print(total)

Submission status: Time Limit Exceeded

Solution code:
value = 0
value_list = []
result_list = []
number_of_test = int(input())
while True:
	try:
		value = int(input())
		value_list.append(value)
		if value_list.count(value) == 2:
			while value in value_list: value_list.remove(value)
	except EOFError:
		break
print(len(value_list))

Submission status: Time Limit Exceeded

Solution code:
import sys

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

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

    b = []
    for i in a:
        if i in b:
            b.remove(i)
        else :
            b.append(i)


    print(len(b))

if __name__=='__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
zero = []
one = []
two = []
three = []
four = []
five = []
six = []
seven = []
eight = []
nine = []
list = [zero,one,two,three,four,five,six,seven,eight,nine]
total = 0

x = input()

for i in range(0, int(x)):
    y = input()
    if int(y) in list[int(y) % 10]:
        list[int(y) % 10].remove(int(y))
        total -= 1
    else:
        list[int(y) % 10].append(int(y))
        total += 1

print(total)

Submission status: Time Limit Exceeded

Solution code:

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

# while True:
# 	value == input())
# 	print(value)
# 	if value != 0:
# 		value_list.append(value)
# 		result_list = duplicate_check(value, value_list)
# 	else:
# 		break
print(len(value_list))

Submission status: Time Limit Exceeded

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

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

#array = [12,22,16,22,18,12]

x = []

for i in array:
	if len(x) == 0:
		x.append(i)
	else:
		isFound, ind = BS(x,i)

		#print(isFound)
		if isFound:
			del x[ind]
		else:
			x.insert(ind,i)

		#print(x)
		
#print("final")
print(len(x))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
L,C = [],[]
for i in range(N):
    C.append(input())
for j in C:
    if j in L:
        L.remove(j)
    else:
        L.append(j)
print(len(L))

Submission status: Time Limit Exceeded

Solution code:
# coding;utf-8

n=int(input())
ans_list=[]
for i in range(0, n):
    a=input()
    if a in ans_list:
        ans_list.remove(a)
    else:
        ans_list.append(a)
print(len(ans_list))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
c = []
for i in range(n):
    a = int(input())
    if a in c:
        c.pop(c.index(a))
    else:
        c.append(a)
print(len(c))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a=[]
cnt=0
i=0
while cnt<n:
    a+=[int(input())]
    cnt+=1
b=set(a)
for x in b:
    if (a.count(x))%2==1:
        i+=1
print(i)

Submission status: Time Limit Exceeded

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 = []
number_of_test = int(input())
while True:
	try:
		value = int(input())
		value_list.append(value)
		result_list = duplicate_check(value, value_list)
	except EOFError:
		break
print(len(result_list))

Submission status: Time Limit Exceeded

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(set([hoge])):
        paper = paper - set([hoge])
    else:
        paper = paper | set([hoge])
    
print(len(paper))

Submission status: Time Limit Exceeded

Solution code:
list = []
total = 0

x = input()

for i in range(0, int(x)):
    y = input()
    if int(y) in list:
        list.remove(int(y))
        total -= 1
    else:
        list.append(int(y))
        total += 1

print(total)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

for i in range(N):
    a = int(input())
    if i==0:
       array = [a]
    elif a in array:
       array.pop(array.index(a))
    else:
       array.append(int(a))
print(len(array))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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: Time Limit Exceeded

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.remove(num)
print(len(ans))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
def solve():  # 073C - Write and Erase
    N = int(input())
    joisino_list = []

    for _ in range(N):
        a = int(input())
        if a not in joisino_list:
            joisino_list.append(a)
        else:
            joisino_list.remove(a)

    print(len(joisino_list))
    

solve()

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a=[input() for _ in range(n)]
b=set(a)
x=0
for i in b:
  if a.count(i) % 2 == 1:
    x+=1
print(x)

Submission status: Time Limit Exceeded

Solution code:


n=int(input())

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

Submission status: Time Limit Exceeded

Solution code:
kami=[]
n=int(input())
a=[]
cnt=0
while cnt<n:
    a+=[int(input())]
    cnt+=1

for x in a:
    if x not in kami:
         kami.append(x)
    else:
         kami.remove(x)

print(len(kami))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

for i in range(N):
    a = int(input())
    if i==0:
       array = [a]
    elif a in array:
       array.pop(array.index(a))
    else:
       array.append(a)

print(len(array))

Submission status: Time Limit Exceeded

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

for i in range(N):
    said_num = input()
    if said_num in sheet:
        sheet.remove(said_num)
    else:
        sheet.append(said_num)
        
print(len(sheet))

Submission status: Time Limit Exceeded

Solution code:
l=int(input())
 
list=[]
for i in range(l):
    a=input()
    try:
        del list[list.index(a)]
    except ValueError:
        list.append(a)
 
print(len(list))

Submission status: Time Limit Exceeded

Solution code:
kami=[]
n=int(input())
a=[]
for x in range(n):
    a+=[int(input())]

for x in a:
    if x not in kami:
         kami.append(x)
    else:
         kami.remove(x)

print(len(kami))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

setA = set(A)

if len(setA) < 10:
    res = 0
    for a in setA:
        if A.count(a)%2 != 0:
            res += 1

    print(res)

else:
    res = []
    while A:
        a = A.pop()
        if a in res:
            res.remove(a)
        else:
            res.append(a)
    
    print(len(res))

Submission status: Time Limit Exceeded

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

setA = set(A)

if len(setA) < 100:
    res = 0
    for a in setA:
        if A.count(a)%2 != 0:
            res += 1
    
    print(res)

else:
    res = []
    while A:
        a = A.pop()
        if a in res:
            res.remove(a)
        else:
            res.append(a)
    
    print(len(res))

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8

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

print(len(l))

Submission status: Time Limit Exceeded

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

i=0
while i < N:

    j=i+1
    while j < N:
        if x[i]==x[j]:
            del x[j]
            del x[i]
            N-=2
            i-=1
            break
        j+=1
    i+=1


print(len(x))

Submission status: Time Limit Exceeded

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

setA = set(A)

res = 0
for a in setA:
    if A.count(a)%2 != 0:
        res += 1

print(res)

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
B=[]
for i in range(N):
    a=int(input())
    j=0
    while j<len(B) and a<B[j]:
        j+=1
    if j>=len(B):
       B.insert(j,a)
    elif B[j]==a:
       B.pop(j)
    else:
       B.insert(j,a)
print(len(B))

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python
import sys
if __name__ == '__main__':
    line = sys.stdin.readline()
    N = int(line)
    ans = []
    for i in range(N):
        line = int(sys.stdin.readline())
        if line in ans:
            ans.remove(line)
        else:
            ans.extend([line])
    print(len(ans))

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8

A = [False for i in range(1000000000+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: Time Limit Exceeded

Solution code:
#!/usr/bin/env python
import sys
if __name__ == '__main__':
    line = sys.stdin.readline()
    N = int(line)
    ans = []
    for i in range(N):
        line = int(sys.stdin.readline())
        if line in ans:
            ans.remove(line)
        else:
            ans.append(line)
    print(len(ans))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
d = dict.fromkeys((range(100001)))
c = 0
for x in range(int(input())):
	n = int(input())
	if n in d:
		d[n] = not d[n]
		if d[n] == False:
			c -= 1
		else:
			c += 1
	else:
		d[n] = True
		c += 1

print c

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

num = 0
for n in set(lis):
    num += lis.count(n) % 2

print(num)

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8

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

for i in range (N):
    a = int(input())
    if  a in result:
        result.remove(a)
    else:
        result.append(a)

print(len(result))

Submission status: Time Limit Exceeded

Solution code:

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

i=0
while i < N:
    if x[i]==0:
        i+=1
        continue
    j=i+1
    while j < N:
        if x[i]==x[j]:
            x[i]=x[j]=0
            break
        j+=1
    i+=1

res=0
for i in x:
    if i!=0:
        res+=1

print(res)

Submission status: Time Limit Exceeded

Solution code:

A=[]
n=int(input())
for i in range(n):
    num=int(input())
    if(num in A):
        A.remove(num)
    else:
        A.append(num)
print(len(A))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

index = 0
result = 0
while True:
    num = A.count(A[index])
    index += num
    if (num % 2) == 1:
        result += 1
    if N <= index:
        break
print(result)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
d = {}
c = 0
for x in range(int(input())):
	n = int(input())
	if n in d:
		d[n] = not d[n]
		if d[n] == False:
			c -= 1
		else:
			c += 1
	else:
		d[n] = True
		c += 1

print c

Submission status: Time Limit Exceeded

Solution code:
N=int(raw_input())

num=[]
for i in range(N):
    num.append(int(raw_input()))

sn=set(num)

c=0
for n in sn:
    if num.count(n)%2==1:
        c+=1

print c

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8
# Here your code !
n = int(input())
pool = []
for i in range(n):
    a = input()
    if a not in pool:
        pool.append(a)
    else:
        pool.remove(a)
print(len(pool))

Submission status: Time Limit Exceeded

Solution code:
# ABC073 C

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

for i in range(N):
    said_num = int(input())
    if said_num in sheet:
        sheet.remove(said_num)
    else:
        sheet.append(said_num)
        
print(len(sheet))

Submission status: Time Limit Exceeded

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

res = []
while A:
    a = A.pop()
    if a in res:
        res.remove(a)
    else:
        res.append(a)

print(len(res))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
inp = int(input())

lists = []
for i in range(inp):
	a = input()
	if a not in lists:
		lists.append(a)
	else:
		lists.remove(a)
print(len(lists))

Submission status: Time Limit Exceeded

Solution code:
n=int(raw_input())
li=[]
while n !=0:
    a = int(raw_input())
    if a not in li:
        li.append(a)
    else:
        li.remove(a)
    n-=1
print(len(li))