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: Accepted

Solution code:
def i1():
 return int(input())
def i2():
 return [int(i) for i in input().split()]
from collections import defaultdict
d = defaultdict(int)
n=i1()
a=0
for i in range(n):
    d[i1()]+=1
for i in d.values():
    if i%2==1:
      a+=1
print(a)

Submission status: Accepted

Solution code:
N = int(input())
s = set()
for i in range(N):
    j = int(input())
    if j in s:
        s.remove(j)
    else:
         s.add(j)

print(len(s))

Submission status: Accepted

Solution code:
from collections import Counter

n = int(input())
values = Counter([int(input()) for _ in range(n)])
ans = 0
for number in values.keys():
    if values[number] % 2 != 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A = set()
for _ in range(N):
  a = int(input())
  if a in A:
    A.remove(a)
  else:
    A.add(a)
print(len(A))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import heapq
import math

N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
A = sorted(A)
num = 0
bef = None
count = 0
for a in A:
    if bef is None:
        bef = a
    if bef == a:
        count += 1
    else:
        if count % 2 == 1:
            num += 1
        count = 1
    bef = a
if count % 2 == 1:
    num += 1

print(num)

Submission status: Accepted

Solution code:
n = int(input())
cnt = {}
for _ in range(n):
    a = int(input())
    if a in cnt:
        cnt[a] += 1
    else:
        cnt[a] = 1
ans = 0
for v in cnt.values():
    ans += v % 2
print(ans)

Submission status: Accepted

Solution code:
import copy
import sys
import numpy as np

from math import *
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [N] = [int(input_raw[0])]
    num_set = set([])
    for i in range(N):
        input_raw = read_func().strip().split()
        val = int(input_raw[0])
        if val not in num_set:
            num_set.add(val)
        else:
            num_set.remove(val)

    print len(num_set)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(raw_input())
res = set([])
for i in range(n) :
    x = int(raw_input())
    if x in res :
        res.remove(x)
    else :
        res.add(x)
print len(res)

Submission status: Accepted

Solution code:
N = int(raw_input())
d = {}
for n in xrange(N):
  a = int(raw_input())
  d[a] = d.get(a, 0) + 1

answer = 0
for x in d.itervalues():
  if x % 2 == 1:
    answer += 1

print answer

Submission status: Accepted

Solution code:
from collections import Counter

n = int(input())
cnt = Counter(int(input()) for _ in range(n))
print(sum(1 for k, v in cnt.most_common() if v % 2 == 1))

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
src = [int(input()) for i in range(N)]
counter = Counter(src)

ans = 0
for v in counter.values():
    if v%2 == 1:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8
def get_ln_inputs():
    return input().split()


def get_ln_int_inputs():
    return list(map(int, get_ln_inputs()))


def main():
    N = get_ln_int_inputs()[0]
    A = list()
    for _ in range(N):
        A.append(get_ln_int_inputs()[0])

    res = {}
    for a in A:
        if not a in res:
            res[a] = 1
        else:
            del res[a]
    print(len(res))
    return


main()

Submission status: Accepted

Solution code:
n = int(input())
h = set()
for i in range(n):
    a = int(input())
    if a in h:
        h.remove(a)
    else:
        h.add(a)
print(len(h))

Submission status: Accepted

Solution code:
n = int(input())

f = {}
for i in range(n):
    a = int(input())
    if not f.get(a):
        f[a] = True
    else:
        f[a] = None

print(sum(1 for i in f if f[i]))

Submission status: Accepted

Solution code:
# C
N = int(input())
P = dict()
for _ in range(N):
    A = int(input())
    if A not in P.keys():
        P[A] = 1
    else:
        P[A] = (P[A] + 1) % 2
        
print(sum(P.values()))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

n = int(input())
c = Counter(int(input()) for _ in range(n))
print(sum(v & 1 for v in c.values()))

Submission status: Accepted

Solution code:
d = dict()
for i in range(int(input())):
  elem = int(input())
  if elem in d:
    del d[elem]
  else:
    d[elem] = i
print(len(d))

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
gosa = 1.0 / 10**10
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    n = I()
    s = set()
    for _ in range(n):
        a = I()
        if a in s:
            s.remove(a)
        else:
            s.add(a)

    return len(s)

print(main())

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()
s = set()
for i in range(n):
    x = ni()
    if x in s:
        s.remove(x)
    else:
        s.add(x)
print(len(s))

Submission status: Accepted

Solution code:
from collections import Counter

def main():
    n = int(input())
    c = Counter()
    for _ in range(n):
        x = int(input())
        c[x] += 1
    ans = 0
    for cc in c.values():
        if cc % 2 == 1:
            ans += 1
    print(ans)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = input()
S = set()
for i in xrange(N):
    a = int(raw_input())
    if a in S:
        S.discard(a)
    else:
        S.add(a)
print len(S)

Submission status: Runtime Error

Solution code:
n=int(input())
L = [0]*(100001)
ans = 0
for  i in range(n):
  L[int(input())] += 1
print(sum([L[i]%2 for i in range(len(L))]))

Submission status: Runtime Error

Solution code:
n = int(input())
A = [0]*(10**9+5)
for i in range(n):
    a = int(input())
    A[a-1]+=1
    A[a-1]%=2
print(sum(A))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for _ in range(N):
  A.append(int(input()))
  
A.sort()

if N == 1:
  print(1)
  
else:
  for i in range(N-2):
    if A[i] != A[i+1]:
      L = len(A[:i+1])
      del A[:i+1]
      if L%2 == 1:
        ans += 1
      
  print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
a = set(int(input()) for i in range(n))
kami = []
a.sort()
for i in range(n) :
    if i in kami :
        kami.remove(i)
    else :
        kami.add(i)

print(len(kami))

Submission status: Runtime Error

Solution code:
import collections
n = int(input())
alist = [int(input()) for i in range(n)]
cole = collections.Counters(alist)
count = 0
for i in cole.values():
  if i%2==1:
    count+=1
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in A:
    if hantei[i]==0:
        hantei[i]="a"
    else:
        hantei[i]=0
print(hantei.count("a"))

Submission status: Runtime Error

Solution code:

for _ in range(int(raw_input())):
	v = int(raw_input())
	cc[v] += 1
	if cc[v] == 2:
		cc[v] = 0
s = 0
for k in cc:
	if cc[k] == 1:
		s +=1
print s

Submission status: Runtime Error

Solution code:
a.sort()
count = 0
temp = a[0]
tempcount = 1
for i in range(1,n):
    if a[i]==temp:
        tempcount += 1
    else:
        if not tempcount%2 == 0:
            count += 1
        tempcount = 1
    temp = a[i]
    #print(i,tempcount)
if tempcount%2 == 1:
    count += 1
print(count)

Submission status: Runtime Error

Solution code:
n = int(input())
a = [False] * int(1e9)

cnt = 0
for i in range(n):
    ai = int(input()) - 1
    a[ai] = not a[ai]

    if a[ai]:
        cnt += 1
    else:
        cnt -= 1

print(cnt)

Submission status: Runtime Error

Solution code:
n = int(input())
a = [False] * 100000

cnt = 0
for i in range(n):
    ai = int(input()) - 1
    a[ai] = not a[ai]

    if a[ai]:
        cnt += 1
    else:
        cnt -= 1

print(cnt)

Submission status: Runtime Error

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

n=int(readline().strip())
a=[int(readline().strip()) for _  in range(n)]
l=[0]*(max(a)+1)
for x in a:
  l[x]^=1
print(sum(l))

Submission status: Runtime Error

Solution code:
import sys
read=sys.stdin.read

n,*a=map(int,read().split())
l=[0]*(max(a)+1)
for x in a:
  l[x]^=1
print(sum(l))

Submission status: Runtime Error

Solution code:
import sys
read=sys.stdin.read

n,*a=map(int,read().split())
l=[0]*max(a)
for i in a:
  l[a]^=1
print(sum(l))

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
n, *a = map(int, open(0).read().split())
b = [0] * (10**5 + 1)
for i in a:
    b[i] += 1
print(sum(i % 2 > 0 for i in b))

Submission status: Runtime Error

Solution code:
import collections
n=int(input())
lst=[int(input()) for i in range(n)]
xs=list(set(lst))
ans=0
lst=collections.Counter(lst)
for i in xs:
  if lst[i]%=1:
    ans+=1

print(ans)

Submission status: Runtime Error

Solution code:
from collections import Counter
n = int(input())
l = []
for i in range(n):
   l.append(int(input()))
lcnt = Counter(l)
l_value = list(lcnt.values())
for i in range(len(l_value)):
   if  l_value[i]%2 == 0:
       l_value[i] = 0
  else:
       l_value[i] = 1    
print(sum(l_value))

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=set(a)
ans=0
for i in b:
  a.count(i)%2==1:
    ans+=1
print(ans)

Submission status: Runtime Error

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

a = sorted(a):
tmp = 0
ans = 0
for i in a:
    if i == tmp:
        ans -= 1
        tmp = 0
    else:
        ans += 1
        tmp = i
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(input()) for _ in range(N)]
cnt = [0] * 1000000
for i in A:
  if cnt[i] == 0:
    cnt[i] += 1
  else:
    cnt[i] = 0

print(cnt.count(1))

Submission status: Runtime Error

Solution code:
N = int(input())
s = [0]*(10**6)
for i in range(N):
    a = int(input())
    s[a-1] += 1
    s[a-1] = s[a-1]%2
print(sum(s))

Submission status: Runtime Error

Solution code:
N = int(input())
s = [0]*10**6
for i in range(N):
    a = int(input())
    s[a-1] += 1
    s[a-1] = s[a-1]%2
print(sum(s))

Submission status: Runtime Error

Solution code:
N = int(input())
ans = [0]*(10**9)

for _ in range(N):
    a = int(input())
    if ans[a-1] == 0:
        ans[a-1] += 1
    else:
        ans[a-1] = 0

print(sum(ans))

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

## Library

import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools

## input

# n=int(input())
# A,B,C,D=map(int, input().split())
# string = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]

N = int(input())
A = [int(input()) for _ in range(N)]
C = collections.Counter(A)
data = C.values()

ans = 0

for i in range(len(data)):
    if data[i] % 2 == 1:
        ans+=1

print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(input()) for _ in range(N)]
cnt = [0] * 100000000
for i in A:
  if cnt[i] == 0:
    cnt[i] += 1
  else:
    cnt[i] = 0

print(cnt.count(1))

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(input()) for _ in range(N)]
cnt = [0] * 10000000
for i in A:
  if cnt[i] == 0:
    cnt[i] += 1
  else:
    cnt[i] = 0

print(cnt.count(1))

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(input()) for _ in range(N)]
cnt = [0] * 1000000000
for i in A:
  if cnt[i] == 0:
    cnt[i] += 1
  else:
    cnt[i] == 0

print(1 in cnt)

Submission status: Runtime Error

Solution code:
n=int(input())
a=[int(input()) for i in range(n)]
a=sorted(a)
ans=[]
num=1
for i in range(n-1):
    if a[i]==a[i+1]:
        num+=1
    else:
        if num%2!=0:
            ans.append(current_a)
        if i+1==n-1:
            ans.append(current_a)
        num=1
print(len(ans))

Submission status: Runtime Error

Solution code:
n=int(input())
a=[int(input()) for i in range(n)]
a=sorted(a)
ans=[]
num=1
for i in range(n-1):
    if a[i]==a[i+1]:
        num+=1
    else:
        if num%2!=0:
            ans.append(current_a)
        if i+1==n:
            ans.append(current_a)
        num=1
print(len(ans))

Submission status: Runtime Error

Solution code:
N = int(input())
x = [0]*100000
count = 0

for i in range(N):
    a = int(input())
    if x[a-1] == 1:
            x[a-1] = 0
    else:
        x[a-1] += 1

print(x.count(1))

Submission status: Runtime Error

Solution code:
#-*-coding:utf-8-*-

def main():
    n = int(input())
    numbers=[]
    answers=[]
    number=0
    numbers=[int(input()) for _ in range(n)]

    for number in numbers:
        if len(answers)==0:
            answers.append(number)
        else:
            if number in answers:
                answers.pop(number)
            else:
                answers.append(number)
    print(len(answers))

if __name__=="__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
l = [int(input()) for _ in range(n)]
l.sort()
c = 1
t = l[0]
for i in l[1:]:
  if t == i:
    c += 1
  else:
    ans += c%2
    c = 1
    t = i
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
l = [int(input()) _ for in range(n)]
l.sort()
c = 1
t = l[0]
for i in l[1:]:
  if t == i:
    c += 1
  else:
    ans += c%2
    c = 1
    t = i
print(ans)

Submission status: Runtime Error

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

checklis = [0]*max(A)

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

print(sum(checklis))

Submission status: Runtime Error

Solution code:
n = int(input())
b=[0]*10**9
for i in range(n):
  j=int(input())-1
  if b[j]:
    b[j]=0
  else:
    b[j]=1
print(sum(b))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

b = list(set(a))

for j in b:
    a.remove(j)
for k in a:
    b.remove(k)

print(len(b))

Submission status: Runtime Error

Solution code:
from collections import Counter


def main():
    n = int(input())
    a = []
    for i in range(n):
        a.append(int(input()))
    counter = Counter(a)
    ans: int = 0
    for key, value in counter.items():
        if value % 2 == 1:
            ans += 1
    print(ans)


main()

Submission status: Runtime Error

Solution code:
N=int(input())
arr0=[]
arr1=[]
arr2=[]
arr3=[]
arr4=[]
arr5=[]
arr6=[]
arr7=[]
arr8=[]
arr9=[]
arrs=[arr0,arr1,arr2,arr3,arr4,arr5,arr6,arr7,arr8,arr9]

amount=0

for n in range(N):
    _=int(input())
    a = _//100000000
    if arrs[a].count(_)>=1:
        arrs[a].remove(_)
    else:
        arrs[a].append(_)

for x in range(len(arrs)):
    amount +=len(arrs[x])

print(amount)

Submission status: Runtime Error

Solution code:
def judge(N):
    return N//100000000

N=int(input())
arr0=[]
arr1=[]
arr2=[]
arr3=[]
arr4=[]
arr5=[]
arr6=[]
arr7=[]
arr8=[]
arr9=[]
arrs=[arr0,arr1,arr2,arr3,arr4,arr5,arr6,arr7,arr8,arr9]

amount=0

for n in range(N):
    _=int(input())
    a = judge (_)
    if arrs[a].count(_)>=1:
        arrs[a].remove(_)
    else:
        arrs[a].append(_)

for x in range(len(arrs)):
    amount +=len(arrs[x])

print(amount)

Submission status: Runtime Error

Solution code:
def judge(N):
    return N//100000000

N=int(input())
arr0=[]
arr1=[]
arr2=[]
arr3=[]
arr4=[]
arr5=[]
arr6=[]
arr7=[]
arr8=[]
arr9=[]
arrs=[arr0,arr1,arr2,arr3,arr4,arr5,arr6,arr7,arr8,arr9]

amount=0

for n in range(N):
    _=int(input())
    a = judge (_)
    if arrs[a].count(_)>1:
        arrs[a].remove(_)
    else:
        arrs[a].append(_)

for x in range(len(arrs)):
    amount +=len(arrs[x])

print(amount)

Submission status: Runtime Error

Solution code:
import math
N=int(input())
sisterN=[]
SISTERn=[]
SIStern=[]
for n in range(N):
    _=int(input())
    if _<40000:
        _s= _
        if sisterN.count(_s)==1:
            sisterN.remove(_s)
        else:
            sisterN.append(_s)
    elif 40001<_<99000:
        _m= _
        if SISterN.count(_m)==1:
            SISterN.remove(_m)
        else:
            SISterN.append(_m)
    elif 99001<_:
        _b= _
        if SISTERn.count(_b)==1:
            SISTERn.remove(_b)
        else:
            SISTERn.append(_b)

print(len(sisterN)+len(SISTERn)+len(SIStern))

Submission status: Runtime Error

Solution code:
N=int(input())
sisterN=[]
SISTERn=[]
SIStern=[]
for n in range(N):
    _=int(input())
    if _<40000:
        _s= _
        if sisterN.count(_s)==1:
            sisterN.remove(_s)
        else:
            sisterN.append(_s)
    elif 40001<_<99000:
        _m= _
        if SISterN.count(_m)==1:
            SISterN.remove(_m)
        else:
            SISterN.append(_m)
    elif 99001<_:
        _b= _
        if SISTERn.count(_b)==1:
            SISTERn.remove(_b)
        else:
            SISTERn.append(_b)

print(len(sisterN)+len(SISTERn)+len(SIStern))

Submission status: Runtime Error

Solution code:
N=int(input())
sisterN=[]
SISTERn=[]
SIStern=[]
for n in range(N):
    _=int(input())
    if _<40000:
        _s= _
        if sisterN.count(_s)==1:
            sisterN.remove(_s)
        else:
            sisterN.append(_s)
    elif 40001<_<99990:
        _m= _
        if SISterN.count(_m)==1:
            SISterN.remove(_m)
        else:
            SISterN.append(_m)
    else:
        _b= _
        if SISTERn.count(_b)==1:
            SISTERn.remove(_b)
        else:
            SISTERn.append(_b)

print(len(sisterN)+len(SISTERn)+len(SIStern))

Submission status: Runtime Error

Solution code:
N=int(input())
sisterN=[]
SISTERn=[]
SIStern=[]
for n in range(N):
    _=int(input())
    if _<40000:
        _s= _
        if sisterN.count(_s)==1:
            sisterN.remove(_s)
        else:
            sisterN.append(_s)
    elif 40001<_<99900:
        _m= _
        if SISterN.count(_m)==1:
            SISterN.remove(_m)
        else:
            SISterN.append(_m)
    else:
        _b= _
        if SISTERn.count(_b)==1:
            SISTERn.remove(_b)
        else:
            SISTERn.append(_b)

print(len(sisterN)+len(SISTERn)+len(SIStern))

Submission status: Runtime Error

Solution code:
N=int(input())
sisterN=[]
SISTERn=[]
SIStern=[]
for n in range(N):
    _=int(input())
    if _<40000:
        _s= _
        if sisterN.count(_s)==1:
            sisterN.remove(_s)
        else:
            sisterN.append(_s)
    elif 40001<_<99000:
        _m= _
        if SISterN.count(_m)==1:
            SISterN.remove(_m)
        else:
            SISterN.append(_m)
    else:
        _b= _
        if SISTERn.count(_b)==1:
            SISTERn.remove(_b)
        else:
            SISTERn.append(_b)

print(len(sisterN)+len(SISTERn)+len(SIStern))

Submission status: Runtime Error

Solution code:
N=int(input())
sisterN=[]
SISTERn=[]
SIStern=[]
for n in range(N):
    _=int(input())
    if _<30000:
        _s= _
        if sisterN.count(_s)==1:
            sisterN.remove(_s)
        else:
            sisterN.append(_s)
    elif 30001<_<90000:
        _m= _
        if SISterN.count(_m)==1:
            SISterN.remove(_m)
        else:
            SISterN.append(_m)
    else:
        _b= _
        if SISTERn.count(_b)==1:
            SISTERn.remove(_b)
        else:
            SISTERn.append(_b)

print(len(sisterN)+len(SISTERn)+len(SIStern))

Submission status: Runtime Error

Solution code:
N=int(input())
sisterN=[]
SISTERn=[]
SIStern=[]
for n in range(N):
    _=int(input())
    if _<30000:
        _s= _
        if sisterN.count(_s)==1:
            sisterN.remove(_s)
        else:
            sisterN.append(_s)
    elif 30001<_<90000:
        _m= _
        if SISterN.count(_m)==1:
            SISterN.remove(_m)
        else:
            SISterN.append(_m)
    else:
        _b= _
        if SISTERn.count(_b)==1:
            SISTERn.remove(_b)
        else:
            SISTERn.append(_b)
print(len(sisterN)+len(SISTERn)+len(SIStern))

Submission status: Runtime Error

Solution code:
N=int(input())
sisterN=[]
SISTERn=[]
SIStern=[]
for n in range(N):
    _=int(input())
    if _<30000:
        _s= _
        if sisterN.count(_s)==1:
            sisterN.remove(_s)
        else:
            sisterN.append(_s)
    elif 30001<_<80000:
        _m= _
        if SISterN.count(_m)==1:
            SISterN.remove(_m)
        else:
            SISterN.append(_m)
    else:
        _b= _
        if SISTERn.count(_b)==1:
            SISTERn.remove(_b)
        else:
            SISTERn.append(_b)
print(len(sisterN)+len(SISTERn)+len(SIStern))

Submission status: Runtime Error

Solution code:
N=int(input())
sisterN=[]
SISTERn=[]
SIStern=[]
for n in range(N):
    _=int(input())
    if _<30000:
        _s= _
        if sisterN.count(_s)==1:
            sisterN.remove(_s)
        else:
            sisterN.append(_s)
    elif 30001<_<70000:
        _m= _
        if SISterN.count(_m)==1:
            SISterN.remove(_m)
        else:
            SISterN.append(_m)
    else:
        _b= bin(_)
        if SISTERn.count(_b)==1:
            SISTERn.remove(_b)
        else:
            SISTERn.append(_b)
print(len(sisterN)+len(SISTERn)+len(SIStern))

Submission status: Runtime Error

Solution code:
N=int(input())
sisterN=[]
SISTERn=[]
SIStern=[]
for n in range(N):
    _=int(input())
    if _<30000:
        _s= _
        if sisterN.count(_s)==1:
            sisterN.remove(_s)
        else:
            sisterN.append(_s)
    elif 30001<_<70000:
        _m= _
        if SISterN.count(_m)==1:
            SISterN.remove(_m)
        else:
            SISterN.append(_m)
    else:
        _b= _
        if SISTERn.count(_b)==1:
            SISTERn.remove(_b)
        else:
            SISTERn.append(_b)
print(len(sisterN)+len(SISTERn)+len(SIStern))

Submission status: Runtime Error

Solution code:
N=int(input())
sisterN=[]
SISTERn=[]
for n in range(N):
    _=int(input())
    if _<50000:
        _= s_
        if sisterN.count(s_)==1:
            sisterN.remove(_s)
        else:
            sisterN.append(_s)

    else:
        _= b_
        if SISTERn.count(_b)==1:
            SISTERn.remove(_b)
        else:
            SISTERn.append(_b)
print(len(sisterN)+len(SISTERn))

Submission status: Runtime Error

Solution code:
N=int(input())
sisterN=[]
for n in range(N):
    _=int(input())
    sisterN.append(_)
for s in sisterN:
    if sisterN.count(sisterN[s])%2==0:
        sisterN.remove(sisterN[s])
print(len(sisterN))

Submission status: Runtime Error

Solution code:
N=int(input())
sisterN=(,)
for n in range(N):
    _=int(input())
    sisterN.append(_)
Ans=len(set(sisterN))
print(Ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
A=set()
for i in range(n):
    a=input()
    if a in A:
        A.remove(a)
    else:
        A.add(a)
print(len(A)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from collections import deque
n=int(input())
A=[]
for i in range(n):
    a=input()
    if a in A:
        A.append(a)
    else:
        A.remove(a)
print(len(A))

Submission status: Runtime Error

Solution code:
N = int(input())

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

arr.sort()
cnt = 0
num = 1

a = arr[0]

for i in range(1,N):
  if arr[i] == a:
    num += 1
  else:
    num = 1
    if num % 2 == 1:
      cnt += 1
printx(int(cnt))

Submission status: Runtime Error

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = [INT() for _ in range(N)]	

#dic = defaultdict(int)

for a in A:
	print(dic[a])
	dic[a] ^= 1

print(dic)
ans = 0
for x in dic:
	ans += dic[x]
print(ans)

Submission status: Runtime Error

Solution code:
import sys, re
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2
from collections import deque, defaultdict, Counter
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop, heapify
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, M, R = MAP()
r = LIST()
dist_matrix = [[INF]*N for _ in range(N)]

for _ in range(M):
	A, B, C = MAP()
	dist_matrix[A-1][B-1] = C
	dist_matrix[B-1][A-1] = C

for i in range(N):
	dist_matrix[i][i] = 0

#for i in range(N):
#	print(dist_matrix[i])
#print()

def Warshall_Floyd(dist, N):
	for k in range(N):
		for i in range(N):
			for j in range(N):
				dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j])

Warshall_Floyd(dist_matrix, N)

#for i in range(N):
#	print(dist_matrix[i])


ans = INF
for x in permutations(r):
	tmp = x[0]
	dis = 0
	for i in range(1, R):
		dis += dist_matrix[tmp-1][x[i]-1]
		tmp = x[i]
	ans = min(ans, dis)
	
print(int(ans))

Submission status: Runtime Error

Solution code:

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(readline())
a = [0]*(10**5+1)
for i in range(N):
    a[int(input())]+=1

res = 0
for i in range(1,10**5+1):
    if a[i]%2:
        res+=1

print(res)

Submission status: Runtime Error

Solution code:

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(readline())
a = [0]*(10**5+1)
for i in range(N):
    a[int(readline())]+=1

res = 0
for i in range(1,10**5+1):
    if a[i]%2:
        res+=1

print(res)

Submission status: Runtime Error

Solution code:
from collections import defaultdict
readline = sys.stdin.buffer.readline
N = int(readline())

NUMBERS = defaultdict(bool)

for _ in range(N):
  n = int(readline())
  NUMBERS[n] = not NUMBERS[n]

ans = 0
for k,v in NUMBERS.items():
  if v:
    ans += 1

print(ans)

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)