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())
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())
nums = [input() for _ in range(N)]

paper = []
for num in nums:
    if num not in paper:
        paper.append(num)
    else:
        paper.remove(num)

print(len(paper))

Submission status: Time Limit Exceeded

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

i = 0
n = N
while i < n:
    num = nums[i]
    cnt = nums.count(num)
    if cnt == 1:
        i += 1
    elif cnt % 2 == 0:
        for _ in range(cnt):
            nums.remove(num)
        i += 1
        n = len(nums)
    else:
        for _ in range(cnt-1):
            nums.remove(num)
        i += 1
        n = len(nums)

print(n)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
ans = 0
A_list = [int(input()) for i in range(N)]
A_set = set(A_list)
for i in A_set:
    if A_list.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())
# print(a)

s = set(a)
ans = 0
for i in s:
    if a.count(i) % 2 == 0:
        pass
    else:
        ans += 1

print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for a in A:
    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 = [] 
numbers = []
for _ in range(N):
    A.append(int(input()))

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

print(len(numbers))

Submission status: Time Limit Exceeded

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

print(len(numbers))

Submission status: Time Limit Exceeded

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

    else:
        ans.remove(new)


print(len(ans))

Submission status: Time Limit Exceeded

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

ans =[]
for i in range(len(A)):
    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:
L = [int(input()) for _ in range(int(input()))]
r = 0
for s in set(L):
    if L.count(s) % 2 == 1:
        r+=1
print(r)

Submission status: Time Limit Exceeded

Solution code:
L = [int(input()) for _ in range(int(input()))]
r = 0
for s in set(L):
    C = L.count(s)
    if C == 1:
        r+=1
    else:
        if C % 2 != 0:
            r+=1
print(r)

Submission status: Time Limit Exceeded

Solution code:
L = [int(input()) for _ in range(int(input()))]
r = 0
for s in set(L):
    C = L.count(s)
    if C == 1:
        r+=1
    else:
        if L.count(s) % 2 != 0:
            r+=1
print(r)

Submission status: Time Limit Exceeded

Solution code:
L = []
for _ in range(int(input())):
    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())
s=set()
for i in range(N):
    s=s^{input()}
print(len(s))

Submission status: Time Limit Exceeded

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

c = [a.count(x) for x in set(a)]
print(len([x for x in c if x % 2 == 1]))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

B=[]
for i in A:
    if i in B:
        B.remove(i)
    else:
        B.append(i)
print(len(B))

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
li = [0] * 100000000

for n in range(N):
  li[int(input())] += 1

ans = 0

for i in li:
  if i % 2 == 1:
    ans += 1

print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(N):
    A.append(int(input()))

paper = []

for a in A:
    if paper.count(a) == 0:
        paper.append(a)
    else:
        paper.pop(paper.index(a))

print(len(paper))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

for i 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:
N = int(input())
ans_list = []

for i 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:
N = int(input())
ans_list = []

for i in range(N):
    A = int(input())
    if A in ans_list:
        ans_list.pop(ans_list.index(A))
    else:
        ans_list.append(A)

print(len(ans_list))

Submission status: Time Limit Exceeded

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

for i in range(N):
    A_list.append(int(input()))

ans_list = []
for i in range(N):
    if A_list[i] in ans_list:
        ans_list.pop(ans_list.index(A_list[i]))
    else:
        ans_list.append(A_list[i])

print(len(ans_list))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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:
N = int(input())
A = []
count=0
for i in range(N):
    a=int(input())
    if a not in A:
        A.append(a)
        count += 1
    else:
        A.remove(a)
        count-=1
print(count)

Submission status: Time Limit Exceeded

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

for num in nums:
    try:
        idx = ans.index(num)
    except ValueError:
        idx = -1
        
    if idx == -1:
        ans.append(num)
        count += 1
    else:
        ans[idx] = 0
        count -= 1

print(count)

Submission status: Time Limit Exceeded

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

for num in nums:
    if ans.count(num) == 0:
        ans.append(num)
        count += 1
    else:
        ans.remove(num)
        count -= 1

print(count)

Submission status: Time Limit Exceeded

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

for num in nums:
    if ans.count(num) == 0:
        ans.append(num)
    else:
        ans.remove(num)

print(len(ans))

Submission status: Time Limit Exceeded

Solution code:
import sys
n = int(input())
a = [int(i) for i in sys.stdin]
a.sort()
b = list(set(a))
count=0
for i in range(len(b)):
  if a.count(b[i])%2!=0:
    count+=1
print(count)

Submission status: Time Limit Exceeded

Solution code:
import sys
n = int(input())
a = [int(i) for i in sys.stdin]
a.sort()
b = list(set(a))
count=0
for i in range(len(b)):
  if a.count(b[i])%2!=0:
    count+=1
print(count)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
A=[int(input()) for i in range(n)]
B=list(set(A))
m=len(B)
counter=0
for i in range(m):
    if A.count(B[i])%2==1:
        counter+=1
print(counter)

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())
al = []
for _ in range(n):
    a = int(input())
    if a in al:
        al.remove(a)
    else:
        al.append(a)
    
print(len(al))

Submission status: Time Limit Exceeded

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

n = int(input())

l = [int(input()) for _ in range(n)]

k = []

for i in range(n):
	if k.count(l[i])==0:
		k.append(l[i])
	elif k.count(l[i])==1:
		k.remove(l[i])

print(len(k))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
l = [int(input()) for _ in range(n)]
ans = [x for x in set(l) if l.count(x) % 2 == 1]
print(len(ans))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
from collections import Counter
def ABC073C_WriteAndErase():
    N = int(input().strip())
    
    Ai = Counter()
    for i in range(N):
        num = int(input())

        if num in Ai.keys():
            del Ai[num]
        else:
            Ai[num] = 1

    print(len(Ai))
    

def main():
    ABC073C_WriteAndErase()

if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
def ABC073C_WriteAndErase():
    N = int(input().strip())
    
    Ai = []
    for i in range(N):
        num = int(input())

        if num in Ai:
            Ai.remove(num)
        else:
            Ai.append(num)

    print(len(Ai))
    

def main():
    ABC073C_WriteAndErase()

if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
s = 0
lst = []
for _ in range(n):
  tmp = int(input())
  if tmp in lst:
    s -= 1
    lst.remove(tmp)
  else:
    s += 1
    lst.append(tmp)
print(s)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
s = 0
for _ in range(n):
  s ^= 1 << int(input())
c = 0
while s:
  flag = s - 1
  s &= flag
  c += 1
print(c)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

k = []

for i in range(n):
	if k.count(l[i])==0:
		k.append(l[i])
	elif k.count(l[i])==1:
		k.remove(l[i])

print(len(k))

Submission status: Time Limit Exceeded

Solution code:

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

    sheet.sort()
    count=0
    for i in range(len(sheet)):
        number=sheet.count(sheet[i])
        if number%2==1:
            count+=1

    print(count)

Submission status: Time Limit Exceeded

Solution code:

if __name__ == '__main__':
    N=int(input())
    sheet=[]
    for i in range(N):
        temp=int(input())
        if temp not in sheet:
            sheet.append(temp)
        else:
            sheet.remove(temp)

    print(len(sheet))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import collections
N = int(input())
A = [int(input()) for i in range(N)]
c = collections.Counter(A)
ans = 0
for i in range(len(c)):
    ans += c.most_common()[i][1] % 2
print(ans)

Submission status: Time Limit Exceeded

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

for i in range(n):
    temp = int(input())
    if temp not in a:
        a.append(temp)
    else:
        a.pop(a.index(temp))

print(len(a))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

print(len(P))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = []
for i in range(N):
    a = int(input())
    # print(A, a)
    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())
A = []
for i in range(N):
    c = int(input())
    if c not in A:
        A.append(c)
    else:
        A.remove(c)

print(len(A))

Submission status: Time Limit Exceeded

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

a = list(set(A))
for c in a:
    if A.count(c) % 2 == 1:
        cnt += 1
print(cnt)

Submission status: Time Limit Exceeded

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

A.sort()
a = list(set(A))
for c in a:
    if A.count(c) % 2 == 1:
        cnt += 1
print(cnt)

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8
N = int(input())
d = {}
for i in range(N):
    a = int(input())
    if a not in d.keys():
        d[a] = 1
    else:
        d[a] += 1
ans = 0
for a in d.items():
    ans += a[1] % 2
print(ans)

Submission status: Time Limit Exceeded

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

A.sort()
for c in A:
    if A.count(c) % 2 == 1:
        cnt += 1
    
print(cnt)

Submission status: Time Limit Exceeded

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

ans = 0
for x in b:
    if a.count(x) % 2 == 1:
       ans += 1

print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

cnt = 0
for x in range(len(Lst)):
  if Lst.count(Lst[x]) % 2 != 0:
    cnt += 1
print(cnt)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

dic = {}
for i in range(n):
    m = int(input())
    if m not in dic.keys():
        dic[m] = 0
    dic[m] += 1

dic_list = list(dic.values())
ans = 0
for i in range(len(dic_list)):
    if dic_list[i] % 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:
    del a[a.index(b)]
  else:
    a.append(b)
print(len(a))

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a=[]
for i in range(n):
  a.append(int(input()))
f=[0 for i in range(max(a))]
for x in a:
  f[x-1]+=1
  f[x-1]%=2
print(sum(f))

Submission status: Time Limit Exceeded

Solution code:
from bisect import bisect_left as bl
n = int(input())
L = [int(input())]

for i in range(n-1):
  num = int(input())
  index = bl(L, num)
  if index == len(L) or len(L) == 0:
    L.insert(index, num)
  elif L[index] == num:
    L.pop(index)
  else:
    L.insert(index, num)
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.remove(a)
    else:
        l.append(a)
print(len(l))

Submission status: Time Limit Exceeded

Solution code:
#feel like this is to easy

def read_input():
  n = int(input())
  a = []
  for i in range(n):
    a.append(int(input()))
  return n,a

def TLE():
  n,a = read_input()
  sheet = []
  for item in a:
    if item not in sheet:
      sheet.append(item)
    else:
      sheet.pop(sheet.index(item))
  print(len(sheet))
  
def main():
  n,a = read_input()
  items = list(set(a))
  count = 0
  for item in items:
    if a.count(item)%2 != 0:
      count += 1
  print(count)

if __name__ == '__main__':
  main()

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

print(len(num_list))

Submission status: Time Limit Exceeded

Solution code:
#feel like this is to easy

def read_input():
  n = int(input())
  a = []
  for i in range(n):
    a.append(int(input()))
  return n,a

def main():
  n,a = read_input()
  sheet = []
  for item in a:
    if item not in sheet:
      sheet.append(item)
    else:
      sheet.pop(sheet.index(item))
  print(len(sheet))
  
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())
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:
import sys
sys.setrecursionlimit(10 ** 7)
#f = open('input.txt','r')
input = sys.stdin.readline
#sys.stdin = f

N = int(input())
A = [int(input()) for _ in range(N)]
cntA = [0 for _ in range(max(A)+1)]
for a in A:
    cntA[a] += 1
    cntA[a] %= 2
print(sum(cntA))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = [ int(input()) for _ in range(N)]
cntA = [0 for _ in range(max(A)+1)]
for a in A:
    cntA[a] += 1
    cntA[a] %= 2
print(sum(cntA))

Submission status: Time Limit Exceeded

Solution code:
from sys import stdin

n, *a = (int(x) for x in stdin.read().split())

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

print(count)

Submission status: Time Limit Exceeded

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

A.sort()

sa = set(A)
ans = 0

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

print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

print(sum(list_.count(key) % 2 for key in set(list_)))

Submission status: Time Limit Exceeded

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

print(sum(list_.count(key) % 2 for key in set(list_)))

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
A=[int(input()) for i in range(N)]
S=list(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=list(set(A))
C=[0]*len(S)

for i in range(N):
    C[S.index(A[i])]+=1

ans=0
for i in C:
    if i%2==1:
        ans+=1

print(ans)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = list(int(input()) for _ in range(n))
a.sort()

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
c=[]
for _ in range(n):
    a=int(input())
    c.append(a)
cb=set(c)
ca=[]
for item in cb:
    if c.count(item) % 2 == 1:
        ca.append(item)
print(len(ca))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
a=int(input())
lis=[]
for i in range(a):
  cou=0
  v=int(input())
  if lis==[]:
    lis+=[v]
  else:
    for i in range(len(lis)):
      if lis[i]==v:
        del lis[i]
        cou=1
        break
    if cou!=1:
      lis+=[v]
      
print(len(lis))

Submission status: Time Limit Exceeded

Solution code:
# ABC073 C - Write and Erase
# 2019/10/28

def main():
    N, *A = map(int, open(0).read().split())
#     print(N, A)
    set_A = list(set(A))
#     list_count = [A.count(i)%2 for i in set_A]
#     print(list_count)
#     print(sum(list_count))
    
    list_count = 0
    for i in set_A:
        list_count += A.count(i)%2
    print(list_count)
    
    
if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
# ABC073 C - Write and Erase
# 2019/10/28

def main():
    N, *A = map(int, open(0).read().split())
#     print(N, A)
    set_A = list(set(A))
    list_count = [A.count(i)%2 for i in set_A]
#     print(list_count)
    print(sum(list_count))
    
    
if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a=[input() for i in range(n)]
cnt=0
for i in set(a):
  _cnt = a.count(i)
  if _cnt>=2:
    cnt+=int(_cnt/2)
print(n-cnt*2)

Submission status: Time Limit Exceeded

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

for i 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:
count = 0
N = int(input())
string = list(map(int, [input() for i in range(N)]))
for i in set(string):
    if string.count(i) % 2 != 0:
        count += 1
print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import bisect

n = int(input())

l = []
for _ in range(n):
    a = int(input())
    i = bisect.bisect_left(l, a)
    if i != len(l) and l[i] == a:
        l.pop(i)
    else:
        l.insert(i, a)

res = len(l)
print(res)

Submission status: Time Limit Exceeded

Solution code:
def index(a, x):
    'Locate the leftmost value exactly equal to x'
    i = bisect.bisect_left(a, x)
    if i != len(a) and a[i] == x:
        return i
    return -1

n = int(input())
import bisect
dat = []
for i in range(n):
    x = int(input())
    a =  index(dat, x)
    if a == -1:
        bisect.insort_left(dat, x)
    else:
        del dat[a]
print(len(dat))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
A=[]
ans=0
for i in range(n):
  a=int(input())
  if a not in A:
    ans+=1
    A.append(a)
  else:
    ans-=1
    A.remove(a)
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:
        A.remove(a)
    else:
        A.append(a)

print(len(A))

Submission status: Time Limit Exceeded

Solution code:
#C-write and erase
n=int(input())
a=[int(input()) for i in range(n)]
a.sort()

b=0
c=0
while b!=n:
    d=a.count(a[b]) 
    if d%2==0:
        c+=0
    else:
        c+=1
    b+=d
    
print(c)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

print(len(A))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys
input=sys.stdin.readline
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())
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:
A=[int(input()) for _ in range(int(input()))]
l=sorted(set(A))
cnt=0
for i in range(len(l)):
    if A.count(l[i])%2: cnt+=1
print(cnt)

Submission status: Time Limit Exceeded

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

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

print(len(arr))

Submission status: Time Limit Exceeded

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

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

print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys
input = sys.stdin.readline
n = int(input())
a = [int(input()) for _ in range(n)]
a.sort()
aSum = 0
cnt = 0
for i in range(n):
    aCnt = a.count(a[cnt])
    if aCnt % 2 == 1:
        aSum += 1
    cnt += aCnt
    if cnt >= n:
        break


print(aSum)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

data = {}

for a in As:
  if a in data.keys():
    data[a] += 1
    data[a] = data[a]%2
  else:
    data[a] = 1

ans = sum(list(data.values()))

print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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