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:
d=set()
for i in[0]*input():d^={input()}
print len(d)

Submission status: Time Limit Exceeded

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

index=0
while index < n:
    inputN = int(input())
    if inputN in listForA:
        listForA.remove(inputN)
    else:
        listForA.append(inputN)
    index+=1

print(len(listForA))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
A.sort()
A.append(-1)
j = 1
J = 1
ans = 0
while (1 <= j <= len(A)):
  if (A[j-1] == A[j]):
    J += 1
  else:
    if (J%2 != 0):
      ans += 1
      j += J
      J = 1
    else:
      j += J
      J = 1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
P = []
for i in range(len(A)):
  if (A[i] not in P):
    P.append(A[i])
c = 0
for i in range(len(P)):
  if (A.count(P[i])%2 == 1):
    c += 1
print(c)

Submission status: Time Limit Exceeded

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

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

print(len(li))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
L = [int(input()) for i in range(N)]
A = []
for i in range(len(L)):
  if (L[i] not in A):
    A.append(L[i])
k = 0
for j in range(len(A)):
  s = L.count(A[j])
  if (s%2 != 0):
    k += 1
print(k)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = input()
dic = {}
for i in range(n):
	z = input()
	dic[z] = dic.get(z,0)+1
ans = 0
for i in dic:
	if dic[i]&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))
ct=0
for i in range(len(B)):
    if A.count(B[i])%2==0:
        ct+=1
print(len(B)-ct)

Submission status: Time Limit Exceeded

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

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())
b=[]
for i in range(N):
    a=input()
    if  a in b:
        b.remove(a)
    else:
        b.append(a)
print(len(b))

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a=[]
for i in range(n):
    a.append(int(input()))
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:
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:
n = int(input())
a = [0] * n
 
for i in range(n):
    a[i] = int(input())
 
ct = 0
for i in range(n):
    t = a.count(a[i])
    if t % 2 == 1:  # nかかる？この時点でn^2?
        ct += 1
 
    i += t
 
print(ct)

Submission status: Time Limit Exceeded

Solution code:
# vim: set fileencoding=utf-8 :
import bisect

n = int(raw_input())
a = [0] * n

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

a.sort()
ct = 0
i = 0
while True:
    wc = bisect.bisect_right(a[i:], a[i])
    if wc % 2 == 1:
        ct += 1

    i += wc
    if i == n:
        break

print(ct)

Submission status: Time Limit Exceeded

Solution code:
# vim: set fileencoding=utf-8 :
import bisect

n = int(raw_input())
a = [0] * n

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

a.sort()
ct = 0
i = 0
for _ in range(n):
    wc = bisect.bisect_right(a[i:], a[i])
    if wc % 2 == 1:  # nかかる？この時点でn^2?
        ct += 1

    i += wc
    if i == n:
        break

print(ct)

Submission status: Time Limit Exceeded

Solution code:
# vim: set fileencoding=utf-8 :
n = int(raw_input())
a = [0] * n

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

a.sort()
ct = 0
for i in range(n):
    t = a.count(a[i])
    if t % 2 == 1:  # nかかる？この時点でn^2?
        ct += 1

    i += t

print(ct)

Submission status: Time Limit Exceeded

Solution code:
# vim: set fileencoding=utf-8 :
n = int(raw_input())
a = []

for i in range(n):
    stdin = int(raw_input())
    if {stdin} <= set(a):
        a[a.index(stdin)] = None
    else:
        a.append(stdin)

if {None} <= set(a):
    print(len(set(a)) - 1)
else:
    print(len(set(a)))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

A = []
numbers = {}
for i in range(N):
    num = int(input())
    if num not in A:
        A.append(num)
        
    if num in numbers.keys():
        numbers[num] = (numbers[num] + 1)%2 
    else:
        numbers[num] = 1

##print(numbers)

count = 0
for i in range(len(A)):
    val = numbers[A[i]]
    if val == 1:
        count += 1

print(count)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = list(map(int, [input() for _ in range(n)]))
ans = 0
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())
a = list(map(int, [input() for _ in range(n)]))
ans = 0
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())
l = []
for i in range(n):
  a = input()
  if a in l:
    l.remove(a)
  else:
    l.append(a)
print(len(l))

Submission status: Time Limit Exceeded

Solution code:
from collections import defaultdict
n = input()
d = defaultdict(int)
for i in xrange(n):
	x = input()
	d[x] += 1
ans = 0
for i in d:
	if d[i]&1:
		ans += 1
print ans

Submission status: Time Limit Exceeded

Solution code:
'''input
3
6
2
6
'''
n = input()
s = set()
for i in xrange(n):
	x = input()
	if x in s:
		s.remove(x)
	else:
		s.add(x)

print len(s)

Submission status: Time Limit Exceeded

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

def main():
    n = int(input())
    a_list = []
    for _ in range(n):
        num = int(input())
        if num in a_list:
            a_list.remove(num)
        else:
            a_list.append(num)
    print(len(a_list))


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
X = [ 0 for _ in range(10**9)]
for i in range(N):
    a = int(input())
    X[a] = (X[a]+1)%2
print(sum(X))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
count=0
li=[0 for i in range(n)]
for i in range(n):
    a=int(input())
    li[i]=a
li.sort()
while len(li)!=0:
    x=li.count(li[0])
    if x%2==1:
        count+=1
    li=li[x:]
print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N=int(input())

ans=[]

for i in range(N):
  a=int(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())

num = []

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

print(len(num))

Submission status: Time Limit Exceeded

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

Paper = []

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

print(len(Paper))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
a = []
for i in range(N):
    a.append(int(input()))
m = max(a)
n = 0
j = 1
while j <= m:
    c = a.count(j)
    if c%2 == 1:
        n += 1
        j += 1
    else:
        j += 1
print(n)

Submission status: Time Limit Exceeded

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

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

B=[None]
Ans=0
for i in A:
    if i in B:
        continue
    else:
        if A.count(i)%2==1:
            Ans+=1
            B+=[i]



print(Ans)

Submission status: Time Limit Exceeded

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

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

X=set(A)

Ans=0
for i in X:
    if A.count(i)%2==1:
        Ans+=1

print(Ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
def m():
    N = int(input())
    A = [int(input()) for _ in range(N)]
    ans = []
    for a in A: ans.remove(a) if a in ans else ans.append(a)
    return len(ans)

print(m())

Submission status: Time Limit Exceeded

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

    for a in A:
        if a in ans:
            ans.remove(a)
        else:
            ans.append(a)
    return len(ans)

print(m())

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

nlll = {}
s = []
for i in range(1000000000):
    s.append(0)
    
for i in range(n):
    aaa = int(input())
    if s[aaa] == 0:
        s[aaa] = 1
    elif s[aaa] == 1:
        s[aaa] = 0
    else:
        None

sums = 0
for i in s:
    sums = sums + i
print(sums)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

Submission status: Time Limit Exceeded

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:
        while i in a:
            a.remove(i)
    else:
        None
        
print(len(list(set(a))))

Submission status: Time Limit Exceeded

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

for i in range(len(a)):
    if a[i] in b:
        b.remove(a[i])
    else:
        b.append(a[i])
        
print(len(b))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
loops = int(input())
paper = []

# 1 <= loops <= 10^6
for _ in range(loops):
    num = int(input())
    if num in paper:
        paper.remove(num)
    else:
        paper.append(num)
print(len(paper))

Submission status: Time Limit Exceeded

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)]

a.sort()
count = 0
ans = 0
for i in a:
    count = a.count(i)
    if count % 2 != 0:
        ans += 1
print(ans)

Submission status: Time Limit Exceeded

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)]

a.sort()
b = 0
count = 0
ans = 0
for i in a:
    if b != i:
        count = a.count(i)
        if count % 2 != 0:
            ans += 1
        else:
            pass
    else:
        pass
    b = i

print(ans)

Submission status: Time Limit Exceeded

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)]

s = []
for i in a:
    flag = 1
    for j in s:
        if j == i:
            s.remove(i)
            flag = 0
            break
    if flag:
        s.append(i)

print(len(s))

Submission status: Time Limit Exceeded

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



print(len(A))

Submission status: Time Limit Exceeded

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

P = list(set(A))

for j in range(len(P)):
    if A.count(int(P[j]))%2==1:
        x += 1

print(x)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
paper = []
for i in range(n):
  tmp = input().rstrip()
  if tmp not in paper:
    paper.append(tmp)
  else:
    paper.pop(paper.index(tmp))
print(len(paper))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
x = [int(input()) for i in range(n)]
x.sort()
answer = 0
while x != []:
	num,y = 0,x[0]
	while x != [] and x[0] == y:
		num += 1
		x = x[1:]
	if num%2==1:
		answer += 1
print(answer)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

num_count = [A.count(i) % 2 for i in set(A)]
        
print(sum(num_count))

Submission status: Time Limit Exceeded

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

num_count = {i: A.count(i) for i in set(A)}
ans = 0

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

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8
# Your code here!
N = int(input())
A = []
for i in range(N):
    num = 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())
outp=[]
for i in range(n):
  outp.append(int(input()))
num=0
for j in list(set(outp)):
  num+=outp.count(j)%2
print(num)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

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

print(len(nums))

Submission status: Time Limit Exceeded

Solution code:
from collections import deque
n=int(input())
a=[int(input()) for _ in range(n)]
ans=deque([])
for i in range(n):
    if a[i] not in ans:
        ans.appendleft(a[i])
    else:
        ans.remove(a[i])
print(len(ans))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(n):
    a = int(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 = []
ans = []

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

Submission status: Time Limit Exceeded

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

for i in range(n):
    if a[i] in ans:
        ans.remove(a[i])
    else:
        ans.append(a[i])
print(len(ans))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
P = []
ans = 0
n = 0
for i in range(N):
    s = int(input())
    P.append(s)
P.sort()
while n < N:
    s =  P.count(P[n])
    if s % 2 != 0:
        ans += 1
    n += s
print(ans)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
P = []
ans = 0
for i in range(N):
    s = int(input())
    P.append(s)
    ans += 1
P.sort()
for i in range(N-1):
    for j in range(i+1,N):
        if P[i] == P[j]:
            P[i] = -1 * i
            P[j] =  -1 * j
            ans -= 2
            break
        
print(ans)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
P = []
ans = 0
for i in range(N):
    s = int(input())
    P.append(s)
    if P.count(s) % 2 == 0:
        ans -= 1
    else:
        ans += 1
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
count = int(raw_input())
k = [int(raw_input()) for i in xrange(count)]
temp = []
for i in xrange(len(k)):
    if k[i] not in temp:
        temp.append(k[i])
    elif k[i] in temp:
        temp.remove(k[i])

print len(temp)

Submission status: Time Limit Exceeded

Solution code:
count = int(raw_input())
k = [int(raw_input()) for i in range(count)]
temp = []
for i in range(len(k)):
    if k[i] not in temp:
        temp.append(k[i])
    elif k[i] in temp:
        temp.remove(k[i])

print len(temp)

Submission status: Time Limit Exceeded

Solution code:

def solve():
  n = int(input())
  l = []
  for i in range(n):
    a = int(input())
    l.append(a)
  
  bit = 0
  for j in l:
    bit ^= (1 << j)

  ans = countSetBits(bit)
  print(ans)

def countSetBits(n):
  count = 0
  while(n):
    count += n & 1
    n >>= 1
  return count

if __name__ == "__main__":
  solve()

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 19 10:03:26 2017

@author: kotania
"""
N = int(input())

AList = []

count = 0
        
for n in range(0,N):
    An = input()
    
    if An in AList:
        AList.remove(An)
        count -= 1
    else:
        AList.append(An)
        count += 1

print(count)

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 19 10:03:26 2017

@author: kotania
"""
N = int(input())
AList = []

count = 0
        
for n in range(0,N):
    An = input()
    
    if An not in AList:
        AList.append(An)
        count += 1
    else:
        AList.remove(An)
        count -= 1

print(count)

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 19 10:03:26 2017

@author: kotania
"""
N = int(input())
AList = [0]*N

count = 0
        
for n in range(0,N):
    An = int(input())
    
    if An not in AList:
        AList.append(An)
        count += 1
    else:
        AList.remove(An)
        count -= 1

print(count)

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 19 10:03:26 2017

@author: kotania
"""
N = int(input())
AList = [0]*N

for n in range(0,N):
    AList[n] = int(input())
  
PList = []
count = 0

for a in AList:
    if a not in PList:
        PList.append(a)
        count += 1
    else:
        PList.remove(a)
        count -= 1

print(count)

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 19 10:03:26 2017

@author: kotania
"""
N = int(input())
AList = [0]*N

for n in range(0,N):
    AList[n] = int(input())
  
PList = []

for a in AList:
    if a not in PList:
        PList.append(a)
    else:
        PList.remove(a)

print(len(PList))

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 19 10:03:26 2017

@author: kotania
"""
N = int(input())
AList = [0]*N

for n in range(0,N):
    AList[n] = int(input())
  
PList = []

for a in AList:
    if a not in PList:
        PList.append(a)
    elif a in PList:
        PList.remove(a)

print(len(PList))

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
a=[0]*N
s=set()
for i in range(N):
	a[i] = int(input())
	s.add(a[i])
res=0
for j in s:
	res += (1 if not a.count(j) % 2 == 0 else 0)

print(res)

Submission status: Time Limit Exceeded

Solution code:
N = int(raw_input())
lis = []
for i in xrange(N):
	num = int(raw_input())
	for j in xrange(len(lis)):
		if lis[j] == num:
			lis.pop(j)
			break
		elif lis[j] > num:
			lis.insert(j,num)
			break
	else:
		lis.append(num)
print len(lis)

Submission status: Time Limit Exceeded

Solution code:
N = int(raw_input())
lis = []
for i in xrange(N):
	num = int(raw_input())
	if not lis:
		lis.append(num)
	else:
		for j in xrange(len(lis)):
			if lis[j] == num:
				lis.pop(j)
				break
			elif lis[j] > num:
				lis.insert(j,num)
				break
		else:
			lis.append(num)
print len(lis)

Submission status: Time Limit Exceeded

Solution code:
N = int(raw_input())
lis = []
for i in xrange(N):
	num = int(raw_input())
	try:
		lis.remove(num)
	except ValueError:
		lis.append(num)
print len(lis)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(raw_input())
lis = []
count = 0
for i in xrange(N):
	num = int(raw_input())
	if num in lis:
		lis.remove(num)
		count -= 1
	else:
		lis.append(num)
		count += 1
print count

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(raw_input())
lis = []
for i in xrange(N):
	num = int(raw_input())
	if num in lis:
		lis.remove(num)
	else:
		lis.append(num)
print len(lis)

Submission status: Time Limit Exceeded

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

for i in range(N):
    value = str(input())
    if value in K:
        K.remove(value)
    else:
        K.append(value)

print(len(K))

Submission status: Time Limit Exceeded

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

# 紙に書かれた数字
K = []

for i in M:
    if i in K:
        K.remove(i)
    else:
        K.append(i)

print(len(K))

Submission status: Time Limit Exceeded

Solution code:
import bisect
from sys import stdin

def AI(): return list(map(int, stdin))



def main():
	n = int(input())
	A = AI()

	set_A = set(A)
	ans = 0

	for i in set_A:
		c = A.count(i)
		if  c%2 != 0:
			ans += 1
	print(ans)

	
if __name__ == "__main__": main()

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
arr = [int(input().rstrip()) for i in range(N)]
num = 0 
for i in range(N):
    c = 0
    for j in range(1,N):
        if arr[i] == arr[(i + j) % N]:
            c+=1
    num += (c+1)%2
print(num)

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)
    elif not Ai in A:
        A.append(Ai)

print(len(A))

Submission status: Time Limit Exceeded

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

for i in a: 
    if i not in b:
        b.append(i)

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

print(count)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

print (len(lst))

Submission status: Time Limit Exceeded

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

print(res)

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
n=[]
k=0
m=[10000]
ans=0
mx=0

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=[]
k=0
m=[10000]
ans=0
mx=0

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

for k in range(len(n)):
        ans+=1

print(ans)

Submission status: Time Limit Exceeded

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

a_list = [0 for x in range(1000000001)]

ans = 0

for i in range(N):
    a = input()
    a = int(a)
    a_list[a] = (a_list[a] + 1) % 2
    if a_list[a]:
        ans += 1
    else:
        ans -= 1

print(ans)

Submission status: Time Limit Exceeded

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

a_list = [0 for x in range(1000000000)]

for i in range(N):
    a = input()
    a = int(a)
    a_list[a] = (a_list[a] + 1) % 2

print(a_list.count(1))

Submission status: Time Limit Exceeded

Solution code:
l = []

N = int(input())

for _ 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 = raw_input()
list = []
for i in range(int(N)):
	x = raw_input()
	if x not in list:
		list.append(x)
	else:
		list.remove(x)
print len(list)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
ans = []
for i in range(int(input())):
    n = input()
    try:
        index = ans.index(n)
        ans.pop(index)
    except:
        ans.append(n)
print(len(ans))

Submission status: Time Limit Exceeded

Solution code:
ans = []
for i in range(int(input())):
    n = input()
    try:
        index = ans.index(n)
        ans.pop(index)
    except ValueError:
        ans.append(n)
print(len(ans))

Submission status: Time Limit Exceeded

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

for _ 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())
data = []
for i in range(N):
    num = int(input())
    if num in data:
        data.remove(num)
    else:
        data.append(num)
print(len(data))

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8
# Here your code !

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

print(len(a))

Submission status: Time Limit Exceeded

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

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

print(len(a))

Submission status: Time Limit Exceeded

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

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

a.sort()
result = 0
for i in range(N):
	num = a[i]
	cnt = a.count(num)
	if(cnt % 2 == 1):
		result += 1
	i += cnt

print(result)

Submission status: Time Limit Exceeded

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)

print(len(a))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

A = []

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

print(len(A))

Submission status: Time Limit Exceeded

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

list2 = []
for i in range(N):
    if (list1[i] in list2) == True:
        list2.remove(list1[i])
    else:
        list2.append(list1[i])

print(len(list2))