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:
d = {}
for i in range(input()):
  a = input()
  d[a] = d.get(a, 1)

print len(filter(lambda x: x % 2, map(lambda x: d[x], d)))

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = [int(input()) for i in range(N)]
ans2 = set(ans)

print(len(ans2))

Submission status: Wrong Answer

Solution code:
a=input()
b=[]
for i in range(a):
    b.append(input())
b.sort()
c=[]
pre=0
time=0
for i in b:
    if pre==i:
        time+=1
    else:
        if time%2==0:
            c.append(pre)
            pre=i
            time=1
if time%2==0:
    c.append(pre)
print len(c)

Submission status: Wrong Answer

Solution code:
N = int(input())
w = []
sum = N

for i in range(N):
    w.append(input())
  
for x in range(N):
	for y in range(x+1,N):
		if w[x] == w[y]:
			w[x] = 0
    		sum -= 1

print(abs(sum))

Submission status: Wrong Answer

Solution code:
value_list = []
number_of_test = int(input())
cout = 0
while True:
	try:
		value = int(input())
		if value in value_list:
			value_list.remove(value)
			cout -= 1
		else:
			cout += 1
	except EOFError:
		break
print(cout)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
 
N = int(input())
result = [[],[]]

for i in range (N):
    a = int(input())
    if a < 10000:
        if  a in result[0]:
            result[0].remove(a)
        else:
            result[0].append(a)
    else:
        if  a in result[0]:
            result[1].remove(a)
        else:
            result[1].append(a)

print(len(result[0])+len(result[1]))

Submission status: Wrong Answer

Solution code:
n = input()

dic = {}

for i in range(n):
    a = input()
    if a not in dic:
        dic[a] = 1
    else:
        dic[a] = 0

keys = dic.keys()
ct = 0
for i in keys:
    if dic[i] == 1:
        ct += 1

print ct

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
d = dict()
for i in range(n):
    a = int(input())
    if a in d:
        d[a] = 0
    else:
        d[a] = 1

print(sum(d.values()))

Submission status: Wrong Answer

Solution code:
time = int(input())
ans = []
n = 0
for i in range(time):
    ans.append(input())
ans.sort(key=int)
while n+1 < len(ans):
    if ans[n] == ans[int(n + 1)]:
        ans.pop(n)
        ans.pop(n)
    else:
        n += 1
print(len(ans),ans)

Submission status: Wrong Answer

Solution code:
n = input()

dic = {}

for i in range(n):
    a = input()
    if a not in dic:
        dic[a] = 1
    else:
        dic[a] = 0

keys = dic.keys()
ct = 0
for i in keys:
    if dic[i] > 0:
        ct += 1

print ct

Submission status: Wrong Answer

Solution code:
N = int(input())

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

nums.sort()

ans = 0
cnt = 0
tmp = 0
for i in range(N):

    if tmp == nums[i]:
        cnt += 1
    else:
        if cnt % 2 == 0:
            ans += 1
        cnt = 0
    tmp = nums[i]

print(ans - 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
time = int(input())
ans = []
i = 0
for i in range(time):
    ans.append(input())
ans.sort(key=int)
while i+1 < len(ans):
    if ans[i] == ans[i+1]:
        del ans[i]
        del ans[i]
    else:
        i += 1
print(len(ans))

Submission status: Wrong Answer

Solution code:
import sys

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

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

    point = 0
    for i in a:
        if a.count(i)%2==1:
            point += 1


    print(point)

Submission status: Wrong Answer

Solution code:
N = int(input())

for i in range(N):
    a = list(input())
a.sort()
count = 0
continuous = 0
for j in range(len(a)-1):
    if a[j]==a[j+1]:
        continuous = 1
        count += 1
    elif continuous == 1:
        continuous = 0
        count += 1

if a[len(a)-1] == a[len(a)-2]:
    count += 1
print(len(a)-count)

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
N = int(input())

for i in range(N):
    a = list(input())
a.sort()

count = 0
for j in range(len(a)-1):
    if a[j]==a[j+1]:
        count += 1
print(len(a)-count)

Submission status: Wrong Answer

Solution code:
N = int(input())
w = []
sum = N

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

for num in range(N-1):
	for i in range(num+1,N):
		if w[num] == w[i]:
			sum -= 1
			
print(sum)

Submission status: Wrong Answer

Solution code:
N = int(input())
w = []
sum = N

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

for num in range(N-1):
	for i in range(num+1,N):
		if w[num] == w[i]:
			w[i] = 0 

for k in range(N):
	if w[k] == 0:
		sum -= 1

print(sum)

Submission status: Wrong Answer

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

res = []
tmp = 0
tf = True
for i in range(len(A)):
    if A[i] == tmp:
        tf = not tf
    else:
        res.append(tf)
        tf = True
    tmp = A[i]

print(sum(res)-1)

Submission status: Wrong Answer

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

res = []
tmp = A[0]
tf = True
for i in range(1, len(A)):
    if A[i] == tmp:
        tf = not tf
    else:
        res.append(tf)
        tf = True
    tmp = A[i]

print(sum(res))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if len(A) == 1:
    print(1)
else:
    res = []
    tmp = A[0]
    count = 1
    for i in range(1, len(A)):
        if A[i] == tmp:
            count += 1
        else:
            res.append(count%2 != 0)
            count = 1
        tmp = A[i]
    
    print(sum(res))

Submission status: Wrong Answer

Solution code:

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


t = set()
B = [x for x in A if x in t or t.add(x)]


C = [item for item in A if item not in B]
print(len(C))

Submission status: Wrong Answer

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

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

    print(len(set(joisino_list)) - (N - len(set(joisino_list))))
    

solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

res = []
tmp = A[0]
count = 0
for i in range(1, len(A)):
    if A[i] == tmp:
        count += 1
    else:
        res.append(count%2 == 0)
        count = 0
    tmp = A[i]

print(sum(res))

Submission status: Wrong Answer

Solution code:
def bins1(sortedlist,n,x):
    start = 0
    end = n - 1
    if(start>end):
        return '0'
    while(start <= end):
        mid =int( (start + end)/2)
        if (x == sortedlist[mid]):
            return int(mid)
        elif(x < sortedlist[mid]):
            end = mid - 1
        else:
            start = mid + 1 
 
    if(sortedlist[mid]<num):
        return str((mid-1))
    else:
        return str(mid)
A=[]
n=int(input())
for i in range(n):
    num=int(input())
    mid=bins1(A,len(A),num)
    if(type(mid)==type(4)):
        del A[mid]
    else:
        A.insert(int(mid),num)
print(len(A))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

res = []
tmp = A[0]
count = 1
for i in range(1, len(A)):
    if A[i] == tmp:
        count += 1
    else:
        res.append(count%2 != 0)
        count = 1
    tmp = A[i]

print(sum(res))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

res = []
tmp = 0
count = 1
while A:
    a = A.pop()
    if a == tmp:
        count += 1
    else:
        res.append(count%2 != 0)
        count = 1
    tmp = a
    
print(sum(res))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a_list = []
s = 0

for i in range(n):
    a = int(input())
    if a in a_list:
        s -= 1
    else:
        s += 1
        a_list.append(a)

print(s)

Submission status: Wrong Answer

Solution code:
N=int(input())

A=[int(input()) for i in range(N)]
A.sort()
ans=0

flag=False

for i in range(N-1):
	if A[i]==A[i+1]:
		ans-=2
	ans+=1
print(ans+1)

Submission status: Wrong Answer

Solution code:
from collections import Counter

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

counter = Counter(a)

ans = 0
for num in counter:
	if counter[num] % 2 == 1:
		ans += counter[num]

        
print(ans)

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
num = int(input())
ary = []
ans = 0
for a in range(num):
    ary.append(int(input()))
ary.sort()
ikkomae = ary[0]
count = 1
for a in range(num):
    ind = a + 1
    if ind == num:
        break
    imano = ary[ind]
    if ikkomae == imano:
        count+=1
    else:
        if(count%2==1):
            ans+=1
        count = 1
    ikkomae = imano
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(raw_input())

num=[]
d=[]
for i in range(N):
    a=int(raw_input())
    if a in num:
        d.append(a)
    num.append(a)
    
sn=set(num)
sd=set(d)

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

print len(sn-sd)-c

Submission status: Wrong Answer

Solution code:
N=int(input())

A=[int(input()) for i in range(N)]
A.sort()
ans=0

flag=False

for i in range(N-1):
	if flag:
		flag=False
	elif A[i]==A[i+1]:
		flag=True
	else:
		ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())

A=[int(input()) for i in range(N)]
A.sort()
ans=0

flag=False

for i in range(N-1):
	if A[i]==A[i+1]:
		flag=True
	elif flag:
		flag=False
	else:
		ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
a.sort()
ans = 0
for i in range(1,len(a)-1):
    if a[i]!=a[i-1] and a[i]!=a[i+1]:
        ans += 1
if a[0] != a[1]:
    ans += 1
if a[len(a)-1] != a[len(a)-2]:
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
from collections import Counter

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

    counter_a = Counter(A)

    ans = 0
    for count in counter_a.values():
        if count % 2 == 0:
            ans += 1

    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

a = sorted(a)

t = 0
b = False
ans = 0
for i in range(N):
    if not a[i] == t:
        if b:
            ans += 1
        t = a[i]
        b = True
    else:
        if b:
            b = False
        else:
            b = True


print(ans)

Submission status: Wrong Answer

Solution code:
number_set = set()
N = int(input())

for i in range(N):
    new_num = input()
    if new_num in number_set:
        number_set.remove(new_num)
    else:
        number_set.add(new_num)

print(len(number_set))
print(number_set)

Submission status: Wrong Answer

Solution code:
N=int(raw_input())

c=0
n=[]
for i in range(N):
    a=int(raw_input())
    if n.count(a)==0:
        n.append(a)
    elif n.count(a)%2==0:
        c-=1
    else:
        c+=1

print len(n)-c

Submission status: Wrong Answer

Solution code:
import collections as col


n = int(input())
ary = []
for _ in range(n):
    ary.append(int(input()))

ary = col.Counter(ary)

print(sum([v for v in ary.values() if v%2 != 0]))

Submission status: Wrong Answer

Solution code:
N = int(input()) #1行目のNを取得
l = [int(input()) for i in range(N)] #N回繰り返し s に値を取得

l.sort()


a=0
ans=0
for i in l:
	if i==a:
		ans -= 1
	else:
		ans += 1
	a=i

print(ans)

Submission status: Wrong Answer

Solution code:
#!usr/bim/python
#! -*- coding: utf-8 -*-

n = raw_input()
n = int(n)

al = []

for i in range(n):
    a = raw_input()
    a = int(a)
    al.append(a)

al.sort()

num = 0

i = 0
while i < n-1:
    if al[i] == al[i+1]:
        i += 2
    else:
        num += 1
        i += 1

print num

Submission status: Wrong Answer

Solution code:
N = int(input())
from collections import Counter
c = []
for i in range(N):
    c.append(int(input()))

c=Counter(c)
print(sum([1 for k, v in c.items() if v % 2 == 0]))

Submission status: Wrong Answer

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

chk={}

for sa in a:
    if sa in chk:
        if chk[sa]==1:
            chk[sa]=0
        else:
            chk[sa]=1
    else:
        chk[sa]=1


print(chk)
print(sum(chk.values()))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# 20
n = int(input())
a = [int(input()) for i in range(n)]
al = list(set(a))
cnt = 0

for i in al:
    cnt += a.count(i)%2

print(cnt)

Submission status: Time Limit Exceeded

Solution code:
## 20
n = int(input())
#a = [0 for i in range(n)]
a = []
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 = int(input())
AA =[]
for i in range(N):
  a = int(input())
  AA.append(a)
AA.sort()

count = 0
AAA = set(AA)
for i in AAA:
  x = AA.count(i)
  if x%2 ==1:
    count +=1
print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

paper = []
for i in range(N):
    if not A[i] in paper:
        paper.append(A[i])
    else:
        paper.remove(A[i])

print(len(paper))

Submission status: Time Limit Exceeded

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

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

print(len(As))

Submission status: Time Limit Exceeded

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

for _ in range(N):
  A.append(int(input()))
  
S = set(A)

for i in set(A):
  if A.count(i)%2 == 1:
    ans += 1
    
print(ans)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

kami = []

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

print(len(kami))

Submission status: Time Limit Exceeded

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

print(len(kami))

Submission status: Time Limit Exceeded

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

for i in a :
    if i in kami :
        kami.remove(i)
    else :
        kami.append(i)
    kami.sort()

print(len(kami))

Submission status: Time Limit Exceeded

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

c = 0
for i in range(n) :
    if a.count(a[i]) % 2 == 1:
        c += 1

print(c)

Submission status: Time Limit Exceeded

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

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

print(len(kami))

Submission status: Time Limit Exceeded

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

for i in A:
    if i in ans:
        ans.remove(i)
    else:
        ans.append(i)
print(len(ans))

Submission status: Time Limit Exceeded

Solution code:
import sys
import copy
import math
import itertools
#import numpy as np
import re

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

for i in A:
    if i in ans:
        ans.remove(i)
    else:
        ans.append(i)
print(len(ans))

Submission status: Time Limit Exceeded

Solution code:
import sys
import copy
import math
import itertools
#import numpy as np
import re

N = int(input())
A = [int(input()) for c in range(N)]
A_s = list(set(A))
cnt=0

for i in A_s:
    if A.count(i)%2 == 1:
        cnt+=1

print(cnt)

Submission status: Time Limit Exceeded

Solution code:
import sys
import copy
import math
import itertools
#import numpy as np
import re

N = int(input())
A = [int(input()) for c in range(N)]
ans = []
cnt=0
for i in range(N):
    if ans.count(A[i])%2==0:
        cnt+=1
    else:
        cnt-=1
    ans.append(A[i])


print(cnt)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
x = [int(input()) for i in range(n)]
y = [j for j in set(x) if x.count(j) > 1]
z = [k for k in set(x) if x.count(k) == 1]
cnt = len(z)
for i in range(len(y)):
    if x.count(y[i]) % 2 == 1:
        cnt += 1
print(cnt)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
x = [int(input()) for i in range(n)]
y = list(set(x))
cnt = 0
for i in range(len(y)):
    if x.count(y[i]) % 2 == 1:
        cnt += 1
print(cnt)

Submission status: Time Limit Exceeded

Solution code:
# ABC 073: C – Write and Erase
N = int(input())
A = [int(input()) for _ in range(N)]

A.sort()

count = 0

for num in set(A):
    if A.count(num) % 2 == 1:
        count += 1

print(count)

Submission status: Time Limit Exceeded

Solution code:
# ABC 073: C – Write and Erase
N = int(input())
A = [int(input()) for _ in range(N)]

count = 0

for num in set(A):
    if A.count(num) % 2 == 1:
        count += 1

print(count)

Submission status: Time Limit Exceeded

Solution code:
# ABC 073: C – Write and Erase
N = int(input())
A = [int(input()) for _ in range(N)]

nums = set(A)
count = 0

for num in nums:
    if A.count(num) % 2 == 1:
        count += 1

print(count)

Submission status: Time Limit Exceeded

Solution code:
# ABC 073: C – Write and Erase
N = int(input())
A = [int(input()) for _ in range(N)]

nums = []

for num in A:
    if num not in nums:
        nums.append(num)
    else:
        del nums[nums.index(num)]

print(len(nums))

Submission status: Time Limit Exceeded

Solution code:
# ABC 073: C – Write and Erase
N = int(input())
A = [int(input()) for _ in range(N)]

nums = []

for num in A:
    if nums.count(num) == 0:
        nums.append(num)
    else:
        del nums[nums.index(num)]

print(len(nums))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
from sys import exit
import math
import collections
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

n = ii()
a = [ii() for i in range(n)]

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
lis = []
for _ in range(n):
    x = int(input())
    if x in lis:
        lis.remove(x)
    else:
        lis.append(x)

print(len(lis))

Submission status: Time Limit Exceeded

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


if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
A = [int(input()) for _ in range(n)]
B = list(set(A))
ans = 0

for i in B:
    if A.count(i) % 2 == 1:
        ans += 1

print(ans)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
A = [int(input()) for _ in range(n)]
B = list(set(A))
ans = 0

for i in B:
    if A.count(i) % 2 == 1:
        ans += 1

print(ans)

Submission status: Time Limit Exceeded

Solution code:
def main():
    n = int(input())
    a_lst = [int(input()) for _ in range(n)]

    new_lst = []
    for i in range(n):
        a = a_lst[i]
        if a not in new_lst:
            new_lst.append(a)
        else:
            new_lst.remove(a)

    count = len(new_lst)
    print(count)


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = []
for _ in range(n):
    i = int(input())
    try:
        a.remove(i)
    except ValueError:
        a.append(i)
print(len(a))

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
A=[int(input()) for _ in range(n)]
B=set(A)
ans=0
for i in B:
    c=A.count(i)
    ans+=c%2
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(n):
    s = input()
    if s not in l:
        l += [s]
    else:
        l.remove(s)
print(len(l))

Submission status: Time Limit Exceeded

Solution code:
from collections import deque
d=deque()
for _ in range(int(input())):
  a=int(input())
  if a in d:
    try:
      d.remove(a)
    except ValueError:
      pass
  else:
    d.append(a)
print(len(d))

Submission status: Time Limit Exceeded

Solution code:
from collections import deque
d=deque()
for _ in range(int(input())):
  a=int(input())
  try:
    d.remove(a)
  except ValueError:
    d.append(a)
print(len(d))

Submission status: Time Limit Exceeded

Solution code:
# coding = SJIS

n = int(input())
pap = []
for i in range(n):
    p = int(input())
    if p not in pap:
        pap.append(p)
    else:
        pap.remove(p)

print(len(pap))

Submission status: Time Limit Exceeded

Solution code:
# coding = SJIS

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

for i in range(n):
    if a[i] not in pap:
        pap.append(a[i])
    elif a[i] in pap:
        pap.remove(a[i])

print(len(pap))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = list(int(input()) for _ in range(N))
cnt = 0
for i in set(A):
    if A.count(i)%2==0:
        continue
    else:
        cnt += 1
print(cnt)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = []
for _ in range(N):
    A.append(input())
sA = set(A)
ans = 0
for num in sA:
    if A.count(num) % 2 == 1:
        ans += 1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = []
for _ in range(N):
    A.append(int(input()))
sA = set(A)
ans = 0
for num in sA:
    if A.count(num) % 2 == 1:
        ans += 1
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
A=[]
for i in range(N):
  A.append(int(input()))
B=set(A)
# print(A)
# print(B)

# シミュレーションする方法で解いてみる
C=set()
for i in range(N):
  if A[i] in C:
    C.remove(A[i])
  else:
    C=C|{A[i]}
  # print(C)
print(len(C))

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
A=[]
for i in range(N):
  A.append(int(input()))
B=set(A)
# print(A)
# print(B)

ct=0
for i in B:
  if A.count(i)%2==1:
    ct+=1
print(ct)

Submission status: Time Limit Exceeded

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

print(len(A))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
 
l = []
for _ in range(N):
  a = int(input())
  if a in l:
    l.pop(l.index(a))
  else:
    l.append(a)

print(len(l))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

l = []
for _ in range(N):
  a = int(input())
  if a in l:
    l.pop(l.index(a))
  else:
    l.append(a)

print(len(l))

Submission status: Time Limit Exceeded

Solution code:
s = input()
n = int(s)

arrays = []


for i in range(n):
    v = input()
    w = int(v)
    check = True
    for j in range(len(arrays)):
        if arrays[j] == w:
            arrays[j] = -1
            check = False
            break
    if check:    
        arrays.append(w)


count = 0
for i in range(len(arrays)):
    if arrays[i] >= 0:
        count += 1
        
print(count)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = []
for _ in range(N):
    A.append(input()) 
B = set(A)
M = len(B)
ans = 0
for i in B:
  if A.count(i)%2 ==1:
    ans += 1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
n=int(input())

arr=[]

for i in range(n):

    a=int(input())

    if a in arr:
      	arr.remove(a)

    else:
        arr.append(a)


print(len(arr))

Submission status: Time Limit Exceeded

Solution code:
n=int(input())

ans=0
arr=[]

for i in range(n):

    a=int(input())

    if a in arr:
        
        ans-=1
        arr.remove(a)

    else:

        ans+=1
        arr.append(a)


print(ans)

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python3

from sys import stdin

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

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

print(ans)

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python3

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

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

print(ans)