Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
d=deque()
for _ in range(int(input())):
  a=int(input())
  if a in d:
    try:
      d.remove(a)
    except ValueError:
      pass
  else:
    d.append(a)
print(len(d))

Fixed submission:
N=int(input())
A=[int(input()) for i in range(N)]
dict = {}
for i in A:
  if i not in dict:
    dict[i] = 1
  else:
    dict[i] += 1
print(len([1 for i in dict.values() if i%2!=0]))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
d=deque()
for _ in range(int(input())):
  a=int(input())
  try:
    d.remove(a)
  except ValueError:
    d.append(a)
print(len(d))

Fixed submission:
N=int(input())
A=[int(input()) for i in range(N)]
dict = {}
for i in A:
  if i not in dict:
    dict[i] = 1
  else:
    dict[i] += 1
print(len([1 for i in dict.values() if i%2!=0]))

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=[int(input()) for i in range(N)]
print(len([i for i in list(set(A)) if A.count(i)%2==1]))

Fixed submission:
N=int(input())
A=[int(input()) for i in range(N)]
dict = {}
for i in A:
  if i not in dict:
    dict[i] = 1
  else:
    dict[i] += 1
print(len([1 for i in dict.values() if i%2!=0]))

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=[int(input()) for i in range(N)]
A_set = list(set(A))
result = []
for i in range(len(A_set)):
  if A.count(A_set[i])%2!=0:
    result.append(A_set[i])
print(len(set(result)))

Fixed submission:
N=int(input())
A=[int(input()) for i in range(N)]
dict = {}
for i in A:
  if i not in dict:
    dict[i] = 1
  else:
    dict[i] += 1
print(len([1 for i in dict.values() if i%2!=0]))

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=[int(input()) for i in range(N)]
A_set = list(set(A))
result = []
for i in range(len(A_set)):
  if A.count(A_set[i])%2!=0:
    if i in result:
      continue
    result.append(A_set[i])
print(len(result))

Fixed submission:
N=int(input())
A=[int(input()) for i in range(N)]
dict = {}
for i in A:
  if i not in dict:
    dict[i] = 1
  else:
    dict[i] += 1
print(len([1 for i in dict.values() if i%2!=0]))

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=[int(input()) for i in range(N)]
A_set = list(set(A))
result = []
for i in range(len(A_set)):
  if A.count(A_set[i])%2!=0:
    if i in result:
      A.remove(A_set[i])
      continue
    result.append(A_set[i])
  else:
    continue
print(len(result))

Fixed submission:
N=int(input())
A=[int(input()) for i in range(N)]
dict = {}
for i in A:
  if i not in dict:
    dict[i] = 1
  else:
    dict[i] += 1
print(len([1 for i in dict.values() if i%2!=0]))

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=[int(input()) for i in range(N)]
result = []
for i in range(len(A)):
  if A.count(A[i])%2!=0:
    if i in result:
      A.remove(A[i])
      continue
    result.append(A[i])
  else:
    continue
print(len(result))

Fixed submission:
N=int(input())
A=[int(input()) for i in range(N)]
dict = {}
for i in A:
  if i not in dict:
    dict[i] = 1
  else:
    dict[i] += 1
print(len([1 for i in dict.values() if i%2!=0]))

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=[int(input()) for i in range(N)]
print(len([i for i in A if A.count(i)%2!=0]))

Fixed submission:
N=int(input())
A=[int(input()) for i in range(N)]
dict = {}
for i in A:
  if i not in dict:
    dict[i] = 1
  else:
    dict[i] += 1
print(len([1 for i in dict.values() if i%2!=0]))