ZhenlongDai/ACPR huggingface dataset:
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=[int(input()) for i in range(N)]
A.sort()
O=[]
c=0
ans=0

for i in A:
    if i not in O:
        O.append(i)
        if c%2==1:
            ans+=1
        c=0
    else:
        c+=1
        
print(ans) 

Failing test case input:
4
0
1
5
3

Expected output:
4


Actual output:
0


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

for i in range(1,N):
    if A[i]!=A[i-1]:
        if c%2==1:
            ans+=1
        c=1
    else:
        c+=1

if c%2==1:
    ans+=1

print(ans)

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

N = int(input())
if N == 0:
	print('0')
	sys.exit()

numList = list()

for i in range(N):
	numList.append(int(input()))
	
numList.sort()

wordCount = 0
i = 0

while i <= N-2:
	if numList[i] == numList[i+1]:
		i += 2
	else:
		i += 1
		wordCount += 1
		
print(wordCount)

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

Expected output:
6


Actual output:
5


Fixed submission (verdict: Accepted):
import sys

N = int(input())
if N == 0:
	print('0')
	sys.exit()

numList = list()

for i in range(N):
	numList.append(int(input()))
	
numList.sort()

wordCount = 0
i = 0

while i < N:
	if i < N-1 and numList[i] == numList[i+1]:
		i += 2
	elif i == N-1:
		wordCount += 1
		break
	else:
		wordCount += 1
		i += 1
		
print(wordCount)

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 = 0
q = a[0]
ans = 0
for i in range(n):
  if(q==a[i]):
    jud += 1
  else: 
    if(jud%2==1):
      ans += 1
    jud = 1
if (jud%2==1):
  ans += 1
print(ans)


Failing test case input:
3
1
-1
1

Expected output:
1


Actual output:
3


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 (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys
import copy
import math
import itertools

import re

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

tmp = 0
cnt = 0
for i in range(N-1):
    tmp += 1
    if A[i] == A[i+1]:
        pass
    else:
        cnt += tmp%2
        tmp = 0

if len(set(A)) == 1:
    cnt = 1

print(cnt)


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 c in range(N)]
A = sorted(A)

tmp = 1
cnt = 0
for i in range(N):    
    if i+1<N:
        if A[i] == A[i+1]:
            tmp += 1
        else:
            cnt += tmp%2
            tmp = 1
    else:
        cnt += tmp%2

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

Failing test case input:
3
-1
1
7

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
N = int(input())
A = [int(input()) for i in range(N)]
A.sort()
count = 0
a = -1
a_count = 0
for i in range(N):
    if a!=A[i]:
        count+=1
        a_count=1
    elif a_count%2==1:
        count-=1
        a_count+=1
    else:
        count+=1
        a_count+=1
    a=A[i]
print(count)

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
if n > 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
else:
  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())
a = [int(input()) for i in range(n)]
ans = 0
sa = list(set(a))
for i in range(len(sa)):
  if a.count(sa[i]) % 2 == 1:
    ans += a.count(sa[i])
print(ans)

Failing test case input:
3
1
1
1

Expected output:
1


Actual output:
3


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 = [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[a[i]]%2 == 1:
        cnt += 1
print(cnt)

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)]
import collections
b = collections.Counter(a)
set_a = list(set(a))
cnt = 0
for i in range(len(set_a)):
    if b[set_a[i]]%2 == 1:
        cnt += 1
print(cnt)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import exit, stdin
from collections import Counter
N = int(stdin.readline().rstrip())
A = Counter(int(stdin.readline().rstrip()) for _ in range(N))
print(len(Counter(a for a in A.elements() if A[a] == 1)))

Failing test case input:
4
0
0
4
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
from sys import exit, stdin
from collections import Counter
N = int(stdin.readline().rstrip())
A = Counter(int(stdin.readline().rstrip()) for _ in range(N))
print(len(Counter(a for a in A.elements() if A[a] % 2 == 1)))
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = [int(input()) for _ in range(n)]

num = {}
for i in range(n):
    if not a[i] in num.keys():
        num[a[i]] = 1
    else:
        num[a[i]] = 0
        
ans = 0
for k in num.keys():
    if num[k] > 0:
        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 _ in range(n)]

num = {}
for i in range(n):
    if not a[i] in num.keys():
        num[a[i]] = 1
    elif num[a[i]] == 1:
        num[a[i]] = 0
    else:
        num[a[i]] = 1
        
ans = 0
for k in num.keys():
    if num[k] > 0:
        ans += 1
print(ans)

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

res = 0
for value in paper.values():
    if value == 1:
        res += 1
print(res)


Failing test case input:
4
0
0
4
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
paper = dict()
for i in range(n):
    a = int(input())
    if a not in paper:
        paper[a] = 1
    else:
        paper.pop(a)

res = 0
for value in paper.values():
    if value == 1:
        res += 1
print(res)

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=0
l=sorted(l)
for i in range(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:
6
8
31
99
35
11
12

Expected output:
6


Actual output:
5


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,a,*b=open(0).read().split()
s=set(a)
for i in b:
  s^=set(i)
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,*a=map(int,open(0).read().split())
s=set()
for i in a:
  s^={i}
print(len(s))

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:
4
-2
0
1
0

Expected output:
2


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())
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
    else:
      count-=1
    flag=1
if flag>0:
  count-=1
else:
  count+=1
print(count)

Failing test case input:
4
0
1
14
3

Expected output:
4


Actual output:
2


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):
n=int(input())
ans=0
l=[int(input()) for i in range(n)]
from collections import Counter
lst=list(Counter(l).values())
def mod4(n):
  if n%4<2:
    return 1
  else:
    return 0
  ans=0
for i in lst:
  ans+=mod4(i)
print(ans)
  


Failing test case input:
4
0
0
4
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n=int(input())
ans=0
l=[int(input()) for i in range(n)]
from collections import Counter
lst=list(Counter(l).values())
def mod2(n):
  if n%2==1:
    return 1
  else:
    return 0
ans=0
for i in lst:
  ans+=mod2(i)
print(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()))
from collections import Counter
b=list(Counter(a).values())
cnt=0
for i in range(len(b)):
  if b[i]%2==0:
    cnt+=1
print(cnt)


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()))
from collections import Counter
b=list(Counter(a).values())
cnt=0
for i in range(len(b)):
  if b[i]%2==1:
    cnt+=1
print(cnt)

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


from collections import Counter

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

c = Counter(li)

count = 0
for k, v in c.items():
    if v == 1:
        count += 1
print(count)

Failing test case input:
4
0
0
4
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):


from collections import Counter

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

c = Counter(li)

count = 0
for k, v in c.items():
    if v % 2 == 1:
        count += 1
print(count)

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

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

counter = Counter(a)

ans = 0
for num in counter:
	if counter[num] % 2 == 1:
		ans += counter[num]

        
print(ans)


Failing test case input:
4
0
0
4
0

Expected output:
2


Actual output:
4


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

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

counter = Counter(a)

ans = 0
for num in counter:
	if counter[num] % 2 == 1:
		ans += 1

        
print(ans)
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections
N = int(input())
a = [int(input()) for i in range(N)]
c = collections.Counter(a)
tmp = c.values()
count=0
for i in range(len(tmp)):
  if i%2!=0:
    count+=1
print(count)


Failing test case input:
4
3
1
14
2

Expected output:
4


Actual output:
2


Fixed submission (verdict: Accepted):
import collections
N = int(input())
a = [int(input()) for i in range(N)]
c = collections.Counter(a)
tmp = list(c.values())
count=0
for i in range(len(tmp)):
  if tmp[i]%2!=0:
    count+=1
print(count)

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

n = int(input())
ans = 0
num_list = [int(input()) for _ in range(n)]
no_dups = Counter(num_list).most_common()

for num in reversed(no_dups):
    if num[1] == 1:
        ans += 1
    else:
        break
print(ans)

Failing test case input:
3
1
1
1

Expected output:
1


Actual output:
0


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

n = int(input())
ans = 0
num_list = [int(input()) for _ in range(n)]
no_dups = Counter(num_list).most_common()

for num in reversed(no_dups):
    if num[1]%2 == 1:
        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)]

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

a.sort()
ans = 0
tmp = a[0]
a = a[1:]
count = 1
for aa in a:
    if aa == tmp:
        count += 1
    else:
        if count % 2 == 1:
            ans += 1
        tmp = aa
        count = 1
print(ans)


Failing test case input:
4
-2
0
5
0

Expected output:
2


Actual output:
1


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

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

a.sort()
ans = 0
tmp = a[0]
a = a[1:]
count = 1
for aa in a:
    if aa == tmp:
        count += 1
    else:
        if count % 2 == 1:
            ans += 1
        tmp = aa
        count = 1
if count % 2 == 1:
            ans += 1

print(ans)

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

def pin(type=int):
    return map(type,input().split())




N=int(input())
a=[]
for i in range(N):
    a.append(int(input()))
a.sort()
bac=1
ans=0
for j in range(N-1):
    if a[j+1]!=a[j]:
        ans+=bac%2
        bac=1
    else:
        bac+=1
print(ans)


Failing test case input:
3
0
0
10

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
def pin(type=int):
    return map(type,input().split())




N=int(input())
a=[]
for i in range(N):
    a.append(int(input()))
a.sort()
bac=1
ans=0
for j in range(N-1):
    if a[j+1]!=a[j]:
        ans+=bac%2
        bac=1
    else:
        bac+=1
ans+=bac%2
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)
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

print(ans)

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

Expected output:
4


Actual output:
3


Fixed submission (verdict: Accepted):
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 % 2 == 1:
    ans += 1
print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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()))

Failing test case input:
6
7
7
63
27
4
16

Expected output:
4


Actual output:
5


Fixed submission (verdict: Accepted):
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()))

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
list_ = [int(input()) for _ in range(n)]

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


Failing test case input:
4
-1
1
2
0

Expected output:
4


Actual output:
{-1: 1, 1: 1, 2: 1, 0: 1}
4


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

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

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
tmp=-1

for i in range(N):
    if A[i]!=tmp:
        ans+=1
        tmp=A[i]
    else:
        ans-=1
print(ans)

Failing test case input:
3
1
-1
1

Expected output:
1


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())
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(a)):
    if b[a[i]]%2 == 1:
        cnt += 1
print(cnt)

Failing test case input:
3
1
1
1

Expected output:
1


Actual output:
3


Fixed submission (verdict: Accepted):
n = int(input())
a = [int(input()) for i in range(n)]
import collections
b = collections.Counter(a)
set_a = list(set(a))
cnt = 0
for i in range(len(set_a)):
    if b[set_a[i]]%2 == 1:
        cnt += 1
print(cnt)
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
data=[int(input()) for i in range(int(input()))]
data.sort()
count=0
value=1
predata=None
for i in range(0,len(data)):
    if predata==data[i]:
        value+=1
    else:
        predata=data[i]
        count+=value%2
        value=1
print(count)


Failing test case input:
3
6
2
6

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
data=[int(input()) for i in range(int(input()))]
data.sort()
count=-1
value=1
predata=None
for i in range(0,len(data)):
    if predata!=data[i]:
        count+=value%2
        value=1
    else:
        value+=1
    predata=data[i]
count+=value%2
print(count)

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

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

Expected output:
6


Actual output:
5


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

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


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

Expected output:
6


Actual output:
5


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())
d={}
for x in range(n):
  s=int(input())
  if s in d:
    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)

Failing test case input:
4
0
0
6
0

Expected output:
2


Actual output:
1


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):
N = int(input())
A = [int(input()) for n in range(N)]
A = sorted(A)

res = []
tmp = 0
count = 1
while A:
    a = A.pop()
    if a == tmp:
        count += 1
    else:
        res.append(count%2 != 0)
        count = 1
    tmp = a
    
print(sum(res))


Failing test case input:
4
0
2
4
0

Expected output:
2


Actual output:
3


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

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

print(sum(res))

Problem: p03607
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
ans = []
dict = {}
for i in range(n):
    a = input()
    if a in dict:
        dict[a] = 0
    else:
        dict[a] = 1

ans = 0
for v in dict.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())
ans = []
dict = {}
for i in range(n):
    a = input()
    if a in dict:
        if dict[a] == 0:
            dict[a] = 1
        else:
            dict[a] = 0
    else:
        dict[a] = 1

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


print(ans)

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

Failing test case input:
6
6
47
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()))
cnt = 1
ans = 0
A.sort()
for i in range(N-1):
    if A[i] == A[i+1]:
        cnt += 1
    else:
        if cnt%2 == 1:
            ans += 1
        cnt = 1
if cnt%2 == 1:
    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()

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

Failing test case input:
4
-1
0
2
0

Expected output:
2


Actual output:
1


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

res = 0
cnt = 0
if N == 1:
    res = 1
for i in range(N):
    if i == 0:
        cnt = 1
    else:
        if A[i-1]==A[i]:
            cnt += 1
            if i == N-1:
                res += cnt%2
        else:
            res += cnt%2
            cnt = 1
            if i == N-1:
                res += 1
print(res)
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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),ans)

Failing test case input:
4
0
0
4
0

Expected output:
2


Actual output:
2 ['0', '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())
numList = list()

for i in range(N):
	numList.append(int(input()))
	
numList.sort()

wordCount = 0
i = 0

while i <= N-2:
	if numList[i] == numList[i+1]:
		i += 2
	else:
		i += 1
		wordCount += 1
		
print(wordCount)

Failing test case input:
4
-1
0
9
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
import sys

N = int(input())
if N == 0:
	print('0')
	sys.exit()

numList = list()

for i in range(N):
	numList.append(int(input()))
	
numList.sort()

wordCount = 0
i = 0

while i < N:
	if i < N-1 and numList[i] == numList[i+1]:
		i += 2
	elif i == N-1:
		wordCount += 1
		break
	else:
		wordCount += 1
		i += 1
		
print(wordCount)

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

from collections import Counter

c = Counter(a)

print(sum([1 for num,cnt in c.items() if cnt&2]))

Failing test case input:
4
-1
1
2
0

Expected output:
4


Actual output:
0


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

from collections import Counter

c = Counter(a)
print(sum([1 for num,cnt in c.items() if cnt%2==1]))

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
data=[int(input()) for i in range(int(input()))]
data.sort()
count=0
value=1
predata=data[0]
for i in range(1,len(data)):
    if predata==data[i]:
        value+=1
    else:
        predata=data[i]
        count+=value%2
        value=1
print(count)


Failing test case input:
3
3
2
8

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
data=[int(input()) for i in range(int(input()))]
data.sort()
count=-1
value=1
predata=None
for i in range(0,len(data)):
    if predata!=data[i]:
        count+=value%2
        value=1
    else:
        value+=1
    predata=data[i]
count+=value%2
print(count)
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.values():
    ans+=i
print(ans)

Failing test case input:
3
1
1
1

Expected output:
1


Actual output:
0


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)

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
    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 (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a_list = [int(input())for _ in range(N)]

count_dct = {}
for input_num in a_list:
    if input_num in count_dct.keys():
        count_dct[input_num] += 1
    else:
        count_dct[input_num] = 1
        
counter = 0
for i, j in count_dct.items():
    if j%2 == 1:
        counter +=1
    else:
        pass

Failing test case input:
4
0
1
5
3

Expected output:
4


Actual output:

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

count_dct = {}
for input_num in a_list:
    if input_num in count_dct.keys():
        count_dct[input_num] += 1
    else:
        count_dct[input_num] = 1
        
counter = 0
for i, j in count_dct.items():
    if j%2 == 1:
        counter +=1
    else:
        pass
    
print(counter)

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

ans = 0
for kk in d.keys():
    if d[kk] == 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())
d = {}
for i in range(n):
    a = int(input())
    if a not in d:
        d[a] = 1
    else:
        if d[a] == 1:
            d[a] = 0
        else:
            d[a] = 1

ans = 0
for kk in d.keys():
    if d[kk] == 1:
        ans += 1
print(ans)
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections
n = int(input())
c = collections.Counter([int(input()) for _ in range(n)])
ans = 0
for cnt in c.values():
    if cnt %2 != 1:
        ans += 1
print(ans)

Failing test case input:
4
0
2
4
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
import collections
n = int(input())
c = collections.Counter([int(input()) for _ in range(n)])
ans = 0
for cnt in c.values():
    if cnt %2 != 0:
        ans += 1
print(ans)

Problem: p03607
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import Counter
n = int(input())
a = [int(input()) for i in range(n)]
c = Counter(a)
ans = 0
for i in range(n):
    if c[a[i]] % 2 == 1:
        ans += 1
print(ans)

Failing test case input:
3
1
1
1

Expected output:
1


Actual output:
3


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 (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
a = [int(input()) for _ in range(n)]

a.sort()
ans = 0
flag = True
for i in range(1,n):
    if a[i] == a[i-1]:
        flag = not flag
    else:
        if flag:
            ans += 1
        flag = True
print(ans)

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

Expected output:
4


Actual output:
3


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

a.sort()
a.append(0)
ans = 0
flag = True
for i in range(1,n+1):
    if a[i] == a[i-1]:
        flag = not flag
    else:
        if flag:
            ans += 1
        flag = True
    
    
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(0)
    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:
6
8
31
99
35
11
12

Expected output:
6


Actual output:
5


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())
d = {}
a = []
for _ in range(N):
    A = int(input())
    a.append(A)
    if A in d:
        d[A] = 0
        continue
    d[A] = 1


ans = 0
for i in range(N):
    if d[a[i]]==1:
        ans = ans + 1
        continue
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 = {}
a = []
for _ in range(N):
    A = int(input())
    a.append(A)
    if not(A in d):
        d[A] = 1
        continue
    elif d[A]==1:
        d[A] = 0
    else:
        d[A] = 1

ans = 0
for key in d:
    if d[key]==1:
        ans = ans + 1
print(ans)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
N = int(input())
A = []
cnt = 0
for i in range(N):
    a = str(input())
    A.append(a)
c = Counter(A)
set_A = list(set(A))
for i in set_A:
    if int(c[str(i)]) < 2:
        cnt += 1
print(cnt)

Failing test case input:
4
0
0
4
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
from collections import Counter
N = int(input())
A = []
cnt = 0
for i in range(N):
    a = str(input())
    A.append(a)
c = Counter(A)
set_A = list(set(A))
for i in set_A:
    if int(c[str(i)]) < 2:
        cnt += 1
    else:
        cnt += int(c[str(i)]) % 2
print(cnt)

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






















def readInts():
  return list(map(int,input().split()))
mod = 10**9 + 7

def main():
  n = int(input())
  dic = {}
  for i in range(n):
    a = int(input())
    if a in dic:
      dic[a] = 0
    else:
      dic[a] = 1
  cnt = 0
  for k,v in dic.items():
    cnt += v
  print(cnt)
if __name__ == '__main__':
  main()

Failing test case input:
4
0
0
6
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):






















def readInts():
  return list(map(int,input().split()))
mod = 10**9 + 7

def main():
  n = int(input())
  dic = {}
  for i in range(n):
    a = int(input())
    if a in dic:
      if dic[a] == 1:
        dic[a] = 0
      elif dic[a] == 0:
        dic[a] = 1
    else:
      dic[a] = 1
  cnt = 0
  for k,v in dic.items():
    cnt += v
  print(cnt)
if __name__ == '__main__':
  main()

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

a_dict = {}
for i in range(N):
  t = int(input())
  if t in a_dict:
    a_dict[t] = 0
  else:
    a_dict[t] = 1
print(len([0 for i in a_dict.values() if i]))

Failing test case input:
4
0
0
4
0

Expected output:
2


Actual output:
1


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

a_dict = {}
for i in range(N):
  t = int(input())
  if t in a_dict:
    a_dict[t] += 1
  else:
    a_dict[t] = 1
print(len([0 for i in a_dict.values() if i % 2]))
Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(input()) for i in range(N)]
sorted_A = sorted(A)

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

Failing test case input:
3
1
1
1

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
A = [int(input()) for i in range(N)]
sorted_A = sorted(A)

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

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
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)

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

Expected output:
4


Actual output:
1


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 (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
cnt = 1
ans = 0
A.sort()
for i in range(N-1):
    if A[i]==A[i+1]:
        cnt += 1
    else:
        if cnt%2 == 1:
            ans += 1
        cnt = 1
print(ans)

Failing test case input:
4
0
1
4
0

Expected output:
2


Actual output:
1


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


Failing test case input:
4
3
5
9
2

Expected output:
4


Actual output:
[2, 3, 5, 9]
4


Fixed submission (verdict: Accepted):
N = int(input())
A = list(int(input()) for _ in range(N))
A.sort()
count = 0
test = -1
stack = 0
for i in range(N):
    if test != A[i]:
        count += 1
        stack = 1
        test = A[i]
    else:
        if stack == 1:
            count = count - 1
            stack = 0
        else:
            stack = 1
            count += 1
print(count)

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

d = defaultdict(int)

n = int(input())

count = 0
for i in range(n):
    a = int(input())
    if d[a] == 1:
        count = max(count - 1, 0)
    else:
        d[a] = 1
        count += 1

print(count)


Failing test case input:
4
0
0
4
0

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
from collections import defaultdict, deque

d = defaultdict(int)

n = int(input())

count = 0
for i in range(n):
    a = int(input())
    if d[a] == 1:
        count = max(count - 1, 0)
        d[a] = 0
    else:
        d[a] = 1
        count += 1

print(count)

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

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

print(sum(array.values()))

Failing test case input:
4
0
0
4
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
array = {}

for i in range(n):
    a = int(input())
    if a not in array:
        array[a] = 1
    elif array[a] == 1:
        array[a] -= 1
    else:
        array[a] += 1

print(sum(array.values()))

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


def main():
    n = int(input())
    a_list = []
    for _ in range(n):
        a_list.append(int(input()))

    a_len = len(a_list)
    a_set_len = len(set(a_list))
    print(a_len - (a_len - a_set_len) * 2)

if __name__ == '__main__':
    main()

Failing test case input:
3
1
1
1

Expected output:
1


Actual output:
-1


Fixed submission (verdict: Accepted):

from collections import Counter

def main():
    n = int(input())
    a_list = []
    for _ in range(n):
        a_list.append(int(input()))
    
    ans = 0
    cnt = Counter(a_list)
    for i in set(a_list):
        if cnt[i] % 2 != 0:
            ans += 1
    print(ans)



if __name__ == '__main__':
    main()
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
tmp = 1

for i in range(n-1):
    if a[i] == a[i+1]:
        tmp += 1
    else:
        ans += tmp % 2
        tmp = 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=[int(input()) for i in range(N)]
A.sort()
a=0
t=1
for i in range(1,N):
    if A[i-1]==A[i]:
        t+=1
    else:
        if t%2==1:
            a+=1
        t=1
if t%2==1:
    a+=1
print(a)

Problem: p03607
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
dic = dict()
for j in range(N):
    i = int(input())

    if i not in dic.keys():
        dic[i] = 1
    else:
        if dic[i] == 0:
            dic[i] == 1
        else:
            dic[i] = 0



ans = sum(dic.values())

print(ans)

Failing test case input:
4
0
0
4
0

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
N = int(input())
dic = dict()
for j in range(N):
    i = int(input())

    if i not in dic.keys():
        dic[i] = 1
    else:
        if dic[i] == 0:
            dic[i] = 1
        else:
            dic[i] = 0



ans = sum(dic.values())

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 A[i]==A[i+1]:
		flag=True
	elif flag:
		flag=False
	else:
		ans+=1
print(ans)

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

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.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
print(so)

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
31
77
35
11
12

Expected output:
6


Actual output:
[7, 11, 12, 31, 35, 77]
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 (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
a = []
for _ in range(n):
    a.append(int(input()))
a.sort()

prv = 0
cnt = 0
ans = 0
for i in range(n):
    if a[i] == prv:
        cnt ^= 1
    if a[i] != prv:
        ans += cnt
        cnt = 1
    prv = a[i]
print(ans)

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

Expected output:
6


Actual output:
5


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

cnt = 1; ans = 0
for i in range(1, n):
    if a[i] == a[i-1]:
        cnt ^= 1
    else:
        ans += cnt
        cnt = 1
ans += cnt
print(ans)

Problem: p03607
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = []
ans = 0
for i in range(n):
  a.append(int(input()))
a.sort()
i = 0
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]
print(ans)
    
  


Failing test case input:
4
0
2
4
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):
n = int(input())
a = [int(input()) for _ in range(n)]

from collections import Counter

c = Counter(a)

print(sum([1 for num,cnt in c.items() if cnt&2==1]))

Failing test case input:
4
-5
2
4
0

Expected output:
4


Actual output:
0


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

from collections import Counter

c = Counter(a)
print(sum([1 for num,cnt in c.items() if cnt%2==1]))

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

A.sort()

odd = 0
count = 1
a = A[0]
for i in A[1:]:
  print(i,a)
  if i == a:
    count += 1
  else:
    a = i
    if count % 2 == 1:
      odd += 1
    count = 1
if count % 2 == 1:
      odd += 1
print(odd)

Failing test case input:
3
0
3
7

Expected output:
3


Actual output:
3 0
7 3
3


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

A.sort()

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

Failing test case input:
3
1
1
1

Expected output:
1


Actual output:
-1


Fixed submission (verdict: Accepted):
import sys
input=sys.stdin.readline
n=int(input())
a=[int(input()) for _ in range(n)]
a.sort()
h=a[0]
ans=1
for i in a[1:]:
    if i!=h:
        ans+=1
        h=i
    else:
        ans-=1
        h=pow(10,10)    
print(ans)

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

Failing test case input:
6
12
22
18
35
18
12

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
N=int(input())
A=[int(input()) for _ in range(N)]
A.sort()
A.append(0)
ans=0
i=0
j=0
while i<N:
  b=A[i]
  c=0
  while b==A[i] and i<N:
    c+=1
    i+=1
  ans+=(c%2)
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()

odd = 0
count = 1
a = A[0]
for i in A[1:]:
  if i == a:
    count += 1
  else:
    a = i
    if count % 2 == 1:
      odd += 1
    count = 1
print(odd)
    
  

Failing test case input:
3
1
1
11

Expected output:
1


Actual output:
0


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

A.sort()

odd = 0
count = 1
a = A[0]
for i in A[1:]:
  if i == a:
    count += 1
  else:
    a = i
    if count % 2 == 1:
      odd += 1
    count = 1
if count % 2 == 1:
      odd += 1
print(odd)

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() 

cnt2 = 0
cnt = 1
ans = 0
for i in range(len(a)-1):
    if a[i] == a[i+1]:
        cnt += 1
    else:
        ans += cnt%2
        cnt = 1
        flg = False
if a[N-1] != a[N-2]:
    ans += 1
ans += cnt%2
print(ans)

Failing test case input:
4
3
5
9
1

Expected output:
4


Actual output:
5


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

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

a.sort() 

cnt2 = 0
cnt = 1
ans = 0
for i in range(len(a)-1):
    if a[i] == a[i+1]:
        cnt += 1
    else:
        ans += cnt%2
        cnt = 1
        flg = False

ans += cnt%2
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 A[i]==A[i+1]:
		ans-=2
	ans+=1
print(ans+1)

Failing test case input:
3
1
1
1

Expected output:
1


Actual output:
-1


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)