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: Runtime Error

Solution code:
n=int(input())

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

m=max(a)
table=[0]*m

for i in range(n):
    table[a[i]-1]+=1

ans=0
for j in range(m):
    if table[j]%2==1:
        ans+=1

print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())

table=[0]*10**6

for i in range(n):
    a=int(input())
    table[a-1]+=1

ans=0

for j in range(10**6):
    if table[j]%2==1:
        ans+=1

print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())

table=[0]*10**5

for i in range(n):
    a=int(input())
    table[a-1]+=1

ans=0

for j in range(10**5):
    if table[j]%2==1:
        ans+=1

print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())

table=[0]*10**9

for i in range(n):
    a=int(input())
    table[a-1]+=1

ans=0

for j in range(10**9):
    if table[j]%2==1:
        ans+=1

print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())

table=[0]*100000

for i in range(n):
    a=int(input())
    table[a-1]+=1

ans=0

for j in range(100000):
    if table[j]%2==1:
        ans+=1

print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
A = [0]*10000000
for i in a:
  if A[i] == 0:
    A[i] = 1
  else:
    A[i] = 0
print(A.count(1))

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
A = [0]*100000
for i in a:
  if A[i] == 0:
    A[i] = 1
  else:
    A[i] = 0
print(A.count(1))

Submission status: Runtime Error

Solution code:
def main():
    n = int(input())
    l1 = [0] * (10**9 + 1)
    print(n)
    for _ in range(n):
        i = int(input())
        l1[i] ^= 1
    print(sum(l1))


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
#include<iostream>
#include<unordered_set>

using namespace std;

int main(){

    int size,query;
    unordered_multiset<int> ans;
    cin >> size;
    for (int i=0;i<size;i++){
        cin >> query;
        if (ans.find(query) == ans.end()){
            ans.insert(query);
        }
        else{
            ans.erase(query);
        }

    }
    cout << ans.size() << endl;
    return 0;
}

Submission status: Runtime Error

Solution code:
def main():
    N = int(input())
    A = [int(input()) for a in range(N)]
    L = [0 for i in range(10**4)]

    for i in range(N):
        if L[A[i]-1] == 0:
            L[A[i]-1] = 1
        elif L[A[i]-1] == 1:
            L[A[i]-1] = 0

    print(sum(L))
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
c11, c12, c13 = map(int, input().split())
c21, c22, c23 = map(int, input().split())
c31, c32, c33 = map(int, input().split())

if not (c12-c11 == c22-c21 == c32-c31):
    print("No")
    quit()
if not (c13-c12 == c23-c22 == c33-c32):
    print("No")
    quit()
if not (c21-c11 == c22-c12 == c23-c13):
    print("No")
    quit()
if not (c31-c21 == c32-c22 == c33-c23):
    print("No")
    quit()

print("Yes")

Submission status: Runtime Error

Solution code:
import collections

n = int(input())
L = [int(input()) for _ in range(n)]
l = collections.Counter(L)
l_count = l.values()
ans = 0
for i in range(len(l_count)):
  if l_cpunt[i] % 2 = 1:
    ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
import collections

n = int(input())
L = [int(input()) for i in range(n)]
L.sort()
c = collections.Counter(L)
ccc = c.values()
ans = 0
for j in range(len(ccc)):
  if ccc[j] % 2 = 1:
    ans += 1

Submission status: Runtime Error

Solution code:
n = int(input())
a = []
for i in range(n):
    s = int(input())
    a.append(s)
a.sort()
i = 0
cnt = 0
while i < n:
    j = i+1
    chk = 0
    while a[i] == a[j]:
        chk += 1
        j += 1
        if j >= n:
            break
    if chk%2 == 1:
        cnt += 1 
    i = j
print(cnt)

Submission status: Runtime Error

Solution code:
n = int(input())
l = [0] * 100010
for i in range(n):
    a = int(input())
    if l[a] == 0:
        l[a] = 1
    else:
        l[a] = 0
print(sum(l))

Submission status: Runtime Error

Solution code:
n = int(input())
l = [0] * 100000
for i in range(n):
    a = int(input())
    if l[a] == 0:
        l[a] = 1
    else:
        l[a] = 0
print(sum(l))

Submission status: Runtime Error

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

    ten = [0]*int(1e9)
    for i in range(n):
        ten[i] += 1

    ten.remove(0)
    ans = 0
    for i in range(len(ten)):
        if ten[i]%2 == 1:
            ans += 1


    return ans

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

Submission status: Runtime Error

Solution code:
# from math import factorial,sqrt,ceil,gcd
# from itertools import permutations as permus
# from collections import deque,Counter
# import re
# from functools import lru_cache # 簡単メモ化 @lru_cache(maxsize=1000)
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

import numpy as np
# import networkx as nx
# from scipy.sparse.csgraph import shortest_path, dijkstra, floyd_warshall, bellman_ford, johnson
# from scipy.sparse import csr_matrix
# from scipy.special import comb

# slist = "abcdefghijklmnopqrstuvwxyz"
N = int(input())
rows = [int(input()) for _ in range(N)]
arr = np.array(rows)
key,idx,cnt = np.unique(arr,return_index=True,return_counts=True)
cnt = cnt[cnt%2==1]
ans = len(cnt)

print(ans)
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する
# print("{:.10f}".format(ans))
# print("{:0=10d}".format(ans))

Submission status: Runtime Error

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 = {}
   for _ in range(N):
      a = int(input())
      if(a in dic.keys()):
         dic[a]+=1
      else:
         dic[a]=1
   print(modelAnswer(N,dic))
if __name__ ==

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
a=[int(input()) for i in range(n)]
cx=[0]*max(a)
for ai in a:
  cx[ai-1]+=1
ans=0
for ci in cx:
  if ci%2!=0:
    ans+=1
print(ans)

Submission status: Runtime Error

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

pre = sorted_A[0]
if len(sorted_A) == 1:
    print(1)
else:
    count = 0
    for i in range(1, len(sorted_A)):
        if sorted_A[i] == pre:
            count += 1
        else:
            if count % 2 == 1:
                ans += 1
            pre = sorted_A[i]
            count = 1
    print(ans)

Submission status: Runtime Error

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

pre = sorted_A[0]
if len(sorted_A) == 1:
    print(1)
else:
    count = 0
    for i in range(1, len(sorted_A)):
        if sorted_A[i] == pre:
            count += 1
        else:
            if count % 2 == 1:
                ans += 1
            pre = sorted_A[i]
            count = 1
print(ans)

Submission status: Runtime Error

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

A_count = [0] * 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: Runtime Error

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
A_count = [0] * 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: Runtime Error

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

for i in A:
    if A_count[i-1] == 0:
        A_count[i-1] = 1
    elif A_count[i-1] == 1:
        A_count[i-1] = 0

print(sum(A_count))

Submission status: Runtime Error

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

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: Runtime Error

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

ans = [0] * max(A)
count = 0
for i in range(N):
    if ans[A[i]-1] == 0:
        ans[A[i]-1] = 1
        count += 1
    else:
        ans[A[i]-1] = 0
        count -= 1

print(count)

Submission status: Runtime Error

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

ans = [0] * (10**9)
for i in range(N):
    if ans[i] == 0:
        ans[i] = 1
    if ans[i] == 1:
        ans[i] = 0

print(sum(ans[i]))

Submission status: Runtime Error

Solution code:
import sys
import numpy as np

read = sys.stdin.read

n = int(input())
a = np.array(read().split(), dtype=np.int64)
b = np.bincount(a)
ans = np.count_nonzero(b%2 != 0)
print(ans)

Submission status: Runtime Error

Solution code:
N=int(input())
s=set()
for i in range(N):
  s^=｛input()｝
print(len(s))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

url = "https://atcoder.jp//contests/abc073/tasks/abc073_c"

def main():
    li = [0] * (10 ** 5)
    li.append(0)

    n = int(input())
    for i in range(n):
        ind = int(input())
        if li[ind] == 0:
            li[ind] = 1
        else:
            li[ind] = 0
    print(li.count(1))
if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
from collections import Counter
n, *A = map(int, open(0).read().split())
ans = 0
for k, v in  Counter(A):
  if v % 2 == 1:
    ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
from collections import Counter

N = int(input())
A = [int(input()) for _ in range(N)]
c = Counter(A)
print(len([i for i in c if c.values(i) % 2 == 1]))

Submission status: Runtime Error

Solution code:
import sys
import io, os
def main():
    input = sys.stdin.readline
    inputb = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
    N=int(input())
    A=[int(input()) for _ in range(N)]
    from collections import Counter
    C=Counter(A)
    ans=0
    for v in C.values():
        if v&1: ans+=1
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
N = int(input())
list = [0]*1000000000

for i in range(N):
  A = int(input())
  if list[A-1] == 0:
    list[A-1] = 1
  else:
    list[A-1] = 0
print(sum(list))

Submission status: Runtime Error

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

Submission status: Runtime Error

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(n-len(s)):
  if c.most_common()[i][1] % 2 == 0:
    ans -= 1
ans += len(s)
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
L = [0] * (100000+1)
for i in range(N):
    a = int(input())
    L[a] = L[a]+1
cnt = 0
for x in L:
    if x %2 == 1:
        cnt += 1
print(cnt)

Submission status: Runtime Error

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

for i in range(n):
  cnt[int(input())-1] += 1
  
print( (np.array(cnt) % 2).sum())

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

for i in range(n):
  cnt[int(input())-1] += 1
  
print( (np.array(cnt) % 2).sum())

Submission status: Runtime Error

Solution code:
import sys
import numpy as np
input = sys.stdin.readline
n=int(input())
l=[0]*10**5
for i in range(n):
    a=int(input())
    l[a-1]+=1
l1=np.array(l)
print(np.count_nonzero(l1%2==1))

Submission status: Runtime Error

Solution code:
import sys
import numpy as np
input = sys.stdin.readline
n=int(input())
l=[0]*10**5
for i in range(n):
    a=int(input())
    l[a-1]+=1
l1=np.array(l)
l2=l%2
l2.count('1')

Submission status: Runtime Error

Solution code:
c=[1]*(10**9)
a=[]
n=int(input())
for i in range(n):
    ai=int(input())-1
    c[ai]=1-c[ai]
    a.append(ai)
    
icnt=0
for i in range(n):
  if c[a[i]]==0:
      icnt=icnt+1
      
print(icnt)

Submission status: Runtime Error

Solution code:
nmax=10**9+1
c=[1]*nmax
a=[]
n=int(input())
for i in range(n):
    ai=int(input())-1
    c[ai]=1-c[ai]
    a.append(ai)
    
icnt=0
for i in range(n):
  if c[a[i]]==0:
      icnt=icnt+1
      
print(icnt)

Submission status: Runtime Error

Solution code:
c=[1]*100000
n=int(input())
for i in range(n):
    ai=int(input())-1
    c[ai]=1-c[ai]
    
icnt=0
for i in range(100000):
  if c[i]==0:
      icnt=icnt+1
      
print(icnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np

N = int(input())
A = np.zeros(1000000000,dtype=bool)

for _ in range(N):
    i = int(input())
    A[i] = not A[i]
    
print(np.count_nonzero(A))

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
import collections
b = collections.Counter(a)
set_a = set(a)
cnt = 0
for i in range(len(set_a)):
    if b[set_a[i]]%2 == 1:
        cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
n = int(input())
d = [0]*(10**5+1)
for i in range(n):
    a = int(input())
    d[a] += 1
ans = 0
for i in d:
    if i%2==1:
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
s=int(input())
k=[]
for i in range(s):
    j=int(input())
    if j in k:
        k=k-j
    else:
        k.append(j)
print(len(k))

Submission status: Runtime Error

Solution code:
n = int(input())
a = [0] * 100000
ans = 0
for i in range(n):
    a[int(input())-1] += 1
for i in range(len(a)):
    if a[i] % 2 == 1:
        ans += 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import Counter
n=int(input())
a=[int(input()) for i in range(n)]
c=Counter(a).most_common()
ans=0
for v in c:
  if v[1]%2==1:
    ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
from collections import Counter
N = inr(input())
A = Counter([int(input()) for i in range(N)])
print(sum(1 if count%2 else 0 for count in A.values()))

Submission status: Runtime Error

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

dict = {}
for i in range(n):
  if not(a[i] in dict):
    dict(a[i]) =1
  if s[i] in dict:
    dict.pop(a[i])
    
print(len(dict))

Submission status: Runtime Error

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

dict = {}
for i in range(n):
  if not(a[i] in dict):
    dict(a[i]) =1
  if s[i] in dict:
    dict.pop(a[i])
    
print(len(dict))

Submission status: Runtime Error

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

dict = {}
for i in range(n):
  if not(a[i] in dict):
    dict(a[i]) ==1
  if s[i] in dict:
    dict.pop(a[i])
    
print(len(dict))

Submission status: Runtime Error

Solution code:
n = int(input())
l = [False]*(10*9)
for i in range(n):
  a = int(input())
  if l[a-1] == False:
    l[a-1] = True
  else:
    l[a-1] =  False
print(l.count(True))

Submission status: Runtime Error

Solution code:
mport collections
c=Counter()
N=input()
for i in range(N):
    c[input()]+=1
d=list(filter(lambda x:c[x]%2==1,c))
print(len(d))

Submission status: Runtime Error

Solution code:
import collections
c=Counter()
N=int(input())
for i in range(N):
    c[int(input())]+=1
d=list(filter(lambda x:c[x]%2==1,c))
print(len(d))

Submission status: Runtime Error

Solution code:
n = int(input())
a = []
for i in range(n):
  a.append(int(input()))
a.sort()
b = []
for i in range(0,n-1,2):
  if a[i] != a[i+1]:
    b.append(a[i])
    b.append(a[i+1])
  else:
    continue
if n%2 == 1:
  b.append(a[-1])
#print(b)
ans = []
if b != []:
  ans.append(b[0])
  for j in range(1,len(b)-1,2):
    if b[j] != b[j+1]:
      ans.append(b[i])
      ans.append(b[i+1])
#print(ans)
if ans == []:
  print(0)
else:
  print(len(ans))

Submission status: Runtime Error

Solution code:
n = int(input())
a = []
for i in range(n):
  a.append(int(input()))
a.sort()
b = []
for i in range(0,n-1,2):
  if a[i] != a[i+1]:
    b.append(a[i])
    b.append(a[i+1])
  else:
    continue
if n%2 == 1:
  b.append(a[-1])
print(b)
ans = []
if b != []:
  ans.append(b[0])
  for j in range(1,len(b)-1,2):
    if b[j] != b[j+1]:
      ans.append(b[i])
      ans.append(b[i+1])
print(ans)
if ans == []:
  print(0)
else:
  print(len(ans))

Submission status: Runtime Error

Solution code:
# C
n = int(input())
MAX = 10**9 + 10
a = [0]*MAX
for i in range(n):
    A = int(input())
    if a[A] == 0:
        a[A] += 1
    elif a[A] == 1:
        a[A] -= 1
        
print(sum(a))

Submission status: Runtime Error

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!=1:
    resolve()
    sys.exit()

Submission status: Runtime Error

Solution code:
N = int(input())
A = [0] * 100005
for i in range(N):
    a = int(input())
    A[a] = 1 - A[a]
ans = 0
for i in range(100005):
    ans += A[i]
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def writeanderase(n , a):

    ans = {}

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

    for i in ans.values():
        count += i % 2

    return count

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

if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

ans = 0
a = A[0]
work = 1
for i in (1, N):
    if A[i] == a:
        work += 1
    else:
        if work % 2 == 0:
            pass
        else:
            ans += 1
        work = 1
        a = A[i]

print(ans)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
a = int(input())
b = set()
for i in range(a):
	b ^= {input()}
	print(b)
print(len(b))

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
n = int(input())
a = [int(input()) for _ in range(n)]
#print(a)
cnt = [0]*(10**5)
for i in a:
    cnt[i-1] += 1
print(sum([1 for i in cnt if i % 2 == 1]))
exit(0)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
n = int(input())
a = [int(input()) for _ in range(n)]
#print(a)
cnt = [0]*(10**9)
for i in a:
    cnt[i-1] += 1
print(sum([1 for i in cnt if i % 2 == 1]))
exit(0)

Submission status: Runtime Error

Solution code:
N=int(input())
A=[None]*N
for i in range(N):
  A[i]=input()
A.sort()
cnt=0
i = 0
while i <N:
  if A[i]==A[i+1]:
    i+=2
  else:
    cnt+=1
    i+=1
print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
a =[]
for _ in range(0,N):
    a.append(input())
s=0
x=0
b=[0]*(10**9)
for i in range(0,N):
    x=int(a[i])
    if b[x]==0:
        b[x]=1
    else:
        b[x]=0
y=int(max(a))
for i in range(0,y):
    s=s+b[i]
print(s)

Submission status: Runtime Error

Solution code:
n=int(input())
li=[0]*((10**9)+1)
ans=0
for i in range(n):
  a=int(input())
  if li[a]==0:
    li[a]=1
    ans += 1
  else:
    li[a]=0
    ans -= 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
n = int(input())
a = list(map(int,input().split()))
print(a)
cnt = [0]*(10**9)
for i in a:
    cnt[i-1] += 1
print(len([1 for i in cnt if i % 2 == 1]))

Submission status: Runtime Error

Solution code:
n = int(input())
nums = [int(input()) for _ in range(n)]
cnt = {}
ans = 0
for x in nums:
    if x not in cnt:
        cnt[x] = 1
    else:
        cnt[x] += 1
for y in cnt.values():
    if cnt[y] % 2 != 0:
        ans += 1

print(ans)

Submission status: Runtime Error

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

paper = [0] * 100000

for a in A:
    paper[a - 1] += 1

ans = len(list(filter(lambda x: x % 2 == 1, paper)))
print(ans)

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
sum = 0
li = [1] * 1000000100
for i in range(N) :
    A = int(input())
    if li[A] == 1 :
        sum +=1
        li[A] = 0
    else :
        li[A] = 1
        sum -=1
print(sum)

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
sum = 0
li = [1] * 100010
for i in range(N) :
    A = int(input())
    if li[A] == 1 :
        sum +=1
        li[A] = 0
    else :
        li[A] = 1
        sum -=1
print(sum)

Submission status: Runtime Error

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

count = [0] * (max(a)+1)

for _a in a:
    if count[_a] == 0:
        count[_a] = 1
    elif count[_a] == 1:
        count[_a] = 0

print(sum(count))

Submission status: Runtime Error

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

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: Runtime Error

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

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: Runtime Error

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

Submission status: Runtime Error

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

t = max(a)
b = [0]*(t+1)

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

print(sum(b))

Submission status: Runtime Error

Solution code:
import collections
n = int (input())
ln = []
ln2 = []
for _ in range(n):
    ln.append( int (input()))

C = collections.Counter(ln)
 
ans = 0
for v in C.items():
    if (v%2 != 0):
        ans += 1

print(ans)

Submission status: Runtime Error

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

C = collections.Counter(ln)
 
ans = 0
for v in C.items():
    if (v%2 != 0):
        ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())

myset = {}
for i in range(n):
    a = int(input())
    if a in myset:
        myset.remove(a)
    else:
        myset.add(a)
ans = len(myset)

print(ans)

Submission status: Runtime Error

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

myset = {}
for i in a:
    if i in myset:
        myset.remove(i)
    else:
        myset.add(i)
ans = len(myset)

print(ans)

Submission status: Runtime Error

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

ans = 0
max_a = max(a)
b = [0]*(max_a + 2)

for i in a:
    b[i] += 1

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

print(ans)

Submission status: Runtime Error

Solution code:
num = gets.to_i
hash = {}
num.times do |i|
  a = gets.to_i
  if hash.has_key?("#{a}")
	hash.delete("#{a}")
  else
    hash["#{a}"] = 0
  end
end

print hash.size

Submission status: Runtime Error

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

def fanc(n, a):
    if n == 1: 
        print(1)
        return 0
    cnt = 0
    while len(a) > 0:
        same_cnt = 1
        j = 1
        while a[0] == a[j]:
            same_cnt += 1
            if j == len(a) - 1:
                break
            j += 1
        if same_cnt  % 2 == 1:
            cnt += 1
        del a[0:same_cnt]
    print(cnt)
    return 0

fanc(n, a)

Submission status: Runtime Error

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

if len(a) == 1: cnt = 1
else: cnt = 0
while len(a) > 0:
    same_cnt = 1
    j = 1
    while a[0] == a[j]:
        same_cnt += 1
        if j == len(a) - 1:
            break
        j += 1
    if same_cnt  % 2 == 1:
        cnt += 1
    del a[0:same_cnt]
print(cnt)

Submission status: Runtime Error

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

cnt = 0
while len(a) > 0:
    same_cnt = 1
    j = 1
    while a[0] == a[j]:
        same_cnt += 1
        if j == len(a) - 1:
            break
        j += 1
    if same_cnt  % 2 == 1:
        cnt += 1
    del a[0:same_cnt]
print(cnt)

Submission status: Runtime Error

Solution code:
N = int(input())
a = []
for i in range(N):
    a.append(int(input()))
    
a.sort()
flag=False
ans = 0
i = 0
while i <= len(a) - 1:
    if a[i] != a[i+1]:
        ans += 1
        i += 1
        flag=True
    else:
        i += 2
        flag=False

if flag:
    ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
A = sorted(A)
ans = 0
prev = A[0]
cnt = 0
for a in A:
    if prev == a:
        cnt += 1
        prev = a
    else:
        if cnt % 2 == 1:
            ans += 1
        cnt = 1
        prev = a
if cnt %= 1:
    ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
A = {}
for i in range(N):
    a = int(input())
    if a in A:
        A[a] += 1
    else:
        A[a] = 1
ans = 0
for val in A.values:
    ans += val % 2
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
dic = {}
for _ in range(n):
  tmp = int(input())
  if tmp in dic and dic[tmp] == 1:
    dic[tmp] == 0
  else:
    dic[tmp] = 1
print(sum([*dic.values()]))

Submission status: Runtime Error

Solution code:
n = int(input())

a = {}
r = []
for i in range(n):
  s = int(input())
  if s in a:
    a[s] += 1
    if a[s] % 2 == 0:
      r.remove(s)
  else:
    a[s] = 1
    r.append(s)
    
print(len(r))

Submission status: Runtime Error

Solution code:
N = int(input())
arr = [int(input()) for _ in range(N)]
ans = [0] * (max(arr)+1)
for i in range(N):
    ans[arr[i]] += 1
a = 0
for i in ans:
    if i % 2 == 1:
        a += 1
print(a)

Submission status: Runtime Error

Solution code:
N = int(input())
content = [0]*(10**9+2)
for i in range(N):
    ai = int(input())
    if content[ai]==1:
        content[ai]=0
    else:
        content[ai]=1
print(sum(content))

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(10**6)

N = int(input())
content = [0]*(10**9+2)
for i in range(N):
    ai = int(input())
    if content[ai]==1:
        content[ai]=0
    else:
        content[ai]=1
print(sum(content))

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(10**6)

N = int(input())
content = [0]*(10**6+2)
for i in range(N):
    ai = int(input())
    if content[ai]==1:
        content[ai]=0
    else:
        content[ai]=1
print(sum(content))

Submission status: Runtime Error

Solution code:
n = int(input())

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

num_list.sort()
num_list2 = []
i = 0
while i < n:
    if num_list[i] == num_list[i+1]:
        i += 2
    else:
        num_list2.append(num_list[i])
        i += 1

print(len(num_list2))

Submission status: Runtime Error

Solution code:
import sys
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: Runtime Error

Solution code:
n=int(input())
a=sorted[int(input()) for _ in range(n)]
ans=0
k=1
for i in range(1,n):
  if a[i]==a[i-1]:
    k+=1
  else:
    ans+=k%2
    k=1
if a[n-2]==a[n-1]:
  ans+=k%2
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
a=sorted[int(input()) for _ in range(n)]
ans=0
k=1
for i in range(n):
  if a[i]==a[i-1]:
    k+=1
  else:
    ans+=k%2
    k=1
if a[n-2]==a[n-1]:
  ans+=k%2
print(ans)

Submission status: Runtime Error

Solution code:
print(len({int(input()) for i in int(input())}))

Submission status: Runtime Error

Solution code:
print({int(input()) for i in int(input())})

Submission status: Runtime Error

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

dict_ = dict()
for key in set(list_):
    dict_[key] += dict_.get(key, 0) + 1
print(sum(num % 2 for num in dict_.values()))