Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(input()) for n in range(N)]

setA = set(A)

if len(setA) < 10:
    res = 0
    for a in setA:
        if A.count(a)%2 != 0:
            res += 1

    print(res)

else:
    res = []
    while A:
        a = A.pop()
        if a in res:
            res.remove(a)
        else:
            res.append(a)
    
    print(len(res))

Fixed submission:
N = int(input())
A = [int(input()) for n in range(N)]
A = sorted(A)

res = []
tmp = A[0]
count = 1
for i in range(1,N):
    if A[i] == tmp:
        count += 1
    else:
        res.append(count%2 != 0)
        count = 1
    tmp = A[i]
res.append(count%2 != 0)

print(sum(res))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(input()) for n in range(N)]

setA = set(A)

if len(setA) < 100:
    res = 0
    for a in setA:
        if A.count(a)%2 != 0:
            res += 1
    
    print(res)

else:
    res = []
    while A:
        a = A.pop()
        if a in res:
            res.remove(a)
        else:
            res.append(a)
    
    print(len(res))

Fixed submission:
N = int(input())
A = [int(input()) for n in range(N)]
A = sorted(A)

res = []
tmp = A[0]
count = 1
for i in range(1,N):
    if A[i] == tmp:
        count += 1
    else:
        res.append(count%2 != 0)
        count = 1
    tmp = A[i]
res.append(count%2 != 0)

print(sum(res))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(input()) for n in range(N)]

setA = set(A)

res = 0
for a in setA:
    if A.count(a)%2 != 0:
        res += 1

print(res)

Fixed submission:
N = int(input())
A = [int(input()) for n in range(N)]
A = sorted(A)

res = []
tmp = A[0]
count = 1
for i in range(1,N):
    if A[i] == tmp:
        count += 1
    else:
        res.append(count%2 != 0)
        count = 1
    tmp = A[i]
res.append(count%2 != 0)

print(sum(res))

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = [int(input()) for n in range(N)]
L = [False for i in range(max(A))]

for a in A:
    L[a] = not L[a]
print(sum(L))


Fixed submission:
N = int(input())
A = [int(input()) for n in range(N)]
A = sorted(A)

res = []
tmp = A[0]
count = 1
for i in range(1,N):
    if A[i] == tmp:
        count += 1
    else:
        res.append(count%2 != 0)
        count = 1
    tmp = A[i]
res.append(count%2 != 0)

print(sum(res))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(input()) for n in range(N)]

res = []
while A:
    a = A.pop()
    if a in res:
        res.remove(a)
    else:
        res.append(a)

print(len(res))


Fixed submission:
N = int(input())
A = [int(input()) for n in range(N)]
A = sorted(A)

res = []
tmp = A[0]
count = 1
for i in range(1,N):
    if A[i] == tmp:
        count += 1
    else:
        res.append(count%2 != 0)
        count = 1
    tmp = A[i]
res.append(count%2 != 0)

print(sum(res))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
L = [False for i in range(10**9+1)]
A = [int(input()) for n in range(N)]


for a in A:
    L[a] = not L[a]

print(sum(L))


Fixed submission:
N = int(input())
A = [int(input()) for n in range(N)]
A = sorted(A)

res = []
tmp = A[0]
count = 1
for i in range(1,N):
    if A[i] == tmp:
        count += 1
    else:
        res.append(count%2 != 0)
        count = 1
    tmp = A[i]
res.append(count%2 != 0)

print(sum(res))

Buggy python submission (verdict: Runtime Error):
N = int(input())
L = [False for i in range(100001)]
A = [int(input()) for n in range(N)]


for a in A:
    L[a] = not L[a]

print(sum(L))


Fixed submission:
N = int(input())
A = [int(input()) for n in range(N)]
A = sorted(A)

res = []
tmp = A[0]
count = 1
for i in range(1,N):
    if A[i] == tmp:
        count += 1
    else:
        res.append(count%2 != 0)
        count = 1
    tmp = A[i]
res.append(count%2 != 0)

print(sum(res))

Buggy python submission (verdict: Runtime Error):
N = int(input())
L = [False for i in range(100000)]
A = [int(input()) for n in range(N)]


for a in A:
    L[a] = not L[a]

print(sum(L))


Fixed submission:
N = int(input())
A = [int(input()) for n in range(N)]
A = sorted(A)

res = []
tmp = A[0]
count = 1
for i in range(1,N):
    if A[i] == tmp:
        count += 1
    else:
        res.append(count%2 != 0)
        count = 1
    tmp = A[i]
res.append(count%2 != 0)

print(sum(res))