Problem:


Score : 300 points

Problem Statement

You are playing the following game with Joisino.

Initially, you have a blank sheet of paper.

Joisino announces a number. If that number is written on the sheet, erase the number from the sheet; if not, write the number on the sheet. This process is repeated N times.

Then, you are asked a question: How many numbers are written on the sheet now?

The numbers announced by Joisino are given as A_1, ... ,A_N in the order she announces them. How many numbers will be written on the sheet at the end of the game?

Constraints

1≤N≤100000

1≤A_i≤1000000000(=10^9)

All input values are integers.

Input

Input is given from Standard Input in the following format:

N
A_1
:
A_N

Output

Print how many numbers will be written on the sheet at the end of the game.

Sample Input 1

3
6
2
6

Sample Output 1

1

The game proceeds as follows:

6 is not written on the sheet, so write 6.

2 is not written on the sheet, so write 2.

6 is written on the sheet, so erase 6.

Thus, the sheet contains only 2 in the end. The answer is 1.

Sample Input 2

4
2
5
5
2

Sample Output 2

0

It is possible that no number is written on the sheet in the end.

Sample Input 3

6
12
22
16
22
18
12

Sample Output 3

2



Sample input:
3
6
2
6


Sample output:
1

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Tue Mar  5 22:41:58 2019

@author: yuta
"""
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)

Submission status: Wrong Answer

Solution code:
import queue
q=queue.Queue()
n=int(input())
l=[]
for i in range(n):
  l.append(int(input()))
l.sort()
for a in l:
  if q.empty():
    q.put(a)
  else:
    b=q.get()
    if a==b:
      pass
    else:
      q.put(b)
      q.put(a)
print(q.qsize())

Submission status: Wrong Answer

Solution code:
n=int(input())
ret={}
for idx in range(n):
    val = int(input())
    if val not in list(ret.keys()):
        ret.update({val: 1})
    else:
        ret[val] = 0
print(sum(list(ret.values())))

Submission status: Wrong Answer

Solution code:
n=int(input())

ret={}

for idx in range(n):
    val = int(input())
    if val not in ret.keys():
        ret.update({val: 1})
    else:
        ret[val] = 0
print(sum(list(ret.values())))

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
N = int(input())
A = [int(input()) for _ in range(N)]
P = defaultdict(int)
for item in A:
    if item in P:
        P[item] -= 1
    else:
        P[item] += 1
ans = 0
for key in P:
    ans += P[key]
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
b = {}
count = 0
for i in range(N):
    tmp = int(input())
    if tmp not in b:
        b[tmp] = 1
    else:
        b[tmp] = 0
for i in b:
    count += b[i]
print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [0 for i in range(n)]
for i in range(n):
    a[i] = int(input())
if n==1:
    print(1)
    exit()
a = sorted(a)
a.append(-1)  # 番兵を追加
written = []  # 最終的に描かれる数字の集合
counter = 1
target = a[0]
# a[0]と同じ数字が途切れた時点でcounterが奇数なら追加する
for i in range(1, n):# n > 1の場合
    if a[i] == a[i - 1]:
        counter += 1
    else:
        if counter % 2 == 1:
            written.append(a[i - 1])
        counter = 1
print(len(written))

Submission status: Wrong Answer

Solution code:
import collections
ans = 0
n = int(input())
nums = [int(input()) for i in range(n)]
con = collections.Counter(nums)

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

Submission status: Wrong Answer

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

l = 0
m = 1
ans = 0

for l in range(N-1):
	if A[l] == A[l+1]:
		m += 1
	else:
		if m % 2 == 1:
			ans += 1
		m = 1
if A[N-1] != A[N-2]:
	ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

a = {}

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

print(list(a.values()).count(1))

Submission status: Wrong Answer

Solution code:
a=[]
N = int(input())
for i in range(N):
    a.append(int(input().strip()))
a.sort()
ans=0
nu=a[0]
par=0
for i in range(N):
    if nu!=a[i]:
        nu=a[i]
        ans+=(par%2)
        par=0
    par+=1

print(ans)

Submission status: Wrong Answer

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

A.sort()
prev=0
count=0
for i in range(N):
    if prev!=A[i]:
        prev=A[i]
        count+=1


print count

Submission status: Wrong Answer

Solution code:
H = set([])
L = []
N = int(input())
for _ in range(N):
    k = input()
    H.add(k)
    L.append(k)
print(2*len(H)-len(L))

Submission status: Wrong Answer

Solution code:
N = int(input())
L = [int(input()) for i in range(N)]
L.sort()
res = 0
for i in range(len(L)-1):
    if L[i] == L[i+1]:
        res += 2
        i += 1
print(len(L)-res)

Submission status: Wrong Answer

Solution code:
import collections
N = int(input())
L = [int(input()) for i in range(N)]
L.sort()
res = len(L)
c = collections.Counter(L)
for i in range(len(set(L))):
    if c[L[i]] >= 2:
        if c[L[i]]%2 == 0:
            res -= c[L[i]]
        else:
            res -= c[L[i]] - 2
print(res)

Submission status: Wrong Answer

Solution code:
import collections
N = int(input())
L = [int(input()) for i in range(N)]
L.sort()
res = len(L)
c = collections.Counter(L)
for i in range(len(set(L))):
    if c[L[i]]%2 == 0:
        res -= c[L[i]]
print(res)

Submission status: Wrong Answer

Solution code:
from collections import deque
N=int(input())
D=deque()
for i in range(N):
    A=int(input())
    D.append(A)
cnt=len(D)-len(set(D))
print(len(D)-cnt*2)

Submission status: Wrong Answer

Solution code:
N = int(input()) 
paper = []

for i in range(N):
    # Aのi番目
    ai = int(input())
    for p in range(len(paper)):
        if paper[p] < ai:
            continue
        elif paper[p] == ai:
            paper.remove(ai)
            break
        else:
            paper.insert(p, ai)
            break

print(len(paper))

Submission status: Wrong Answer

Solution code:
N = int(input())
paper = []

for i in range(N):
    # Aのi番目
    ai = int(input())
    for p in range(len(paper)):
        if paper[p] < ai:
            continue
        elif paper[p] == ai:
            paper.remove(ai)
            break
        else:
            paper.insert(p, ai)
            break

print(len(paper))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
a = [int(input()) for _ in range(N)]
a.sort
ans = 0
now = 0
cnt = 0
for x in a:
    if x == now:
        cnt += 1
        continue
    if cnt % 2 == 1:
        ans += 1
    cnt = 1
if cnt % 2 == 1:
    ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
A.sort()
j = 1
J = 1
ans = 0
for j in range(1,len(A)-1):
  if (A[j-1] == A[j]):
    J += 1
  else:
    if (J%2 != 0):
      ans += 1
      J = 1
    else:
      J = 1
if (J != 1 and J%2 != 0):
  ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
L = [int(input()) for i in range(N)]
L.sort()
k = 1
for i in range(len(L)-1):
  if (L[i] == L[i+1]):
    k -= 1
  else:
    k += 1
print(k)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
# vim: set fileencoding=utf-8 :
import bisect

n = int(raw_input())
a = [0] * n

for i in xrange(n):
    a[i] = int(raw_input())

a.sort()
ct = 0
wc = 0
temp = 0
if n == 1:
    print(1)
    exit()

for i in range(n):
    if i == 0 or a[i] != a[i - 1]:
        if wc % 2 == 1 and i != 0:
            ct += 1
        wc = 1
    elif a[i] == a[i - 1]:
        wc += 1

print(ct)

Submission status: Wrong Answer

Solution code:
# vim: set fileencoding=utf-8 :
import bisect

n = int(raw_input())
a = [0] * n

for i in xrange(n):
    a[i] = int(raw_input())

a.sort()
ct = 0
wc = 0
temp = 0
for i in range(n):
    if i == 0 or a[i] != a[i - 1]:
        if wc % 2 == 1 and i != 0:
            ct += 1
        wc = 1
    elif a[i] == a[i - 1]:
        wc += 1

print(ct)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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):
  print(cnt)
  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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict

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

d = defaultdict(int)

for i in a:
    if d[i] == 1:
        d[i] = 0
    else:
        d[i] = 1

cnt = 0
for i in a:
    if d[i] == 1:
        cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

A.sort()

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

print(count)

Submission status: Wrong Answer

Solution code:
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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

    print(2 * len(set(a_list)) - len(a_list))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
A_list = []
for i in range(N):
    A_list.append(int(input()))
    
A_list.sort()

res = 0
cnt = 0
ans = 0
for a in A_list:
    if res == a:
        cnt += 1
    else:
        ans += cnt%2
        res = a
        cnt = 1
        
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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 i+1==n-1:
            count+=1
    if x%2==1:
        count+=1
    i+=x
    x=1
print(count)

Submission status: Wrong Answer

Solution code:
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
    x=1
print(count)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list()
ans = 0

for i in range(N):
    ai = input()
    if(not(ai in a)):
        a.append(ai)
        ans += 1
    else:
        ans -= 1
        

print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
A=[None]*N

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

Ans=0
A.sort()
j=1
for i in range(1,N):
    if A[i]==A[i-1]:
        j+=1
    else:
        if j%2==1:
            Ans+=1
        j=1

print(Ans)

Submission status: Wrong Answer

Solution code:
def m():
    N = int(input())
    A = [int(input()) for _ in range(N)]
    ans = 0
    A.sort()
    tmp = -1
    cnt = 0
    for i in range(N):
        if tmp == A[i]:
            cnt +=1
        else:
            if cnt % 2 == 0: pass
            else: ans +=1
            tmp = A[i]
            cnt = 1
    return ans

print(m())

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(input()) for _ in range(N)]
A1 = set(A)
tot = 0
for i in range (len(A1)):
    tot += A.count(A[i])%2
print(tot)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

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

b = list(set(a))

for i in b:
    if a.count(i) % 2 == 0:
        b.remove(i)
    else:
        None
        
print(len(list(b)))

Submission status: Wrong Answer

Solution code:
N = int(input())

l = []
for _ in range(N):
    a = int(input())
    if len(l) == 0:
        l.append(a)
        continue
    lo = 0
    hi = len(l)
    mid = (lo+hi) // 2
    removed = False
    p = (1, 0)
    while not p == (lo, hi):
        p = (lo, hi)
        mid = (lo+hi) // 2
        if l[mid] == a:
            l.pop(mid)
            removed = True
            break
        if l[mid] < a:
            lo = mid
        else:
            hi = mid

    if not removed:
        l.insert(mid+1, a)


print(len(l))

Submission status: Wrong Answer

Solution code:
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()))

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

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

n = ni()
a = [ni() for _ in range(n)]

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

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

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

n = ni()
a = [ni() for _ in range(n)]

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

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

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

n = ni()
a = [ni() for _ in range(n)]

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

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

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

n = ni()
a = [ni() for _ in range(n)]

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

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

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

n = ni()
a = [ni() for _ 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 != 0:
            ans += 1
        count = 1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

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

n = ni()
a = [ni() for _ in range(n)]

a.sort()
b = 0
count = 0
ans = 0
for i in a:
    count = a.count(i)
    if count % 2 != 0:
        ans += 1
    del a[:count]
    if len(a) == 0:
        break

print(ans)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
j = [int(input()) for i in range(int(input()))]
print(len(set(filter(lambda x: j.count(x) % 2 == 0, j))))

Submission status: Wrong Answer

Solution code:
from collections import Counter

count = int(raw_input())
k = [int(raw_input()) for i in xrange(count)]
temp = Counter(k)
counter = 0
for key, value in temp.iteritems():
    if value % 2 == 0:
        counter += 1

print counter

Submission status: Wrong Answer

Solution code:

import collections

num = int(input())
inps = []
for x in range(0,num):
  # inp[x] = int(input())
  inp = int(input())
  inps.append(inp)

# print(inps)
count = collections.Counter(inps)
# print(count.keys())

ans = 0

for x in range(0,int(len(count)) + 1):
  if int(count[x]) % 2 == 1:
  	ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
import collections

num = int(input())
inps = []
for x in range(0,num):
  # inp[x] = int(input())
  inp = int(input())
  inps.append(inp)

# print(inps)
count = collections.Counter(inps)
# print(count.keys())

ans = 0

for x in range(0,int(len(count)) + 1):
  if int(count[x]) % 2 == 1:
  	ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
list = []
number = int(input())
tell = int(input())
for n in range(0,tell):
  if number in list:
    list.remove(number)
  else :
    list.append(number)
    pass

  print(len(list))

Submission status: Wrong Answer

Solution code:
list = []
number = int(input())
for n in range(0, number):
  if number in list:
    list.remove(number)
  else :
    list.append(number)
    pass

  print(len(list))

Submission status: Wrong Answer

Solution code:
# coding: utf-8

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)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python

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

    num_list = [] 
    for _ in range(N):
        num = int(input())
        num_list.append(num)

    num_list.sort()

    sum = 0
    cnt_same_num = 0
    prev_same_num = -1
    for n in num_list:
        if prev_same_num == n:
            cnt_same_num += 1
        else:
            if cnt_same_num % 2 == 1:
                sum += 1
            cnt_same_num = 1
            prev_same_num = n
    print(sum)

        

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python

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
    
    sum = 0
    for key, value in memo.items():
        if value != 0:
            sum += 1
    
    print(sum)
        

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(raw_input())
lis = []
for i in xrange(N):
	num = int(raw_input())
	if not lis:
		lis.append(num)
	else:
		for j in xrange(len(lis)):
			if lis[j] == num:
				lis.pop(j)
				break
			elif lis[j] > num:
				lis.insert(j,num)
				break
		else:
			lis.append(num)
	print lis
print len(lis)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
count = 0
for i in range(n):
	s = int(input())
	if s in a:
		x = a.index(s)
		a.pop(x)
		count  == count -2
	else:
		a.append(s)
		count += 1
print(n - count)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
from collections import Counter
import numpy as np
n = int(input())
a_list = []
for _ in range(n):
    a_list.append(int(input()))

counter = Counter(a_list)
count = list(counter.values())
ar = np.array(count)
ar = ar % 2
ar.sum()

Submission status: Wrong Answer

Solution code:
N = int(input())
l = []
for i in range(N):
    l.append(int(input()))
print(2*len(set(l))-len(l))

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

a.sort() 

flg = True
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
elif flg:
    ans += cnt%2
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

a.sort()

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
if a[N-1] != a[N-2]:
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Here your code !

N = int(input())
list = []
ans = 1
for i in range(N):
    list.append(int(input()))
list.sort()
for i in range(N-1):
    if list[i] == list[i+1]:
        ans -= 1
    else :
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
paper = []
for _ in range(n):
    p = input()
    if p not in paper:
        paper.append(p)
    else:
        paper.remove(p)
print(len(paper) - 1)

Submission status: Wrong Answer

Solution code:
N = raw_input()
N = int(N)

a = []
for i in range(N):
	s_input = raw_input()
	s_input = long(s_input)
	a.append(s_input)

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

if(a[N-1] != a[N-2]):
	result += 1

print(result)

Submission status: Wrong Answer

Solution code:
N = raw_input()
N = int(N)

a = []
for i in range(N):
	s_input = raw_input()
	s_input = long(s_input)
	a.append(s_input)

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

print(result)

Submission status: Wrong Answer

Solution code:
N = raw_input()
N = int(N)

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

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

print(result)

Submission status: Wrong Answer

Solution code:
import numpy as np

n = int(input())

a = np.zeros(n, dtype = int)

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

a = np.sort(a)

sum = 0
for i in range(n):
    if(i == 0):
        flag = 1
    elif(a[i - 1] == a[i]):
        flag += 1
    else:
        if(flag % 2 == 1):
            sum += 1
        elif(i == n - 1):
            sum += 1
        else:
            flag = 1

print(sum)

Submission status: Wrong Answer

Solution code:
import numpy as np

n = int(input())

a = np.zeros(n, dtype = int)

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

a = np.sort(a)

sum = 0
for i in range(n):
    if(i == 0):
        flag = 1
    elif(a[i - 1] == a[i]):
        flag += 1
    else:
        if(flag % 2 == 1):
            sum += 1
        else:
            flag = 1

print(sum)

Submission status: Wrong Answer

Solution code:
import numpy as np

n = int(input())

a = np.zeros(n, dtype = int)

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

a = np.sort(a)

sum = 0
for i in range(n):
    if(i == 0):
        temp = a[i]
        flag = True
    elif(temp == a[i]):
        flag = not(flag)
    else:
        if(flag == True):
            sum += 1
        else:
            flag = not(flag)
        temp = a[i]

print(sum)

Submission status: Wrong Answer

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

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

ans = 0
i = 0
tmp = 1

while i < len(A)-1:
    
    if A[i] == A[i+1]:
        tmp += 1
    else:
        if tmp % 2 == 1:
            ans += 1
        tmp = 1
        
    i += 1
    
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

nums.sort()

ans = 0
cnt = 0
tmp = nums[0]
for i in range(N):

    if tmp == nums[i]:
        cnt += 1
    else:
        if cnt % 2 == 0:
            ans += 1
        cnt = 0
    tmp = nums[i]

print(ans - 1)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = [int(input()) for i in range(N)]
n = N
for i in range(N-1):
	j = i + 1
	while j <= N-1:
		if a[i] != a[j]:
			j += 1
		else:
			n -= 2
			break		
print(n)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
import numpy as np
N=input()
x=[]
dict={}
for i in range(N):
    a=raw_input()
    if a in dict:
        dict[a]+=1
    else:
        dict[a]=1
   
print np.sum(np.array(dict.values())/2)

Submission status: Wrong Answer

Solution code:
import numpy as np
N=input()
x=[]
dict={}
for i in range(N):
    a=raw_input()
    if a in dict:
        dict[a]+=1
    else:
        dict[a]=1
    print dict

print np.array(dict.values())/2
print np.sum(np.array(dict.values())/2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
def main():
    a = []
    ans = 0
    temp_index = 0
    count_num = 0

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

    while temp_index<N:
        temp_value = a[temp_index]
        for comp_value in a[temp_index:]:
        
            if temp_index<N and comp_value==temp_value:
                count_num += 1

        temp_index += count_num
        ans += count_num%2
        count_num = 0
    return print(ans)

if __name__=="__main__":
    main()

Submission status: Wrong Answer

Solution code:
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))

Submission status: Wrong Answer

Solution code:
n = int(input())
ary = []
for _ in range(n):
  ary.append(int(input()))
 
ary.sort()
last = -1
counter = 0
result = 0
 
for i, el in enumerate(ary):
  if last == el:
    # count the same numbers
    counter += 1
    if i == n-1:
      result += counter%2
  else:
    # increment
    result += counter%2
    
    # initialize
    counter = 1
    last = el
    
 
print(result)

Submission status: Wrong Answer

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

ary.sort()
last = -1
counter = 0
result = 0

for el in ary:
  if last == el:
    # count the same numbers
    counter += 1
  else:
    # increment
    result += counter%2
    
    # initialize
    counter = 1
    last = el

print(result)

Submission status: Wrong Answer

Solution code:
d={}
for _ in range(int(raw_input())):
	i=int(raw_input())
	if i not in d:
		d[i]=1
	else:
		d[i]=0
ans=0
for i in d:
	ans+=d[i]
print ans