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 = []
for _ in range(N):
    A.append(int(input()))
C = set(A)
B = [0]*N
i = 0
for a in C:
    B[i] += A.count(a)
    i += 1
B = [i%2 for i in B]
print(B.count(1))

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
paper = set()
for _ in range(n):
    a = int(input())
    paper = set((a,))^paper

print(len(paper))

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:
import collections
n = int(input())
ls = [int(input()) for i in range(n)]
ls.sort()
c = collections.Counter(ls)
p = 0
for j in range(len(c)):
    if c.most_common()[j][1] % 2 ==0:
        continue
    else:
        p += 1
print(p)

Submission status: Time Limit Exceeded

Solution code:
from collections import deque
import sys

def input():
    return sys.stdin.readline().strip()

def main():
    N = int(input())
    check = deque()
    def my_index(l, x, default=False):
        return l.index(x) if x in l else default

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

if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
import sys

def input():
    return sys.stdin.readline().strip()

def main():
    N = int(input())
    check = []
    def my_index(l, x, default=False):
        return l.index(x) if x in l else default

    for _ in range(N):
        A = int(input())
        if A not in check:
            check.append(A)
        else:
            del check[my_index(check,A)]
    print(len(check))

if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
check = []
def my_index(l, x, default=False):
    return l.index(x) if x in l else default

for _ in range(N):
    A = int(input())
    if A not in check:
        check.append(A)
    else:
        del check[my_index(check,A)]
print(len(check))

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
def resolve():
    '''
    code here
    '''
    N = int(input())
    A_list = [int(input()) for _ in range(N)]
 
    num_list = []
 
    for i in A_list:
        if i in num_list:
            num_list.remove(i)
        else:
            num_list.append(i)
 
    print(len(num_list))

if __name__ == "__main__":
    resolve()

Submission status: Time Limit Exceeded

Solution code:
def resolve():
    '''
    code here
    '''
    N = int(input())
    A_list = [int(input()) for _ in range(N)]

    num_cnt_list = [0 for _ in range(10**9+1)]

    for i in A_list:
        num_cnt_list[i] += 1
    
    res_list = [i%2 for i in num_cnt_list]

    print(sum(res_list))


if __name__ == "__main__":
    resolve()

Submission status: Time Limit Exceeded

Solution code:
def resolve():
    '''
    code here
    '''
    N = int(input())
    A_list = [int(input()) for _ in range(N)]

    num_list = []

    for i in A_list:
        try:
            num_list.remove(i)
        except ValueError:
            num_list.append(i)

    print(len(num_list))


if __name__ == "__main__":
    resolve()

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = {}
for i in range(n):
    s = int(input())
    if s in a.keys():
        flag = False
    else:
        flag = True
    if flag:
        a[s] = 1
    else:
        if a[s] == 1:
            a[s] = 0
        else:
            a[s] = 1
print(sum(a.values()))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = {}
for i in range(n):
    s = int(input())
    if s not in a.keys():
        a[s] = 1
    elif s in a.keys():
        if a[s] == 1:
            a[s] = 0
        else:
            a[s] = 1
print(sum(a.values()))

Submission status: Time Limit Exceeded

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

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

    return ans

if __name__ == "__main__":
    print(solve())

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)
    continue
  l.append(a)
print(len(l))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

# 自分の解答
def myAnswer(N:int,dic:dict) -> int: # pythonはlist操作が重いので辞書で処理する
   ans = 0
   for a in dic.values():
      if(a % 2 == 1):
         ans += 1
   return ans
def modelAnswer(N:int,A:list) -> int:
   ans = []
   A.sort()
   for a in A:
      if(a in ans):
         ans.remove(a)
      else:
         ans.append(a)
   return len(ans)

def main():
   N = int(input())
   dic = {}
   A =[]
   for _ in range(N):
      a = int(input())
      A.append(a)
      if(a in dic.keys()):
         dic[a]+=1
      else:
         dic[a]=1
   print(modelAnswer(N,A))
if __name__ == '__main__':
   main()

Submission status: Time Limit Exceeded

Solution code:
def myAnswer(N:int,A:list) -> int:
   ans = []
   for a in A:
      if(a in ans):
         ans.remove(a)
      else:
         ans.append(a)
   return len(ans)

def modelAnswer():
   return
def main():
   N = int(input())
   A = [int(input()) for _ in range(N)]
   print(myAnswer(N,A[:]))
if __name__ == '__main__':
   main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:

N = int(input())

num_dict = dict()

for i in range(1000000000):
  num_dict[i] = 0

for i in range(N):
  x = int(input())
  if (num_dict[x]):
    num_dict[x] = 0
  else:
    num_dict[x] += 1
    
ans = 0
for i in num_dict:
  ans += num_dict[i]
  
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

A_count = [0 for i in range(max(A))]
for i in A:
    A_count[i-1] += 1

ans = 0
for count in A_count:
    if count % 2 == 1:
        ans += 1

print(ans)

Submission status: Time Limit Exceeded

Solution code:
import collections

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

Adic = collections.Counter(A)

B = [n % 2 for n in Adic.values()]

while 0 in B:
    B.remove(0)

print(len(B))

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
l = [int(input()) for i in range(n)]
x = set(l)
ans = 0

for i in x:
  y = l.count(i)
  if y%2 == 1:
      ans += 1
    
print(ans)

Submission status: Time Limit Exceeded

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

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

print(len(l))

Submission status: Time Limit Exceeded

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

for i in range(n):
  x = int(input())
  if l[x-1] == 0:
    l[x-1] = 1
  else:
    l[x-1] = 0

print(l.count(1))

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
A = [[]]*341
count = 0
i = 0
while i < n:
    a0 = int(input())
    r = a0%341
    if a0 in A[r]:
        A[r].remove(a0)
        count -= 1
    else:
        A[r].append(a0)
        count += 1
    i += 1
print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
import sys

def main():
    def input(): return sys.stdin.readline().rstrip()
    N = int(input())
    A = [int(input()) for _ in range(N)]
    valiation = list(set(A))
    cnt = 0
    for v in valiation:
        if A.count(v) % 2 != 0:
            cnt += 1
    print(cnt)
    
if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
import sys

def main():
    N = int(input())
    A = [int(input()) for _ in range(N)]
    valiation = list(set(A))
    cnt = 0
    for v in valiation:
        if A.count(v) % 2 != 0:
            cnt += 1
    print(cnt)
    
if __name__ == '__main__':
    main()

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import collections

n=int(input())
a=[0]*n
for i in range(n):
  a[i]=int(input())
  
c = collections.Counter(a)
l=len(set(a))
ans=0

for i in range(l):
  a[i]=c.most_common()[i][1]
  if a[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)]
B = 0
for i in A:
    if A.count(i) >= 1:
        if A.count(i)%2 == 1:
            B += 1
    else :
        break
print(B)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
maxfigure = sorted(A)[-1]
B = 0
for i in A:
    if A.count(i)%2 == 1:
        B += 1
print(B)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
maxfigure = sorted(A)[-1]
B = 0
for i in range(maxfigure):
    if A.count(i)%2 == 1:
        B += 1
print(B)

Submission status: Time Limit Exceeded

Solution code:
def main():
  import collections
  import sys
  input = sys.stdin.readline
  n = int(input())
  b = []
  for i in range(n):
    a = int(input())
    b_append = b.append
    b_append(a)

  s = set(b)
  c = collections.Counter(b)
  ans = 0
  for i in range(len(s)):
    if c.most_common()[i][1] % 2 == 0:
      continue
    else:
      ans += 1
    if c.most_common()[i][1] == 1:
      ans += len(s)-1-i
      break
  print(ans)
if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
import collections
import sys
input = sys.stdin.readline
n = int(input())
b = []
for i in range(n):
  a = int(input())
  b_append = b.append
  b_append(a)

s = set(b)
c = collections.Counter(b)
ans = 0
for i in range(len(s)):
  if c.most_common()[i][1] % 2 == 0:
    continue
  else:
    ans += 1
  if c.most_common()[i][1] == 1:
    ans += len(s)-1-i
    break
print(ans)

Submission status: Time Limit Exceeded

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

ans = set()
     
for x in L:
    if L.count(x) % 2 == 1:
        ans.add(x)

print(len(ans))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
n = int(input())
a = [int(input()) for i in range(n)]
cnt = [0 for i in range(max(a))]

for ai in a:
  cnt[ai-1] += 1
  
print( (np.array(cnt) % 2).sum())

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

print(len(li))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
nums = []
for i in range(n):
  num = int(input())
  nums.append(num)
count = 0
setnums = set(nums)
for j in setnums:
  test = nums.count(j)
  if test % 2 == 1:
    count += 1
print(count)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
nums = []
for i in range(n):
  num = int(input())
  nums.append(num)
count = 0
for j in nums:
  test = nums.count(j)
  if test % 2 == 1:
    count += 1
print(count)

Submission status: Time Limit Exceeded

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

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

while 0 in a:a.remove(0)
print(len(a))

Submission status: Time Limit Exceeded

Solution code:
from collections import deque
n = int(input())

q = deque()
for _ in range(n):
  num = int(input())
  if num in q:
    q.remove(num)
  else:
    q.append(num)
    
print(len(q))

Submission status: Time Limit Exceeded

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

print(len(a))

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:

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

b = set(b)
b = list(b)
ans = 0

for i in range(len(b)):
#    x = b[i]
    if a.count(b[i]) % 2 != 0:
        ans += 1

print(ans)

Submission status: Time Limit Exceeded

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

ls = []

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

print(len(ls))

Submission status: Time Limit Exceeded

Solution code:
def main():
  n=int(input())
  a=[int(input()) for _ in [0]*n]
  print(len([i for i in a if a.count(i)%2==1]))
if __name__=='__main__':
  main()

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
numbers=[]
for n in range(0,N):
    number=int(input())
    if number in numbers:
        numbers.remove(number)
    else:
        numbers.append(number)
print(len(numbers))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
list=[]
for a in range(N):
    A=int(input())
    list.append(A)
numbers=[]
for b in list:
    if b in numbers:
        pass
    else:
        numbers.append(b)
number=0
for b in numbers:
    if list.count(b)%2==0:
        pass
    else:
        number+=1
print(number)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys
from io import StringIO
import unittest

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline
    n=int(readline())
    aa=[]
    for _ in range(n):
        a = readline().strip()
        if a in aa:
            aa.remove(a)
        else:
            aa.append(a)
    print(len(aa))
    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

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=[]
c=0
for _ in range(n):
  A=int(input())
  a.append(A)
for i in a:
  if a.count(i)%2==1:
    c+=1
print(c)

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a=[]
c=0
for _ in range(n):
  A=int(input())
  a.append(A)
for i in range(1,max(a)+1):
  if a.count(i)%2==1:
    c+=1
print(c)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

L = []
ans = 0
for i in range(n):
    tmp = int(input())
    if tmp in set(L):
        L = [i for i in L if i != tmp]
    else:
        L.append(tmp)

print(len(L))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

L = []
for i in range(n):
    tmp = int(input())
    if tmp in L:
        L = [i for i in L if i != tmp]
    else:
        L.append(tmp)

print(len(L))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#073_C
n=int(input())
s=set()
for _ in range(n):
    s=s^{input()}
print(len(s))

Submission status: Time Limit Exceeded

Solution code:
#073_C
n=int(input())
s=set()
for _ in range(n):
    a=int(input())
    a={a}
    s=s^a
print(len(s))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

ans = 0
L = []
for i in range(N):
    L.append(int(input()))

l = set(L)

for j in l:
    if L.count(j)%2 == 1:
        ans += 1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
import sys
input = sys.stdin.readline
N=int(input())
ans=[]

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


print(len(ans))

Submission status: Time Limit Exceeded

Solution code:
N=int(input())

ans=[]

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


print(len(ans))

Submission status: Time Limit Exceeded

Solution code:
import sys
input = sys.stdin.readline
n = int(input())
a = [int(input()) for i in range(n)]
ans = []

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

print(len(ans))

Submission status: Time Limit Exceeded

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

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

print(len(ans))

Submission status: Time Limit Exceeded

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

list_X = []

for A in list_A :
    if A in list_X :
        list_X.remove(A)
    else :
        list_X.append(A)

print(len(list_X))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
p=[0]
count=0
for i in range (N):
  a=int(input())
  flag=0
  for j in range (i+1):
    if a==p[j]:
      p[j]=0
      count-=1
      flag=1
      p.append(0)
  if flag==0:
    p.append(a)
    count+=1
print(count)

Submission status: Time Limit Exceeded

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

l = []

for i in A:
    # print(A.count(i))
    if A.count(i) == 1:
        l.append(i)

print(len(l))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

d = set([])
for _ in range(n):
    d = d ^ set([int(input())])
    
print(len(d))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys
input = sys.stdin.readline
n=int(input())
count=0
a=[int(input()) for _ in range(n)]
for x in a:
    if a.count(x)%2==1:
        count+=1
print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys
input = sys.stdin.readline
a=[int(input()) for i in range(int(input()))]
count=0
for x in a:
    if a.count(x)%2==1:
        count+=1
print(count)

Submission status: Time Limit Exceeded

Solution code:
a=[int(input()) for i in range(int(input()))]
count=0
for x in a:
    if a.count(x)%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 ans.count(a)==0:
        ans.append(a)
    else:
        ans.remove(a)
print(len(ans))

Submission status: Time Limit Exceeded

Solution code:
def writeanderase(n , a):

    ans = []

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

    return len(ans)

def main():
    n = int(input())
    a = [int(input()) for i in range(n)]
    print(writeanderase(n , a))

if __name__ == '__main__':
    main()

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:
iteration = int(input())
array = []
set_elem = set()
for i in range(iteration):
    e = input()
    array.append(e)
    set_elem.add(e)
ans = [e for e in set_elem if array.count(e) % 2 == 1]
print(len(ans))

Submission status: Time Limit Exceeded

Solution code:
iteration = int(input())
array = []
for i in range(iteration):
    e = input()
    array.append(e)
ans = [e for e in set(array) if array.count(e) % 2 == 1]
print(len(ans))

Submission status: Time Limit Exceeded

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

ans = 0
for a in As:
    if A.count(a) % 2 == 0:
        pass
    else:
        ans += 1

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

a.sort()

checked = []
ans = 0
for i in range(n):
    count = 0
    if not a[i] in checked:
        for j in range(i,n):
            if a[j] == a[i]:
                count += 1
            else:
                break
        if count % 2 == 0:
            pass
        else:
            ans += 1
        checked.append(a[i])
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
a = int(input())
numlist = []
for i in range(a):
	b = int(input())
	if b in numlist:
		numlist.remove(b)
	else:
		numlist.append(b)
print(len(numlist))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())


al = []

for i in range(n):
    a = int(input())
    if al.count(a) > 0:
        al.remove(a)
    else:
        al.append(a)

print(len(al))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

al = []

for i in range(n):
    a = int(input())
    if al.count(a) > 0:
        al.remove(a)
    else:
        al.append(a)

print(len(al))

Submission status: Time Limit Exceeded

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

al_s = list(set(al))
count = 0

for a in al_s:
    if al.count(a) % 2 != 0:
        count += 1

print(count)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

paper = []
numbers = [int(input()) for _ in range(N)]

for n in numbers:
    if n in paper:
        paper.remove(n)
    else:
        paper.append(n)

print(len(paper))