ZhenlongDai/ACPR huggingface dataset:
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a=[]
for i in range(n):
    a.append(int(input()))
a.sort()
cnt = 1
ans = 0
for i in range(n-1):
    if a[i]==a[i+1]:
        cnt += 1
    else:
        ans += cnt%2
        cnt = 1
print(ans)



Failing test case input:
4
-1
0
6
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
a=[]
for i in range(n):
    a.append(int(input()))
a.sort()
cnt = 1
ans = 0
for i in range(n-1):
    if a[i]==a[i+1]:
        cnt += 1
    else:
        ans += cnt%2
        cnt = 1
ans += cnt%2
print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
s = set()
for i in range(N):
	a = input
	if a in s:
		s.remove(a)
	else:
		s.add(a)
print(len(s))

Failing test case input:
4
-2
0
5
3

Expected output:
4


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
s = set()
for i in range(N):
	a = input()
	if a in s:
		s.remove(a)
	else:
		s.add(a)
print(len(s))

Problem: p03607
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import collections

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

cc = dict(collections.Counter(lst))
ans = 0
for i in cc.values():
  if (i == 1):
    ans += 1
print(ans)

Failing test case input:
3
1
1
1

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
import collections

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

cc = dict(collections.Counter(lst))
ans = 0
for i in cc.values():
  if (i % 2 != 0):
    ans += 1
print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
cnt = 1
ans = 0
for i in range(1,N):
    if A[i-1] == A[i]:
        cnt += 1
    else:
        ans += cnt%2
        cnt = 1
if cnt > 1:
    ans += cnt%2
print(ans)

Failing test case input:
4
-5
1
4
0

Expected output:
4


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
cnt = 1
ans = 0
if len(A) == 1:
    print(1)
    exit()
for i in range(1,N):
    if A[i-1] == A[i]:
        cnt += 1
    else:
        ans += cnt%2
        cnt = 1
if cnt >= 1:
    ans += cnt%2
print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
list=[]
ans=0
sa=1
sas=0
for i in range(n):
    a=int(input())
    list.append(a)
list=sorted(list)
list.append(100000000)
print(list)
for i in range(n+1):
    if i!=0:
        if list[i]==list[i-1]:
            sa+=1
        else:
            sas=sa
            sa=1
            if sas%2!=0:
                ans+=1
print(ans)

Failing test case input:
3
6
2
7

Expected output:
3


Actual output:
[2, 6, 7, 100000000]
3


Fixed submission (verdict: Accepted):
n=int(input())
list=[]
ans=0
sa=1
sas=0
for i in range(n):
    a=int(input())
    list.append(a)
list=sorted(list)
list.append(10000000000)
for i in range(n+1):
    if i!=0:
        if list[i]==list[i-1]:
            sa+=1
        else:
            sas=sa
            sa=1
            if sas%2!=0:
                ans+=1
print(ans)
Problem: p03607
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = []
for i in range(n):
  a.append(int(input()))
a.sort()
jud = 1
q = a[0]
ans = 0
for i in range(1,n):
  if(q==a[i]):
    jud += 1
  else: 
    if(jud%2==1):
      ans += 1
    jud = 1
    q = a[i]
if (jud%2==1)and(jud>2):
  ans += 1
if(n==1):
  ans = 1
print(ans)


Failing test case input:
4
-1
0
2
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
a = []
for i in range(n):
  a.append(int(input()))
a.sort()
jud = 1
q = a[0]
ans = 0
for i in range(1,n):
  if(q==a[i]):
    jud += 1
  else: 
    if(jud%2==1):
      ans += 1
    jud = 1
    q = a[i]
if (jud%2==1):
  ans += 1
if(n==1):
  ans = 1
print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
N = int(input())
A = []
for _ in range(N):
    A.append(int(input())) 




if N == 1:
    print(1)
    sys.exit()

if set(A) == 1:
    print(1)
    sys.exit()

A = sorted(A)


count = 0
ans = 0
firstnum = A[0] 
for i in range(1,N):
    if firstnum == A[i]:
        count = count + 1
    
    elif firstnum != A[i]:
        if count == 0 or count % 2 == 0:
            ans = ans + 1
            count = 0
        else:
            count = 0

    firstnum = A[i]  
print(ans)

Failing test case input:
4
0
1
5
3

Expected output:
4


Actual output:
3


Fixed submission (verdict: Accepted):
import sys
N = int(input())
A = []
for _ in range(N):
    A.append(int(input())) 



if N == 1:
    print(1)
    sys.exit()

if set(A) == 1:
    print(0)
    sys.exit()

A = sorted(A)


count = 1
ans = 0
firstnum = A[0] 
for i in range(1,N):
    if firstnum == A[i]:
        count = count + 1
    else:
        if count % 2 == 0:
            count = 1
        else:
            ans = ans + 1
            count = 1

    firstnum = A[i]  

if count%2 == 0:
  ans = ans +0
else:
  ans = ans + 1
print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
alist = sorted([int(input()) for x in range(N)])

tmpNum = 0
cnt = 0
ans = 0
for i in range(N):
	if i == 0:
		tmpNum = alist[i]
		cnt = 1
	else:
		if tmpNum == alist[i]:
			cnt = cnt + 1
		else:
			if cnt % 2 != 0:
				ans = ans + 1
			tmpNum = alist[i]
			cnt = 1

print(ans)

Failing test case input:
6
7
7
63
27
6
19

Expected output:
4


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
alist = sorted([int(input()) for x in range(N)])

tmpNum = alist[0]
cnt = 1
ans = 0
for i in range(1, N):
	num = alist[i]
	if tmpNum == num:
		cnt = cnt + 1
		if i == N-1 and cnt % 2 != 0:
			ans = ans + 1
	else:
		if cnt % 2 != 0:
			ans = ans + 1
		tmpNum = num
		cnt = 1
		if i == N-1:
			ans = ans + 1

if len(alist) == 1:
	ans = ans + 1


print(ans)
Problem: p03607
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
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
    if j >= n:
        cnt += 1 
        break
    while a[i] == a[j]:
        chk += 1
        j += 1
        if j >= n:
            break
    if chk%2 == 1:
        cnt += 1 
    i = j
print(cnt)

Failing test case input:
3
-1
2
7

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
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 = 1
    if j >= n:
        cnt += 1 
        break
    while a[i] == a[j]:
        chk += 1
        j += 1
        if j >= n:
            break
    if chk%2 == 1:
        cnt += 1 
    i = j
print(cnt)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ans = 0
n = int(input())
l = [int(input()) for _ in range(n)]
l.sort()
c = 1
for i in range(n-1):
  if l[i] == l[i+1]:
    c += 1
  else:
    if c%2 != 0:
      ans += 1
    c = 1
if l[-2] != l[-1]:
  ans += 1
print(ans)

Failing test case input:
3
1
1
1

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
l = [int(input()) for _ in range(n)]
l.sort()
c = 1
ans = 0
for i in range(1, n):
  if l[i-1] == l[i]:
    c += 1
  else:
    ans += c%2
    c = 1
if c != 1:
  ans += c%2
else:
  ans += 1
print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
ans = 0
a = A[0]
n = 0
if N == 1:
    print(1)
    sys.exit()
for i in range(N):
    if a == A[i]:
        n += 1
    else:
        if n % 2 == 1:
            ans += 1
        n = 1
        a = A[i]
    
if A[-1] == A[-2] and n % 2 == 1:
    ans += 1
print(ans)

Failing test case input:
4
-2
1
4
0

Expected output:
4


Actual output:
3


Fixed submission (verdict: Accepted):
import sys
N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
ans = 0
a = A[0]
n = 0
if N == 1:
    print(1)
    sys.exit()
for i in range(N):
    if a == A[i]:
        n += 1
    else:
        if n % 2 == 1:
            ans += 1
        n = 1
        a = A[i]
    
if A[-1] == A[-2] and n % 2 == 1:
    ans += 1
elif A[-1] != A[-2] and n % 2 == 1:
    ans += 1
print(ans)
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=[int(input())for i in range(n)]
a.sort()
memo=a[0]
ans=0
cnt=0
for i in range(n):
    if a[i]==memo:
        cnt+=1
        if i==n-1:
            if cnt%2!=0:
                ans+=1
    else:
        if cnt%2!=0:
            ans+=1
        cnt=1
    memo=a[i]
print(ans)

Failing test case input:
6
7
31
77
35
11
12

Expected output:
6


Actual output:
5


Fixed submission (verdict: Accepted):
n=int(input())
a=[int(input())for i in range(n)]
a.sort()
memo=a[0]
ans=0
cnt=0
for i in range(n):
    if a[i]==memo:
        cnt+=1
        if i==n-1:
            if cnt%2!=0:
                ans+=1
    else:
        if cnt%2!=0:
            ans+=1
        if i==n-1:
            ans+=1
        cnt=1

    memo=a[i]
print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(input()) for i in range(N)]
array = []
ans = 0
A.sort()
count = 0

for i in range(N):
  if i == 0:
    count = 1
    
  elif A[i] == A[i-1]:
    count += 1
    
  elif A[i] != A[i-1]:
    if count % 2 == 1:
      ans += 1
    count = 1
    
print(ans)


Failing test case input:
4
3
5
9
1

Expected output:
4


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
A = [int(input()) for i in range(N)]
array = []
ans = 0
A.sort()
count = 0

for i in range(N):
  count += 1
  if i == N-1:
    if count%2 == 1:
      ans += 1

    


    
  elif A[i] != A[i+1]:
    if count % 2 == 1:
      ans += 1

    count = 0

print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())

A=[int(input()) for i in range(N)]
A.sort()
ans=0

flag=False

for i in range(N-1):
	if flag:
		flag=False
	elif A[i]==A[i+1]:
		flag=True
	else:
		ans+=1
print(ans)

Failing test case input:
4
-5
2
4
0

Expected output:
4


Actual output:
3


Fixed submission (verdict: Accepted):
N=int(input())

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

flag=False

for i in range(N-1):
	if flag==True:
		flag=False
		continue
	elif A[i]==A[i+1]:
		ans-=2
		flag=True

print(ans)

Problem: p03607
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = [int(input()) for i in range(n)]
ans = 0
a.sort()
cnt = 1
for i in range(1, n):
  if a[i-1] == a[i]:
    cnt += 1
  else:
    if cnt % 2 == 1:
      ans += 1
    cnt = 1
print(ans)

Failing test case input:
4
-1
0
9
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
from collections import Counter
n = int(input())
a = [int(input()) for i in range(n)]
c = Counter(a).values()
ans = 0
for i in c:
    if i % 2 == 1:
        ans += 1
print(ans)
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
A = {}
for i in range(n):
    a = int(input())
    if a not in A: A[a] = 1
    else: A[a] = 0
c = 0
for i in A:
    if A[i] == 1:
        c += 1
print(c)

Failing test case input:
4
0
0
4
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
A = {}
for i in range(n):
    a = int(input())
    if a not in A: A[a] = 1
    else: A[a] += 1
c = 0
for i in A:
    if A[i] % 2 == 1:
        c += 1
print(c)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
ans = 0
a = A[0]
n = 0
for i in range(N):
    if a == A[i]:
        n += 1
    else:
        if n % 2 == 1:
            ans += 1
        n = 1
        a = A[i]
    
if A[-1] == A[-2] and n % 2 == 1:
    ans += 1
print(ans)

Failing test case input:
3
1
1
11

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
import sys
N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
ans = 0
a = A[0]
n = 0
if N == 1:
    print(1)
    sys.exit()
for i in range(N):
    if a == A[i]:
        n += 1
    else:
        if n % 2 == 1:
            ans += 1
        n = 1
        a = A[i]
    
if A[-1] == A[-2] and n % 2 == 1:
    ans += 1
elif A[-1] != A[-2] and n % 2 == 1:
    ans += 1
print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ans = 0
n = int(input())
l = [int(input()) for _ in range(n)]
l.sort()
c = 1
for i in range(n-1):
  if l[i] == l[i+1]:
    c += 1
  else:
    if c%2 != 0:
      ans += 1
    c = 1
print(ans)

Failing test case input:
6
10
34
63
27
21
19

Expected output:
6


Actual output:
5


Fixed submission (verdict: Accepted):
n = int(input())
l = [int(input()) for _ in range(n)]
l.sort()
c = 1
ans = 0
for i in range(1, n):
  if l[i-1] == l[i]:
    c += 1
  else:
    ans += c%2
    c = 1
if c != 1:
  ans += c%2
else:
  ans += 1
print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
l = {}
for i in range(n):
  a = int(input())
  if a in l:
    l[a] = 0
  else:
    l[a] = 1
    
print(sum(l.values()))


Failing test case input:
4
0
0
6
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
l = {}
for i in range(n):
  a = int(input())
  if a in l:
    l[a] +=1
  else:
    l[a] = 1
ans = 0
for i in l.values():
    if i % 2 == 1:
        ans += 1
print(ans)
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import math

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
   
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N=int(input())
cnt=0
li=[]

for _ in range(N):
	li.append(int(input()))
	
so=sorted(li)
ct=1

for i in range(N-1):
	if so[i]==so[i+1]:
		ct+=1
	else:
		if ct%2==1:
			cnt+=1
		ct=1

if N==1:
	print(1)
else:	
	print(cnt)
			


Failing test case input:
6
7
34
69
35
19
16

Expected output:
6


Actual output:
5


Fixed submission (verdict: Accepted):
import sys
import math

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
   
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N=int(input())
cnt=0
li=[]

for _ in range(N):
	li.append(int(input()))
	
so=sorted(li)
ct=1

for i in range(N-1):
	if so[i]==so[i+1]:
		ct+=1
	else:
		cnt+=ct%2
		ct=1
		
cnt+=ct%2



if N==1:
	print(1)
else:	
	print(cnt)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
s=set()
for i in range(n):
    s^=set(input())
print(len(s))


Failing test case input:
6
7
25
69
35
19
16

Expected output:
6


Actual output:
3


Fixed submission (verdict: Accepted):
n=int(input())
s=set()
for i in range(n):
    s ^= {input()}
print(len(s))

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
from collections import Counter
c = []
for i in range(N):
    c.append(int(input()))

c=Counter(c)
print(sum([1 for k, v in c.items() if v % 2 == 0]))

Failing test case input:
3
6
2
7

Expected output:
3


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
from collections import Counter
c = []
for i in range(N):
    c.append(int(input()))

c=Counter(c)
print(sum([1 for k, v in c.items() if v % 2 != 0]))

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
p=[]
count=0
for i in range (N):
  a=int(input())
  p.append(a)
list.sort(p)
flag=1
for j in range (N-1):
  if p[j]==p[j+1]:
    flag*=-1
  else:
    if flag>0:
      count+=1
    flag=1
if flag<0:
  count+=1
print(count)

Failing test case input:
4
-1
0
9
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
N=int(input())
p=[]
count=0
for i in range (N):
  a=int(input())
  p.append(a)
list.sort(p)
flag=1
for j in range (N-1):
  if p[j]==p[j+1]:
    flag*=-1
  else:
    if flag>0:
      count+=1
    flag=1
if flag>0:
  count+=1
print(count)
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


from collections import Counter
N = int(input())
A = [list(map(int,input().split())) for _ in range(N)]

def main(n,a):
    b = []
    for j in range(n):
        b.append(a[j][0])
        
    count = 0
    c = Counter(b)
    for i in range(n):
        if c[b[i]] % 2 != 0:
            count += 1
    print(count)
main(N,A)

Failing test case input:
4
0
0
6
0

Expected output:
2


Actual output:
4


Fixed submission (verdict: Accepted):


from collections import Counter
N = int(input())
A = [list(map(int,input().split())) for _ in range(N)]

def main(n,a):
    b = []
    for j in range(n):
        b.append(a[j][0])
        
    count = 0
    c = Counter(b)
    b_new = list(set(b))
    for i in range(len(c)):
        if c[b_new[i]] % 2 != 0:
            count += 1
    print(count)
main(N,A)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a = set()
for i in range(N):
  a = a ^ set(input())
print (len(a))

Failing test case input:
6
4
47
28
35
18
12

Expected output:
6


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
a = set()
for i in range(N):
  a ^= {input()}
print (len(a))

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter

N = int(input())
a = Counter(list(map(int, input().split())))

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

Failing test case input:
4
-5
1
4
0

Expected output:
4


Actual output:
1


Fixed submission (verdict: Accepted):
from collections import Counter

N = int(input())
a = []
for _ in range(N):
    a.append(int(input()))
    
a = Counter(a)
ans = 0
for value in a.values():
    if value % 2 == 1:
        ans += 1
print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = set()
for i in range(n):
  s = s ^ set(input()) 
print(len(s))

Failing test case input:
6
8
31
99
35
11
12

Expected output:
6


Actual output:
5


Fixed submission (verdict: Accepted):
N=int(input())
s=set()
for i in range(N):s^={input()}
print(len(s))

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))

a.sort()
erased = 0
ans = 0
for i in range(1,n):
    if a[i-1] == a[i]:
        erased = (erased+1)%2
    else:
        if erased == 0:
            ans += 1
        erased = 0
print(ans)

Failing test case input:
3
0
3
7

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))

a.sort()
a.append(0)
erased = 0
ans = 0
for i in range(1,n+1):
    if a[i-1] == a[i]:
        erased = (erased+1)%2
    else:
        if erased == 0:
            ans += 1
        erased = 0
print(ans)
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = [int(input()) for _ in range(n)]

result = {}
for a_i in a:
    if not a_i in result:
        result[a_i] = 1
    else:
        result[a_i] = 0
print(list(result.values()).count(1))


Failing test case input:
4
0
0
6
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
a = [int(input()) for _ in range(n)]

result = {}
for a_i in a:
    if not a_i in result or 0 == result[a_i]:
        result[a_i] = 1
    else:
        result[a_i] = 0
print(list(result.values()).count(1))

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
loops = int(input())
d = {}

for _ in range(loops):
    key = input()
    if key not in d:
        d[key] = 1
    else:
        d[key] = 0
print(sum(d.values()))


Failing test case input:
4
0
0
4
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
loops = int(input())
d = {}


for _ in range(loops):
    key = input()
    if key not in d: 
        d[key] = 1
    else:
        d[key] += 1


ans = 0
for k,v in d.items():
    if v % 2 != 0:
        ans += 1
print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
paper = {}
for _ in range(n):
    x = int(input())
    if x in paper:
        paper[x] += 1
    else:
        paper[x] = 1
count = 0
for i in paper.values():
    if i % 2 == 0: count += 1
print(count)

Failing test case input:
6
10
34
63
35
21
19

Expected output:
6


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
paper = {}
for _ in range(n):
    x = int(input())
    if x in paper:
        paper[x] += 1
    else:
        paper[x] = 1
count = 0
for i in paper.values():
    if i % 2 != 0: count += 1
print(count)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
l=[]
for i in range(n):
  m=int(input())
  l.append(m)
c=0
d=0
e=l[0]
l=sorted(l)
for i in range(1,n):
  if l[i]!=e:
    if d%2==1:
      c+=1
    e=l[i]
    d=1
  else:
    d+=1
print(c)

Failing test case input:
4
-2
0
5
1

Expected output:
4


Actual output:
2


Fixed submission (verdict: Accepted):
n=int(input())
l=[]
for i in range(n):
  m=int(input())
  l.append(m)
l=sorted(l)
c=0
d=1
e=l[0]
for i in range(1,n):
  if l[i]!=e:
    if d%2==1:
      c+=1
    e=l[i]
    d=1
  else:
    d+=1
if d%2==1:
  c+=1
print(c)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())

nlll = {}
    
for i in range(n):
    aaa = int(input())
    if aaa in nlll:
        del aaa
    else:
        nlll.update({aaa:1})

sums = 0
for i in nlll.values():
    sums = sums + i
print(sums)

Failing test case input:
3
1
0
1

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())

nlll = {}
    
for i in range(n):
    aaa = int(input())
    if aaa in nlll:
        del nlll[aaa]
    else:
        nlll.update({aaa:1})

sums = 0
for i in nlll.values():
    sums = sums + i
print(sums)
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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:
    if num % 2 == 1:
      cnt += 1
    num = 1
    a = arr[i]
print(int(cnt))


Failing test case input:
4
-2
0
5
1

Expected output:
4


Actual output:
3


Fixed submission (verdict: Accepted):
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:
    if num % 2 == 1:
      cnt += 1
    num = 1
    a = arr[i]
if num % 2 == 1:
  cnt += 1

print(int(cnt))

Problem: p03607
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
A = [int(input()) for _ in range(N)]
A=sorted(A)
 
ans=0
cnt=1
tmp=A[0]
 
for i in range(1,N):
    if A[i]==tmp:
        cnt+=1
    elif A[i]!=tmp and cnt%2!=0:
        cnt=1
        ans+=1
    tmp=A[i]
if cnt%2 ==1:
  ans+=1
print(ans)

Failing test case input:
3
0
0
7

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
A = [int(input()) for _ in range(N)]
A=sorted(A)
 
ans=0
cnt=1
tmp=A[0]
 
for i in range(1,N):
    if A[i]==tmp:
        cnt+=1
    else:
        if cnt%2!=0:
            ans+=1
        cnt=1
    tmp=A[i]
    
if cnt%2==1:
    ans+=1
print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
temp=set()
for i in range(0,n):
  a=int(input())
  if a not in temp:
    temp.add(str(a))
  else:
    temp.remove(str(a))
print(len(temp))

Failing test case input:
4
0
1
4
0

Expected output:
2


Actual output:
3


Fixed submission (verdict: Accepted):
n=int(input())
temp=set()
for i in range(0,n):
  a=int(input())
  if a not in temp:
    temp.add(a)
  else:
    temp.discard(a)
print(len(temp))

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
ans = 0
n = []
for i in range(N):
  n.append(int(input()))
n.sort()
i=0
while(i<N-1):
  cnt=1
  tmp=n[i]
  if n[i+1]==tmp:
    cnt+=1
    i+=1
  if cnt%2==1:
    ans+=1
  i+=1

print(ans)

Failing test case input:
3
-1
1
7

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
ans = 0
n = []
for i in range(N):
  n.append(int(input()))
n.sort()
i=0
cnt = 1
while(i<N-1):
  if n[i] == n[i+1]:
    cnt+=1
  else:
    if cnt%2==1:
      ans+=1
    cnt = 1
    
  i+=1
if cnt%2==1:
  ans+=1

print(ans)
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
list=[]
ans=0
sa=1
sas=0
for i in range(n):
    a=int(input())
    list.append(a)
list=sorted(list)
for i in range(n):
    if i!=0:
        if list[i]==list[i-1]:
            sa+=1
        else:
            sas=sa
            sa=1
            if sas%2!=0:
                ans+=1
if sa==1:
    print(ans+1)
else:
    print(ans)

Failing test case input:
3
1
1
1

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
n=int(input())
list=[]
ans=0
sa=1
sas=0
for i in range(n):
    a=int(input())
    list.append(a)
list=sorted(list)
list.append(10000000000)
for i in range(n+1):
    if i!=0:
        if list[i]==list[i-1]:
            sa+=1
        else:
            sas=sa
            sa=1
            if sas%2!=0:
                ans+=1
print(ans)

Problem: p03607
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
C = {}
for _ in range(n):
    a = input()
    if a not in C:
        C[a] = 0
    C[a] += 1
print(C)
for i in C.keys():
    C[i] %= 2
print(sum(C.values()))

Failing test case input:
3
-1
0
7

Expected output:
3


Actual output:
{'-1': 1, '0': 1, '7': 1}
3


Fixed submission (verdict: Accepted):
n = int(input())
C = {}
for _ in range(n):
    a = input()
    if a not in C:
        C[a] = 0
    C[a] += 1
for i in C.keys():
    C[i] %= 2
print(sum(C.values()))

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
l=[]
for i in range(n):
  m=int(input())
  l.append(m)
c=0
d=1
e=l[0]
l=sorted(l)
for i in range(1,n):
  if l[i]!=e:
    if d%2==1:
      c+=1
    e=l[i]
    d=1
  else:
    d+=1
if d%2==1:
  c+=1
print(c)


Failing test case input:
3
6
2
7

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
n=int(input())
l=[]
for i in range(n):
  m=int(input())
  l.append(m)
l=sorted(l)
c=0
d=1
e=l[0]
for i in range(1,n):
  if l[i]!=e:
    if d%2==1:
      c+=1
    e=l[i]
    d=1
  else:
    d+=1
if d%2==1:
  c+=1
print(c)

Problem: p03607
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
d={}
for i in range(n):
  A=int(input())
  if A not in d:
    d[A]=1
  elif d[A]==1:
    d[A]==0
  else:
    d[A]=1
print(sum(d.values()))

Failing test case input:
3
0
0
11

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
n=int(input())
d={}
for i in range(n):
  A=int(input())
  if A not in d:
    d[A]=1
  elif d[A]==1:
    d[A]=0
  else:
    d[A]=1
print(sum(d.values()))

Problem: p03607
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n=int(input())
a= [int(input()) for i in range(n)] 

a.sort()
b=0
ans=0

for i in a:
    if b != i:
        ans+=1
    else:
        ans-=1
    b=i
print(ans) 


Failing test case input:
3
1
0
18

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
n=int(input())
a= [int(input()) for i in range(n)] 

a.sort()
ans=0
m=1

for i in range(1,n):
    if a[i-1] == a[i]:
        m+=1
    else:
        ans+=(m%2)
        m=1

ans+=(m%2)

print(ans)
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
time = int(input())
ans = []
i = 0
for i in range(time):
    ans.append(input())
ans.sort(key=int)
while i+1 < len(ans):
    if ans[i] == ans[i+1]:
        del ans[i]
        del ans[i]
    else:
        i += 1
print(len(ans))

Failing test case input:
4
0
0
4
0

Expected output:
2


Actual output:
4


Fixed submission (verdict: Accepted):
time = int(input())
ans = []
n = 0
for i in range(time):
    ans.append(input())
ans.sort(key=int)
while n+1 < len(ans):
    if ans[n] == ans[int(n + 1)]:
        ans.pop(n)
        ans.pop(n)
    else:
        n += 1
print(len(ans))

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=[]
for i in range(n):
	a.append(int(input()))
a.sort()

now=a[0]
odd=0
ans=0
for i in range(n):
	if a[i]==now:
		odd=(odd+1)%2
	else:
		if odd==1:
			ans+=1
		if i+1<n:
			now=a[i+1]
			odd=0
print(ans+odd)

Failing test case input:
4
2
5
5
2

Expected output:
0

Actual output:
1


Fixed submission (verdict: Accepted):
n=int(input())
a=[]
for i in range(n):
	a.append(int(input()))
a.sort()

now=a[0]
odd=0
ans=0
for i in range(n):
	
	if a[i]==now:
		odd=(odd+1)%2
	
	else:
		
		ans+=odd
		
		now=a[i]
		odd=1

print(ans+odd)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
ans = 0
nums = []
for _ in range(N):
    A = int(input())
    if A in nums:
        ans -= 1
        nums.remove(A)
    else:
        ans += 1
        nums.append(A)
print(A)


Failing test case input:
3
0
1
19

Expected output:
3


Actual output:
19


Fixed submission (verdict: Accepted):
N = int(input())
ans = 0
nums = set()
for _ in range(N):
    A = int(input())
    if A in nums:
        ans -= 1
        nums.remove(A)
    else:
        ans += 1
        nums.add(A)
print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = [int(input()) for i in range(n)]
dict = {}
for i in a:
    if i in dict:
        if i in dict:
            dict[i] += 1
        else:
            dict[i] = 1
ans = 0
for i in dict:
    if dict[i]%2==0:
        continue
    else:
        ans += 1
print(ans)

Failing test case input:
4
3
5
5
2

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
a = [int(input()) for i in range(n)]
dict = {}
for i in a:
    if i in dict:
        dict[i] += 1
    else:
        dict[i] = 1
ans = 0
for i in dict:
    if dict[i]%2==0:
        continue
    else:
        ans += 1
print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=[int(input()) for i in range(n)]
a=sorted(a)
x=a[0]
c=1
ct=0
for i in range(1,n):
  if a[i]==x:
    c+=1
  else:
    if c%2==1:
      ct+=1
    x=a[i]
    c=1
print(ct)

Failing test case input:
3
1
1
10

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
n=int(input())
a=[int(input()) for i in range(n)]
a=sorted(a)
x=a[0]
c=1
ct=0
for i in range(1,n):
  if a[i]==x:
    c+=1
    if i==n-1:
      if c%2==1:
        ct+=1
  else:
    if c%2==1:
      ct+=1
    x=a[i]
    c=1
    if i==n-1:
      ct+=1
print(ct)
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


import math

n = int(input())

t=[]
for i in range(0,n):
	t.append(0)
for i in range(0,n):
    t[i] = int(input())
t.sort()

sum=0
tmp=t[0]
tmpnum=1
for i in range(1,n):
	if(t[i]==tmp):
		tmpnum+=1
		if(i==n-1):
			sum+=tmpnum%2
	else:
		tmp=t[i]
		sum+=tmpnum%2
		tmpnum=1
print(sum)

Failing test case input:
3
0
1
19

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):


import math

n = int(input())

t=[]
for i in range(0,n):
	t.append(0)
for i in range(0,n):
    t[i] = int(input())
t.sort()

sum=0
tmp=t[0]
tmpnum=1
for i in range(1,n):
	if(t[i]==tmp):
		tmpnum+=1
	else:
		tmp=t[i]
		sum+=tmpnum%2
		tmpnum=1
	if(i==n-1):
		sum+=tmpnum%2
print(sum)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=dict()
for i in range(N):
	tmp=int(input())
	if not tmp in A:
		A[tmp]=1
	else:
		A[tmp]=0
print(sum(A.values()))

Failing test case input:
4
0
0
6
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
N=int(input())
A=dict()
for i in range(N):
	tmp=int(input())
	if not tmp in A:
		A[tmp]=1
	elif A[tmp]==1:
		A[tmp]=0
	else:
		A[tmp]=1
print(sum(A.values()))

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
na = []
cou = []
count = 0
for i in range(n):
    a = int(input())
    na.append(a)
for j in range(n):
    if na[j] in cou:
        count -= 1
    else:
        count += 1
        cou.append(na[j])
print(count)

Failing test case input:
4
0
0
4
0

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
import collections
n = int(input())
na = []
count = 0
for i in range(n):
    a = int(input())
    na.append(a)
ans = collections.Counter(na)
for j in ans.values():
    if j % 2 == 1:
        count += 1
print(count)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())

s=set()

for i in range(n):
    s^=set(input())
print(len(s))

Failing test case input:
6
13
7
63
27
4
0

Expected output:
6


Actual output:
5


Fixed submission (verdict: Accepted):
n=int(input())

s=set()

for i in range(n):
    s^={input()}
print(len(s))

Problem: p03607
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
A = [int(input()) for _ in range(N)]
A=sorted(A)

ans=0
cnt=1
tmp=A[0]

for i in range(1,N):
    if A[i]!=tmp and cnt%2==0:
        tmp=A[i]
        cnt=1
    elif A[i]!=tmp and cnt%2!=0:
        tmp=A[i]
        cnt=1
        ans+=1
    elif A[i]==tmp:
        cnt+=1

print(ans)

Failing test case input:
4
-2
0
1
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
N = int(input())
A = [int(input()) for _ in range(N)]
A=sorted(A)
 
ans=0
cnt=1
tmp=A[0]
 
for i in range(1,N):
    if A[i]==tmp:
        cnt+=1
    else:
        if cnt%2!=0:
            ans+=1
        cnt=1
    tmp=A[i]
    
if cnt%2==1:
    ans+=1
print(ans)
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
l = [int(input()) for i in range(n)]
l.sort()
ans = 0
count = 1
now = l[0]

for i in range(1, n):
  if l[i] == now:
    count += 1
  else:
    if not count % 2 == 0:
      ans += 1
    count = 1
    now = l[i]

print(ans)

Failing test case input:
4
-2
0
1
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
l = [int(input()) for i in range(n)]
l.sort()

def f():
  ans = 0
  count = 1
  now = l[0]

  if n == 1:
    return 1

  for i in range(1, n):
    if l[i] == now:
      count += 1
    else:
      if not count % 2 == 0:
        ans += 1
      count = 1
      now = l[i]
    
    if i == n-1 and not count % 2 == 0:
      ans += 1
  return ans

print(f())

Problem: p03607
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import collections
n=int(input())
d={}
for i in range(n):
  A=int(input())
  if A in d:
    d[A]=0
  else:
    d[A]=1
print(sum(d.values()))

Failing test case input:
4
0
0
4
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n=int(input())
d={}
for i in range(n):
  A=int(input())
  if A not in d:
    d[A]=1
  elif d[A]==1:
    d[A]=0
  else:
    d[A]=1
print(sum(d.values()))

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = {}
for _ in range(N):
  a = int(input())
  if a in A:
    A[a] += 1
    A[a] %= 2
  else:
    A[a] = 0
ans=0
for key in A.keys():
  ans += A[key]
print(ans)
  
  
    

Failing test case input:
6
7
25
69
35
19
16

Expected output:
6


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
A = {}
for _ in range(N):
  a = int(input())
  if a in A:
    A[a] += 1
    A[a] %= 2
  else:
    A[a] = 1
ans=0
for key in A.keys():
  ans += A[key]
print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
cnt = 1
ans = 0
if len(A) == 1:
    print(1)
    exit()
for i in range(1,N):
    if A[i-1] == A[i]:
        cnt += 1
    else:
        ans += cnt%2
        cnt = 1
if cnt > 1:
    ans += cnt%2
print(ans)

Failing test case input:
4
3
1
14
2

Expected output:
4


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
cnt = 1
ans = 0
if len(A) == 1:
    print(1)
    exit()
for i in range(1,N):
    if A[i-1] == A[i]:
        cnt += 1
    else:
        ans += cnt%2
        cnt = 1
if cnt >= 1:
    ans += cnt%2
print(ans)
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
l = [int(input()) for _ in range(n)]
l.sort()
c = 1
t = l[0]
ans = 0
for i in range(1, n):
  if t == l[i]:
    c += 1
  else:
    ans += c%2
    c = 1
    t = l[i]
if n == 1 or l[-2] != l[-1]:
  ans += 1
print(ans)

Failing test case input:
3
1
1
1

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
l = [int(input()) for _ in range(n)]
l.sort()
c = 1
ans = 0
for i in range(1, n):
  if l[i-1] == l[i]:
    c += 1
  else:
    ans += c%2
    c = 1
if c != 1:
  ans += c%2
else:
  ans += 1
print(ans)

Problem: p03607
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
d={}
for x in range(n):
  s=int(input())
  if s in d:
    if d[s]==0:
      d[s]=1
    else:
      d[s]=0
      
  if s not in d:
    d[s]=1
  
ans=0
for y in d:
  if d[y]==1:
    ans+=1
    

Failing test case input:
4
-1
0
9
0

Expected output:
2


Actual output:

Fixed submission (verdict: Accepted):
n=int(input())
d={}
for x in range(n):
  s=int(input())
  if s in d:
    if d[s]==0:
      d[s]=1
    else:
      d[s]=0
      
  if s not in d:
    d[s]=1
  
ans=0
for y in d:
  if d[y]==1:
    ans+=1
    
print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


def main():
    N = int(input())

    memo = {}
    for _ in range(N):
        num = int(input())
        if num in memo:
            memo[num] = 0
        else:
            memo[num] = 1

    result = 0
    for value in memo.values():
        result += value
    print(result)
        

if __name__ == '__main__':
    main()


Failing test case input:
4
0
0
6
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):


def main():
    N = int(input())

    memo = {}
    for _ in range(N):
        num = int(input())
        if not num in memo:
            memo[num] = 1
        else:
            memo[num] ^= 1

    result = 0
    for value in memo.values():
        result += value
    print(result)
        

if __name__ == '__main__':
    main()

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import sys

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

N = int(readline())
a = []
for i in range(N):
     a.append(int(readline()))

a.sort()

res = 0
cnt = 1
for i in range(1,N):
    if a[i] == a[i-1]:
        cnt+=1
    else:
        if cnt%2:
            res+=1
        else:
            cnt=1
            

print(res)



Failing test case input:
3
0
0
10

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):

import sys

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

N = int(readline())
a = []
for i in range(N):
     a.append(int(readline()))

a.sort()

res = 0
cnt = 1
for i in range(1,N):
    if a[i] == a[i-1]:
        cnt+=1
    else:
        if cnt%2:
            res+=1
        else:
            cnt=1

            

if cnt%2:
    print(res+1)
else:
    print(res)
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
count=0
li=[0 for i in range(n)]
for i in range(n):
    a=int(input())
    li[i]=a
li.sort()
i=0
x=1
while i<n-1:
    if li[i]==li[i+1]:
        x+=1
    else:
        x=1
    if x%2==1:
        count+=1
    i+=x
print(count)

Failing test case input:
6
10
34
63
27
21
19

Expected output:
6


Actual output:
5


Fixed submission (verdict: Accepted):
n=int(input())
count=0
li=[0 for i in range(n)]
for i in range(n):
    a=int(input())
    li[i]=a
li.sort()
i=0
x=1
while i<n-1:
    if li[i]==li[i+1]:
        x+=1
        if i+2==n-1:
            count+=1
    else:
        x=1
        if i+1==n-1:
            count+=1
    if x%2==1:
        count+=1
    i+=x
    x=1
print(count)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
d = dict()
for i in range(n):
    a = int(input())
    if a in d:
        d[a] = 0
    else:
        d[a] = 1

print(sum(d.values()))


Failing test case input:
3
1
1
1

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
d = dict()
for i in range(n):
    a = int(input())
    if a in d:
        if d[a] == 0:
            d[a] = 1
        else:
            d[a] = 0
    else:
        d[a] = 1

print(sum(d.values()))

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
def main():
    n=int(input())
    L=[0]*n
    for i in range(n):
        L[i] = int(input())
    print(sum(s*(s%2) for s in Counter(L).values()))
main()

Failing test case input:
4
0
0
4
0

Expected output:
2


Actual output:
4


Fixed submission (verdict: Accepted):
from collections import Counter
def main():
    n=int(input())
    L=[0]*n
    for i in range(n):
        L[i] = int(input())
    print(sum(s%2 for s in Counter(L).values()))
main()

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(input()) for i in range(N)]
B = 0
for i in A:
    if A.count(i)%2 == 1: 
        B += 1
    else:
        while i in A:A.remove(i)
print(B)

Failing test case input:
4
-2
0
5
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
N = int(input())
list = set()
for i in range(N):
    i = int(input())
    if i not in list:
        list.add(i)
    elif i in list:
        list.remove(i)
print(len(list))
Problem: p03607
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
def main():
    n = int(input())
    a_lst = [int(input()) for _ in range(n)]
    a_lst.sort()

    count = 0
    tmp = 0
    number = a_lst[0]

    for i in range(n):

        if a_lst[i] == number:
            tmp += 1

            if i == n - 1:
                if tmp % 2 != 0:
                    count += 1

        else:
            number = a_lst[i]

            if tmp % 2 == 0:
                tmp = 1
                continue
            else:
                count += 1
                tmp = 1

    print(count)


if __name__ == '__main__':
    main()

Failing test case input:
6
13
7
63
27
4
0

Expected output:
6


Actual output:
5


Fixed submission (verdict: Accepted):
def main():
    n = int(input())
    a_lst = [int(input()) for _ in range(n)]
    a_lst.sort()

    count = 0
    tmp = 0
    number = a_lst[0]

    for i in range(n):

        if a_lst[i] == number:
            tmp += 1

            if i == n - 1:
                if tmp % 2 != 0:
                    count += 1

        else:
            number = a_lst[i]

            if tmp % 2 == 0:
                tmp = 1
                continue
            else:
                count += 1
                tmp = 1

    if n > 1:
        if a_lst[-1] != a_lst[-2]:
            count += 1

    print(count)


if __name__ == '__main__':
    main()

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
number_set = set()
N = int(input())

for i in range(N):
    new_num = input()
    if new_num in number_set:
        number_set.remove(new_num)
    else:
        number_set.add(new_num)

print(len(number_set))
print(number_set)

Failing test case input:
3
0
0
19

Expected output:
1


Actual output:
1
{'19'}


Fixed submission (verdict: Accepted):
number_set = set()
N = int(input())

for i in range(N):
    new_num = input()
    if new_num in number_set:
        number_set.remove(new_num)
    else:
        number_set.add(new_num)

print(len(number_set))

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections

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

count_dict = collections.Counter(A)

count = 0

for i in count_dict.values():
    if i == 1:
        count += 1

print(count)


Failing test case input:
4
0
0
4
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
import collections

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

count_dict = collections.Counter(A)



count = 0

for i in count_dict.values():
    if i % 2 == 1:
        count += 1

print(count)

Problem: p03607
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
d={}
for _ in[0]*int(input()):
    i=input()
    d[i]=d.get(i,0)^1
    print("d[i]", d[i])
print(sum(d.values()))

Failing test case input:
3
1
0
10

Expected output:
3


Actual output:
d[i] 1
d[i] 1
d[i] 1
3


Fixed submission (verdict: Accepted):
d={}
for _ in[0]*int(input()):
    i=input()
    d[i]=d.get(i,0)^1
print(sum(d.values()))
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=set()
for i in range(int(input())):
    s=s^set(input())
print(len(s))

Failing test case input:
3
0
0
19

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
n=int(input())
s=set()
for i in range(n):
    s^={input()}
print(len(s))

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = []
for i in range(n):
  a.append(int(input()))
a.sort()
ans = 0
for i in range(n):
  try:
    if a[i-1] != a[i]:
      ans += cnt
      cnt = 1
    else:
      cnt = 1 - cnt
  except:
    
    cnt = 1
print(ans)

Failing test case input:
6
6
31
99
35
18
12

Expected output:
6


Actual output:
5


Fixed submission (verdict: Accepted):
n = int(input())
a = []
for i in range(n):
  a.append(int(input()))
a.sort()
ans = 0
for i in range(n):
  try:
    if a[i-1] != a[i]:
      ans += cnt
      cnt = 1
    else:
      cnt = 1 - cnt
  except:
    
    cnt = 1
  
ans += cnt
print(ans)

Problem: p03607
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())

d = {}

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

ans = 0
for v in d.values():
  ans += v
  
print(ans)

Failing test case input:
4
0
0
6
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())

d = {}

for i in range(n):
  a = int(input())
  if a in d and d[a] == 1:
    d[a] = 0
  else:
    d[a] = 1

ans = 0
for v in d.values():
  ans += v
  
print(ans)

Problem: p03607
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import collections


def solve():
    pass


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

c = collections.Counter(A)
cnt = 0
for k, v in c.items():
    if v % 2 == 0: continue
    else: cnt += v
print(cnt)

Failing test case input:
3
1
1
1

Expected output:
1


Actual output:
3


Fixed submission (verdict: Accepted):
import collections


def solve():
    pass


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

c = collections.Counter(A)
cnt = 0
for k, v in c.items():
    if v % 2 == 0: continue
    else: cnt += 1
print(cnt)

Problem: p03607
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
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
    else:
        dict[a[i]]=0

ans=0
for i in dict.keys():
    if dict[i]==1:
        ans+=1
print(ans)

Failing test case input:
4
0
0
6
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n=int(input())
a=[int(input()) for i in range(n)]

dict={}
for i in range(n):
    if not a[i] in dict or dict[a[i]]==0:
        dict[a[i]]=1
    else:
        dict[a[i]]=0

ans=0
for i in dict.values():
    ans+=i
print(ans)