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

Submission status: Time Limit Exceeded

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

print(len(B))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

ans_list = []
ans_cnt = 0
for i in range(N):
    A = int(input())
    if A in ans_list:
        ans_list.remove(A)
        ans_cnt -= 1
    else:
        ans_list.append(A)
        ans_cnt += 1
        
print(ans_cnt)

Submission status: Time Limit Exceeded

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

print(ans)

Submission status: Time Limit Exceeded

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

ans_list = []
ans_cnt = 0
for i in range(N):
    if A[i] in ans_list:
        ans_list.remove(A[i])
        ans_cnt -= 1
    else:
        ans_list.append(A[i])
        ans_cnt += 1
        
print(ans_cnt)

Submission status: Time Limit Exceeded

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

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

print(len(lisa))

Submission status: Time Limit Exceeded

Solution code:

def read_input():
    n = int(input())
    alist = []

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

    return n, alist


def submit():
    n, alist = read_input()

    paper = {}
    for a in alist:
        if a not in paper.keys():
            paper[a] = 1
        else:
            paper[a] *= -1

    paper_write = [t for t in paper.items() if t[1] == 1]
    print(len(paper_write))

if __name__ == '__main__':
    submit()

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
list = []
cnt = 0
for i in range(N):
  A = int(input())
  list.append(A)
  if list.count(A) > 1:
    cnt -= 1
  else:
    cnt += 1
print(cnt)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
list = []
cnt = 0
for i in range(N):
  A = int(input())
  list.append(A)
  if list.count(A) > 1:
    cnt -= 1
  elif list.count(A) == 1:
    cnt += 1
print(cnt)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
lst = [A.count(a)%2 for a in set(A)]
print(sum(lst))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = [0 for _ in range(N)]
for i in range(N):
    A[i] = int(input())
lst = [A.count(a)%2 for a in set(A)]
print(sum(lst))

Submission status: Time Limit Exceeded

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

print(len(memo))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(n):
    s = {input()} ^ s

print(len(s))

Submission status: Time Limit Exceeded

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

for i in range(n):
    s = s ^ {input()}

print(len(s))

Submission status: Time Limit Exceeded

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

import bisect

def main():
    n = int(input())
    s = []

    for i in range(n):
        a = int(input())
        i = bisect.bisect_left(s, a)
        if len(s) > i and s[i] == a:
            s.remove(a)
        else:
            s.insert(i, a)


    print(len(s))


main()

Submission status: Time Limit Exceeded

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


def main():
    n = int(input())
    s = set()

    for i in range(n):
        s = s ^ {input()}

    print(len(s))


main()

Submission status: Time Limit Exceeded

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


def main():
    n = int(input())
    s = set()

    for i in range(n):
        s = s ^ {int(input())}

    print(len(s))


main()

Submission status: Time Limit Exceeded

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


def main():
    n = int(input())
    s = set()

    for i in range(n):

        a = {int(input())}
        s = s ^ a

    print(len(s))


main()

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

s = set()

for i in range(n):

    a = {int(input())}
    s = s ^ a

print(len(s))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
S=set()
for i in range(n):
  a=int(input())
  S=S^set([a])
print(len(S))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
from sys import stdin
n = int(stdin.readline())
memo = []
for i in range(n):
    m = int(stdin.readline())
    if m in memo: del memo[memo.index(m)]
    else: memo.append(m)
print(len(memo))

Submission status: Time Limit Exceeded

Solution code:
from sys import stdin
n = int(stdin.readline())
memo = []
for i in range(n):
    m = int(stdin.readline())
    if m in memo: memo.pop(memo.index(m))
    else: memo.append(m)
print(len(memo))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
nums = [int(input()) for _ in range(n)]
memo = set(nums)
ans = 0
for m in memo:
    if nums.count(m)%2: ans += 1
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

    Ai_to_num = {}
    for _ in range(N):
        Ai = input()
        if Ai in Ai_to_num.keys():
            Ai_to_num[Ai] += 1
        else:
            Ai_to_num[Ai] = 1
    ct = 0
    for num_i in Ai_to_num.values():
        if num_i % 2:
            ct += 1
    
    print(ct)

main()

Submission status: Time Limit Exceeded

Solution code:
import sys
import collections
ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
nm = lambda: map(int, sys.stdin.readline().split())
nl = lambda: list(nm())

n = ni()

a = []
for i in range(n):
    tmp = ni()
    if tmp in a:
        a.pop(a.index(tmp))
    else:
        a.append(tmp)
print(len(a))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a=[int(input()) for i in range(n)]
cout=[]
sa=list(set(a))
for i in range(len(sa)):
    if a.count(sa[i])%2==1:
        cout.append(1)
print(len(cout))

Submission status: Time Limit Exceeded

Solution code:
def main():
  n=int(input())
  ans=0
  l=[10**9+1]
  import bisect
  for i in range(n):
    a=int(input())
    num=bisect.bisect_left(l,a)
    if l[num]==a:
      ans-=1
      del l[num]
    else:
      l.append(a)
      l.sort()
      ans+=1
  print(ans)
if __name__=='__main__':
  main()

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
ans=0
l=[10**9+1]
import bisect
for i in range(n):
  a=int(input())
  num=bisect.bisect_left(l,a)
  if l[num]==a:
    ans-=1
    del l[num]
  else:
    l.append(a)
    l.sort()
    ans+=1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
ans=0
l=[10**9+1]
import bisect
for i in range(n):
  a=int(input())
  num=bisect.bisect_left(l,a)
  if l[num]==a:
    ans-=1
    l.remove(a)
  else:
    l.append(a)
    l.sort()
    ans+=1
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(N):
  if A[i] not in array:
    array.append(A[i])
    if A.count(A[i]) % 2 == 1:
      ans += 1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
import collections

n=int(input())
aa=[input() for aa in range(n)]

myset=list(set(aa))
#print(myset)

mycount=0
for bb in myset:
    tmp=aa.count(bb)
    if tmp%2==1:
        mycount+=1

print(mycount)

Submission status: Time Limit Exceeded

Solution code:
import collections

n=int(input())
aa=[input() for aa in range(n)]

myset=list(set(aa))
#print(myset)

mycount=0
for bb in myset:
    tmp=aa.count(bb)
    if tmp%2==1:
        mycount+=1

print(mycount)

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
history=[]
for i in range(N):
  history.append(int(input()))
history=sorted(history)
print(sum([history.count(n)%2 for n in list(set(history))]))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

print(cnt)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
l=[]
for i in range(1,n+1):
	k=input()
	if k in l:
		l.remove(k)
	else:
		l.append(k)
print(len(l))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
num = [int(input()) for _ in range(n)]
ans = 0

for i in set(num):
    if num.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)]
ans = 0
for i in A:
    if A.count(i) % 2 != 0:
        ans += 1
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import bisect

n = int(input())

a = []
a.append(0)

for i in range(n):
    b = int(input())
    k = bisect.bisect(a,b)
    if b != a[k-1]:
        a.insert(k,b)
    else:
        a.pop(k-1)
print(len(a)-1)

Submission status: Time Limit Exceeded

Solution code:
import bisect

n = int(input())

a = []
a.append(0)

for i in range(n):
    b = int(input())
    k = bisect.bisect(a,b)
    if b != a[k-1]:
        a.insert(k,b)
    else:
        a.pop(k-1)
print(len(a)-1)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

a = [0 for i in range(10**9)]

for i in range(n):
    k = int(input())
    a[k-1] += 1
co = 0
for i in range(10**9):
    if a[i] % 2 == 1:
        co += 1
print(co)

Submission status: Time Limit Exceeded

Solution code:
num = int(input().strip())
nums = []
while num > 0:
    tmp = int(input().strip())
    if tmp in nums:
        nums.remove(tmp)
    else:
        nums.append(tmp)
    num -= 1
print(len(nums))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
setA = set(A)
B = len([A.count(i) for i in setA if A.count(i) % 2 != 0])
print(B)

Submission status: Time Limit Exceeded

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

p = []

for i in A:
    if i not in p:
        p.append(i)
    else:
        p.remove(i)

print(len(p))

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
A=[]
for _ 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:
n = int(input())
l = []
for i in range(n):
    tmp = int(input())
    l.remove(tmp) if tmp in l else l.append(tmp)
print(len(l))

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
m=[]
ans=0
for _ in range(N):
    a=int(input())
    m+=[a]
    if m.count(a) % 2 == 1:
        ans+=1
    else:
        ans-=1

print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
ans = 0
a = []
for i in range(n):
    a.append(int(input()))
t = list(set(a))
for i in t:
    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):
    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:
n=int(input())

ret=[]
for idx in range(n):
    val=int(input())
    if val in ret:
        ret=list(set(ret)-set([val]))
    else:
        ret.append(val)
print(len(ret))

Submission status: Time Limit Exceeded

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

for _ 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())
a = []

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

print(len(a))

Submission status: Time Limit Exceeded

Solution code:
int_n = int(input())

ar_int_a = []
for i in range(int_n):
    ar_int_a.append(int(input()))

numbers = set(ar_int_a)

# written = [i for i in numbers if ar_int_a.count(i) % 2 == 1]

written = 0
for i in numbers:
    if ar_int_a.count(i) % 2 == 1:
        written += 1

# print(len(written))
print(written)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
    
count = 0
for i in range(1,10**5+1):
    if a.count(i) % 2 != 0:
        count += 1
print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
l=[m for m in a if a.count(m) % 2 != 0]
print(len(l))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

print(len(l))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = input()
d = {}
for _ in range(N):
    a = input()
    if str(a) not in d.keys():
        d[str(a)] = 1
    else:
        d[str(a)] ^= 1

print sum(d.values())

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = input()

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

print len(data)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
int_n = int(input())

ar_int_a = []
for i in range(int_n):
    ar_int_a.append(int(input()))

numbers = set(ar_int_a)

written = [i for i in numbers if ar_int_a.count(i) % 2 == 1]

print(len(written))

Submission status: Time Limit Exceeded

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

print(len(p))

Submission status: Time Limit Exceeded

Solution code:
from collections import deque

n = int(input())
D = deque()
for i in range(n):
    x = int(input())
    if x in D:
        D.remove(x)
    else:
        D.append(x)
print(len(D))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
def ai():return input()#s
def a():return int(input())#a,n or k
def ma():return map(int, input().split())#a,b,c,d or n,k
def ms():return map(str, input().split())#,a,b,c,d
def lma():return list(map(int, input().split()))#x or y
def lms():return list(map(str, input().split()))#x or y
k= []
l = []
f = 0
def say(i):return print("Yes" if i == 0 else "No")
def Say(i):return print("YES" if i == 0 else "NO")

a = int(input())
c =[0]*a
for i in range(a):
    t = int(input())
    k.append(t)
p = set(k)
for i in p:
    f+=k.count(i)%2
print(f)

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
s=[]
p=[]
for i in range(n):
    a=input()
    if not a in s:
        s.append(a)
        p.append(1)
    else:
        p[s.index(a)]=(p[s.index(a)]+1)%2
print(sum(p))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
A = [int(input()) for _ in range(n)]
print(len(list(filter(lambda x: A.count(x)%2==1, set(A)))))

Submission status: Time Limit Exceeded

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

memo = []
for a in A:
  if(a not in memo):
    memo.append(a)
  else:
    memo.remove(a)
print(len(memo))

Submission status: Time Limit Exceeded

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

a = list(set(A))
d = {}
for aa in a:
  if(A.count(aa)%2 == 1):
    d[aa] = A.count(aa)
print(len(d))

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

Submission status: Time Limit Exceeded

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

setal=set(al)
ans=0
for seta in setal:
    if al.count(seta)%2 == 1:
        ans+=1

print(ans)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import collections
n=int(input())
a=[int(input()) for i in range(n)]
c=collections.Counter(a)
l=[]
for j in range(len(set(a))):
  l.append(c.most_common()[j][1])
ct=0
for k in range(len(l)):
  if l[k]%2==1:ct+=1
print(ct)

Submission status: Time Limit Exceeded

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

L = set(L)
print(len(L))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
bit = 0
for i in range(N):
    a = int(input())
    bit = bit ^ 2 ** a

bit = str(bin(bit))

count = 0
for i in bit:
    if i == "1":
        count += 1

print(count)

Submission status: Time Limit Exceeded

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

while A:
    x = A[0]
    if A.count(x) % 2 == 1:
        counter += 1
    A = [i for i in A if i != x]

print(counter)

Submission status: Time Limit Exceeded

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

for i in range(N):
    if not A[i] in cemetery:
        if A.count(A[i]) % 2 == 1:
            counter += 1
        cemetery.append(A[i])

print(counter)

Submission status: Time Limit Exceeded

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

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

print(len(array))

Submission status: Time Limit Exceeded

Solution code:
from collections import deque

n = int(input())
nums = deque([])

for i in range(n):
  a = int(input())
  try:
    nums.remove(a)
  except ValueError:
    nums.append(a)

print(len(nums))

Submission status: Time Limit Exceeded

Solution code:
a = int(input())
ar = []
for i in range(a):
    b = int(input())
    ar.append(b)
br = set(ar)
cr = sorted(ar)
count = 0
for b in br:
    if cr.count(b) % 2 == 1:
        count += 1
print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
Sister=[int(input()) for i in range(N)]
set_Sister=set(Sister)
Paper=[]
for i in set_Sister:
  if Sister.count(i)%2==1:
    Paper.append(i)
print(len(Paper))

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
Sister=[int(input()) for i in range(N)]
Paper=[i for i in Sister if Sister.count(i)%2==1]
print(len(Paper))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
L = [int(input()) for i in range(N)]
P = list(set(L))
ans = 0
for i in range(len(P)) :
    p = L.count(P[i])
    if p % 2 != 0 :
        ans += 1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
counter = 0
while A:
    num = A.count(A[0])
    if num % 2 == 1:
        counter += 1
    del A[:num]

print(counter)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
counter = 0
while A:
    if A.count(A[0]) % 2 == 1:
        counter += 1
    del A[:A.count(A[0])]

print(counter)

Submission status: Time Limit Exceeded

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

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

print(len(array))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

print(len(a))

Submission status: Time Limit Exceeded

Solution code:
def ind(l, x):
    if x in l:
        return l.index(x)
    else:
        return False

a=[]
N = int(input())
for i in range(N):
    nu=int(input().strip())
    if nu in a:
        ind=a.index(nu)
        a=a[:ind]+a[ind+1:]
    else:
        a.append(nu)
#    print(a)
    


print(len(a))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N=int(raw_input())
A = [0 for i in range(100000000)]

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

print sum(A)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
ans_list = []
for _ in range(N):
    A=int(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:
# -*- coding: utf-8 -*-
N = int(input())
An = []
for _ in range(N):
    An.append(int(input()))

ans_list = []
for A in An:
    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())
paper = []
paper.append(1000000001)

for i in range(N):
    # Aのi番目
    ai = int(input())
    for p in range(len(paper)):
        if paper[p] < ai:
            continue
        elif paper[p] == ai:
            paper.remove(ai)
            break
        else:
            paper.insert(p, ai)
            break

print(len(paper) -1)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

paper = []

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

print(len(paper))

Submission status: Time Limit Exceeded

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

print(len(L))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

print(len(kami))

Submission status: Time Limit Exceeded

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

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

print(len(kami))

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