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())
dic = {}
for i in range(n):
  num = input()
  if num not in dic.keys():
    dic[num] = 1
  elif dic[num] == 0:
    dic[num] = 1
  else:
    dic[num] = 0
print(sum(dic.values()))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

S = set(A)
S2 = set(A)
for s in S:
    if A.count(s)%2 == 0:
        S2.remove(s)
print(len(S2))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = []
for _ in range(N):
    A.append(int(input()))
A.sort()
ans = 0
idx = 0
while idx < N:
    sub = 0
    while idx + sub < N and A[idx] == A[idx + sub]:
        sub = sub + 1
    if sub % 2 == 1:
        ans = ans + 1
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

s = set()

for _ in range(N):

    A = int(input())

    if A in s:
        s = s - {A}
        continue
    
    s.add(A)

print(len(s))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

s = set()

for _ in range(N):

    A = int(input())

    if A in s:
        s = s - {A}
    else:
        s.add(A)

print(len(s))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

s = set()

for _ in range(N):

    A = int(input())

    if A in s:
        s = s - set({A})
    else:
        s.add(A)

print(len(s))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

ans = len(A)
print(ans)

Submission status: Time Limit Exceeded

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

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

print(ans)

Submission status: Time Limit Exceeded

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

ans = 0
for i in set(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):
  A.append(int(input()))

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

print(ans)

Submission status: Time Limit Exceeded

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

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

print(ans)

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

Submission status: Time Limit Exceeded

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

for i in check:
    if a.count(i) % 2 == 0:
        ans -= 1

print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

print(len(s))

Submission status: Time Limit Exceeded

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

b = [x for x in set(a) if a.count(x) % 2 != 0]
print(len(b))

Submission status: Time Limit Exceeded

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

cnt = 0
for x in a:
    if a.count(x) % 2 != 0:
        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 = [int(input()) for _ in range(n)]

arr = []
for x in a:
    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=[input() for i in range(n)]
ans=0
while A:
  a=A[0]
  if A.count(a)%2:
    ans+=1
  while a in A:
    A.remove(a)
print(ans)

Submission status: Time Limit Exceeded

Solution code:
nums = int(input())
ary = list(range(nums))

for i in range(nums):
    ary[i] = int(input())
x = 0
count = 0
ary.sort()

while x < nums:
    check = ary.count(ary[x])
    if check % 2 == 1:
        count += 1
        x += check-1
    elif check > 0:
        x += check-1
    x += 1
print(count)

Submission status: Time Limit Exceeded

Solution code:
n =int(input())
A = {0}
for i in range(n):
  a = {int(input())}
  if i==0:
    A = A|a
  else:
    A = A^a
print(len(A)-1)

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
As=[int(input()) for _ in range(n)]
As.sort()
As_uniq=list(set(As))

ans=0
for uniq in As_uniq:
  if As.count(uniq)%2==1:
    ans+=1
print(ans)

Submission status: Time Limit Exceeded

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

As_uniq=list(set(As))
ans=0
for uniq in As_uniq:
  if As.count(uniq)%2!=0:
    ans+=1
print(ans)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
A=[int(input()) for _ in range(N)]
A=list(map(A.count, set(A)))
ans=0
for a in A:
    if a%2:ans+=1
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
l=[0]*n
for i in range(n):
  l[i]=int(input())
l.sort()
ans=0
c=0
while len(l)>0:
  c=l.count(l[0])
  if c%2==1:
    ans+=1
  del l[0:c]
print(ans)

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
l=[0]*n
for i in range(n):
  l[i]=int(input())
l.sort()
ans=0
while len(l)>0:
  if l.count(l[0])%2==1:
    ans+=1
  del l[0:l.count(l[0])]
print(ans)

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
l=[0]*n
for i in range(n):
  l[i]=int(input())
l.sort()
ans=0
while len(l)>0:
  if l[0:l.count(l[0])].count(l[0])%2==1:
    ans+=1
  del l[0:l.count(l[0])]
print(ans)

Submission status: Time Limit Exceeded

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

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

seta = set(array)

cnt = 0
for num in seta:
  numcnt = array.count(num)
  if numcnt%2==1:
    cnt+=1
    
print(cnt)

Submission status: Time Limit Exceeded

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

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

print(len(p))

Submission status: Time Limit Exceeded

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

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

S = []

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

print(len(S))

Submission status: Time Limit Exceeded

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

count = 0
 
for i in a:
    ii = a.count(i)
    if ii%2 ==1:
        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())
lst = []

for i in range(n):
    num = input().split()
    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=[int(input()) for i in range(n)]
s = list(set(a))

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

Submission status: Time Limit Exceeded

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

s = list(set(a))
m=len(s)
cnt=0
for i in range(m):
  if a.count(s[i])%2==1:
    cnt+=1
print(cnt)

Submission status: Time Limit Exceeded

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

s = list(set(a))
b=[0]*len(s)
for i in range(len(s)):
  b[i]=a.count(s[i])

cnt=0
for i in range(len(s)):
  if b[i]%2==1:
    cnt+=1
print(cnt)

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math

# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    N = inputInt()
    ans = []
    for _ in range(N):
        tmp = inputInt()
        if tmp in ans:
            ans.remove(tmp)
        else:
            ans.append(tmp)
            ans.sort()
        
    print(len(ans))
        
            	
if __name__ == "__main__":
	main()

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math

# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    N = inputInt()
    ans = []
    for _ in range(N):
        tmp = inputInt()
        if tmp in ans:
            ans.remove(tmp)
        else:
            ans.append(tmp)
        
    print(len(ans))
        
            	
if __name__ == "__main__":
	main()

Submission status: Time Limit Exceeded

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

print(len(a))

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: UTF-8 -*-
# ABC073_C

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

for i in range(0, N, 1):
    x = input()
    if (x not in list):
        list.append(x)
    else:
        list.remove(x)
print(len(list))

Submission status: Time Limit Exceeded

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

p = []
for a in A:
    if a in set(p):
        p.remove(a)
    else:
        p.append(a)

print(len(p))

Submission status: Time Limit Exceeded

Solution code:
import sys

n = int(sys.stdin.readline())
a_list = [int(x) for x in sys.stdin.readlines()]
a_list_index = list(set(a_list))
count = 0
for i in a_list_index:
    if a_list.count(i) % 2 == 0:
        continue
    else:
        count += 1

print(count)

Submission status: Time Limit Exceeded

Solution code:
import sys

n = int(sys.stdin.readline())
a_list = [int(x) for x in sys.stdin.readlines()]
card = []
for i in a_list:
    try:
        card.remove(i)
    except ValueError:
        card.append(i)
print(len(card))

Submission status: Time Limit Exceeded

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

check = [0] * 100000000

ans = []
for i in range(n):
  if check[a[i]-1] == 0:
    check[a[i]-1] = 1
  else:
    check[a[i]-1] = 0

ans = check.count(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())

ans = []
for i in range(n):
  count = a.count(a[i])
  if count %2 == 1 and a[i] not in ans :
    ans.append(a[i])

print(len(ans))

Submission status: Time Limit Exceeded

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

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

ans = list(set(ans))
print(len(ans))

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

print(len(A))

Submission status: Time Limit Exceeded

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
num = [int(input()) for i in range(N)]
num_set = set(tuple(num))
count = 0
for i in num_set:
    if num.count(i)%2 == 1:
        count += 1
print(count)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
num = tuple(int(input()) for i in range(N))
num_set = set(num)
count = 0
for i in num_set:
    if num.count(i)%2 == 1:
        count += 1
print(count)

Submission status: Time Limit Exceeded

Solution code:
# 操作回数を入力する
N = int(input())
# 言う数字を入力する
list_A = [int(input()) for _ in range(N)]
# 終了後に残っている数字の数を設定する
ans = 0
# 数字の種類のリストを作成する
num_list = list(set(list_A))
# それぞれの数字について、、
for num in num_list:
    # 言われる回数を求める
    count = list_A.count(num)
    # 奇数回言われる場合、ansを増やす
    if count % 2 != 0:
        ans += 1
# 結果を出力する
print(ans)

Submission status: Time Limit Exceeded

Solution code:
# 操作回数を入力する
N = int(input())
# 言う数字を入力する
list_A = [int(input()) for _ in range(N)]
# 終了後に残っている数字の数を設定する
ans = 0
# list_A内の数字Aについて操作を繰り返す
while list_A != []:
    A = list_A[0]
    # Aが言われる回数を求める
    count = list_A.count(A)
    # 奇数回言われる場合、ansを増やす
    if count % 2 != 0:
        ans += 1
    # list_AからAを全て削除する
    for _ in range(count):
        list_A.remove(A)
#結果を返す
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

print(len(l))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
alist = [int(input()) for x in range(N)]
l = []
for num in alist:
        if num in l:
                l.remove(num)
        else:
                l.append(num)

print(len(l))

Submission status: Time Limit Exceeded

Solution code:
from collections import Counter

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

cnt = Counter(A)

ans = 0
for i in range(len(cnt)):
    if cnt.most_common()[i][1] % 2 != 0:
        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 set(a):
    ans += a.count(i)%2
    
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 set(a):
    ans += a.count(i)%2
    
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

l_c = []
count = 0

for i in a:
    ii = a.count(i)
    l_c.append(ii)
    
for i in l_c:
    if i%2 == 1:
        count += 1

print(count)

Submission status: Time Limit Exceeded

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

l.sort(reverse=False)
count_sum = 0   
for j in set(l):
    count = 0
    for  k in  range(l.index(j),len(l)):
        if l[k] == j :
            count += 1
        else :
            break
    count_sum += count%2

print(count_sum)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

count = 0   
for j in set(l):
    if l.count(j) %2 == 1 :
         count += 1

print(count)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

import sys
a = []
for line in sys.stdin:
    a.append(int(line.rstrip("\n")))

check = []    
for i in set(a):
    if a.count(i) %2 == 1 :
         check.append(i)

print(len(check))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

import sys
a = []
for line in sys.stdin:
    a.append(int(line.rstrip("\n")))

check = []    
for i in a:
    if check.count(i) == 0 :
         check.append(i)
    else :
         check.remove(i)

print(len(check))

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a=[]
ans=[]
for i in range(n):
    b=input()
    a+=[b]
    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=[]
ans=[]
for i in range(n):
    b=input()
    a+=[b]
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())
s = []
for i in range(n):
    a = int(input())
    if a in s:
        del s[s.index(a)]
    else:
        s.append(a)

print(len(s))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = [int(input()) for _ in range(n)]
num = []
for i in range(n-1):
    for j in range(i+1, n):
        if a[i] == a[j]:
            num.append(a[i])
print(n - 2 * len(num))

Submission status: Time Limit Exceeded

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

ans = set()


for i in range(n):
    s = input()
    if s in ans:
        ans = ans - {s}
    else:
        ans = ans | {s}

print(len(ans))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

ans = set()


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

print(len(ans))

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

ans = set()
s = []


for i in range(n):
    s = [(input())]
    ans = ans ^ set(s)

print(len(ans))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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)
print(len(L))

Submission status: Time Limit Exceeded

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

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

A=sorted(A)
s=0
cnt=0
for _ in range(N):
    if s>=N:
    	break
    else:
        for i in range(s,N-1):	
            if A[i]==A[i+1]:
                cnt+=1
                s=i+2
                break
print(N-2*cnt)

Submission status: Time Limit Exceeded

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

A=sorted(A)
s=0
cnt=0
while 1:
    if s>=N:
    	break
    else:
        for i in range(s,N-1):	
            if A[i]==A[i+1]:
                cnt+=1
                s=i+2
                break
print(N-2*cnt)

Submission status: Time Limit Exceeded

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

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

print(ans)

Submission status: Time Limit Exceeded

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

set_a = set(a)

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

print(cnt)

Submission status: Time Limit Exceeded

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

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

print(len(s))

Submission status: Time Limit Exceeded

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

n = int(input())
A = [0]*n
A[0] = int(input())
for i in range(1,n):
    a = int(input())
    if a in A:
        A.remove(a)
    else:
        A[i] = a
print(len(set(A))-1)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
# sys.stdin.readline()
import sys
input = sys.stdin.readline

n = int(input())
A = [int(input())]
for i in range(n-1):
    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())
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())
tmp = []

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

print(len(tmp))

Submission status: Time Limit Exceeded

Solution code:
# ABC073C - Write and Erase
import sys
input = sys.stdin.readline

n = int(input())
arr = list(map(int, [input().rstrip() for _ in range(n)]))
st = set(arr)
cnt = 0
for i in st:
    if arr.count(i) % 2 == 1:
        cnt += 1
print(cnt)

Submission status: Time Limit Exceeded

Solution code:
# ABC073C - Write and Erase
import sys
input = sys.stdin.readline

n = int(input())
arr = []
for _ in range(n):
    m = int(input())
    if m in arr:
        arr.remove(m)
    else:
        arr += [m]
print(len(arr))

Submission status: Time Limit Exceeded

Solution code:
# ABC073C - Write and Erase
import sys
input = sys.stdin.readline

n = int(input())
arr = []
for _ in range(n):
    m = int(input())
    if m in arr:
        arr.pop(arr.index(m))
    else:
        arr += [m]
print(len(arr))

Submission status: Time Limit Exceeded

Solution code:
# ABC073C - Write and Erase
n = int(input())
arr = []
for _ in range(n):
    m = int(input())
    if m in arr:
        arr.pop(arr.index(m))
    else:
        arr += [m]
print(len(arr))

Submission status: Time Limit Exceeded

Solution code:
# ABC073C - Write and Erase
import sys
input = sys.stdin.readline

n = int(input())
arr = []
for _ in range(n):
    m = int(input())
    if m in arr:
        arr.pop(arr.index(m))
    else:
        arr.append(m)
print(len(arr))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

paper = []

for number in a:
    if not number in paper:
        paper.append(number)
    
    else:
        paper.remove(number)

print(len(paper))

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
A=[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:
inputNum = int(input())

numList = []

for count in range(inputNum):
    num = input()
    if num not in numList:
        numList.append(num)
    else:
        numList.remove(num)

print(len(numList))

Submission status: Time Limit Exceeded

Solution code:
inputNum = int(input())

numList = []

for count in range(inputNum):
    num = input()
    if num not in numList:
        numList.append(num)
    elif num in numList:
        numList.remove(num)

print(len(numList))

Submission status: Time Limit Exceeded

Solution code:
inputNum = int(input())

numList = []

for count in range(inputNum):
    num = input()
    num = int(num)
    if num not in numList:
        numList.append(num)
    elif num in numList:
        numList.remove(num)

print(len(numList))

Submission status: Time Limit Exceeded

Solution code:
inputNum = int(input())

numList = []

for count in range(inputNum):
    num = input()
    num = int(num)
    if num not in numList:
        numList.append(num)
    else:
        numList.remove(num)

print(len(numList))

Submission status: Time Limit Exceeded

Solution code:
import bisect
l=[]
for i in range(int(input())):
    n=int(input())
    x=bisect.bisect_left(l,n)
    if x==len(l):l.append(n)
    elif l[x]==n:l.remove(n)
    else:l.insert(x,n)
print(len(l))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = [0] * N
A[0] = int(input())
for i in range(1, N):
	A[i] = int(input())
	if A[i] in A[: i]:
		A[A[: i].index(A[i])] = -1
		A[i] = -1

print(len([k for k in A if k != -1]))

Submission status: Time Limit Exceeded

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

for j in range(1, N):
	if A[j] in A[: j]:
		A[A[: j].index(A[j])] = -1
		A[j] = -1


print(len([k for k in A if k != -1]))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = [int(input()) for _ in range(N)]
newA = list(set(A))
count = 0
for an in newA:
    if A.count(an) %2 == 1:
        count += 1

print(count)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = [int(input()) for _ in range(N)]
ans = []
for an in A:
    if an in ans:
        del ans[ans.index(an)]
    else:
        ans.append(an)
print(len(ans))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

As= {}
for i in range(0,N):
    a = int(input())
    if a not in As.keys():
        As[a] = 1
    else:
        As[a] += 1

count = 0
for k in As.keys():
    if As[k] % 2 != 0:
        count += 1
print(count)

Submission status: Time Limit Exceeded

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

"""
set型は重複した要素をもたないデータ型
set(a)の各要素につき，リストaに奇数個含まれていたらリストbに入れる
"""

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a=[0]*n
for i in range(n):
    a[i]=int(input())
ans=0
for i in range(n):
    if a[i] not in a[:i] and a.count(a[i])%2!=0:
        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())
ans=0
for i in range(n):
    if a.count(a[i])%2!=0 and a[i] not in a[:i]:
        ans +=1
print(ans)