Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
s = raw_input()
n = len(s)
if not n & 1:
    l = n / 2 - 1
    r = n / 2
    res = n / 2
    while r < n and l >= 0 and s[l] == s[r]:
        l -= 1
        r += 1
        res += 1
    print res
else:
    l = n / 2 - 1
    r = n / 2 + 1
    res = n / 2 + 1
    if s[n / 2] != s[l] or s[n / 2] != s[r]:
        print res
    else:
        while r < n and l >= 0 and s[l] == s[r]:
            l -= 1
            r += 1
            res += 1
        print res

Fixed submission:
s = raw_input()
n = len(s)
if n == 1:
    print 1
    exit()
if not n & 1:
    l = n / 2 - 1
    r = n / 2
    res = n / 2
    while r < n and l >= 0 and s[l] == s[r]:
        l -= 1
        r += 1
        res += 1
    print res
else:
    l = n / 2 - 1
    r = n / 2 + 1
    res = n / 2 + 1
    if s[n / 2] != s[l] or s[n / 2] != s[r]:
        print res
    else:
        while r < n and l >= 0 and s[l] == s[r]:
            l -= 1
            r += 1
            res += 1
        print res
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, raw_input().split())
a = map(int, raw_input().split())
s = set(a)
if len(s) < k:
    print 0
    exit()
d = sorted([(i, a.count(i)) for i in s], key = lambda x: x[1])
cnt = 0
for i in d[:len(s) - k]:
    cnt += i[1]
print cnt


Fixed submission:
n, k = map(int, raw_input().split())
a = map(int, raw_input().split())
s = set(a)
if len(s) < k:
    print 0
    exit()
d = dict()
for i in a:
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
cnt = 0
for i in sorted(d.values())[:len(s) - k]:
    cnt += i
print cnt
Buggy python submission (verdict: Runtime Error):
l = [2, 1]
for x in xrange(100):
    l.append(l[-2] + l[-1])
print l[input()]

Fixed submission:
from itertools import groupby
if [len(list(e)) for k, e in groupby(raw_input()) if len(list(e)) >= 3]:
    print 'Yes'
else:
    print 'No'

Buggy python submission (verdict: Runtime Error):
s = raw_input()
if set(s) <= 2 and (s[0] != s[1] or s[2] != s[3]):
    print 'Yes'
else:
    print 'No'

Fixed submission:
from itertools import groupby
if [len(list(e)) for k, e in groupby(raw_input()) if len(list(e)) >= 3]:
    print 'Yes'
else:
    print 'No'
Buggy python submission (verdict: Runtime Error):
from bisect import bisect_left, bisect_right
br, bl = bisect_right, bisect_left
n = input()
a = sorted([int(x) for x in raw_input().split()])
b = sorted([int(x) for x in raw_input().split()])
c = sorted([int(x) for x in raw_input().split()])
ans = 0
for bi in b:
	ans += (bl(a, bi) * (n - br(c, bi)))
print ans

Fixed submission:
a = raw_input()
b = raw_input()
if a == b[::-1]:
	print 'YES'
else:
	print 'NO'
Buggy python submission (verdict: Time Limit Exceeded):
from bisect import bisect_right as br
from array import array
n = input()
a = array('l', sorted([int(x) for x in raw_input().split()]))
b = array('l', sorted([int(x) for x in raw_input().split()]))
c = array('l', sorted([int(x) for x in raw_input().split()]))
ans = 0
for ai in a:
	index = br(b, ai)
	for bi in b[index:]:
		ans += (n - br(c, bi))
print ans


Fixed submission:
from bisect import bisect_left, bisect_right
br, bl = bisect_right, bisect_left
n = input()
a = sorted([int(x) for x in raw_input().split()])
b = sorted([int(x) for x in raw_input().split()])
c = sorted([int(x) for x in raw_input().split()])
ans = 0
for bi in b:
	ans += (bl(a, bi) * (n - br(c, bi)))
print ans

Buggy python submission (verdict: Time Limit Exceeded):
from bisect import bisect_right
n = input()
a = sorted([int(x) for x in raw_input().split()])
b = sorted([int(x) for x in raw_input().split()])
c = sorted([int(x) for x in raw_input().split()])
ans = 0
for ai in a:
	index = bisect_right(b, ai)
	for bi in b[index:]:
		ans += (n - bisect_right(c, bi))
print ans

Fixed submission:
from bisect import bisect_left, bisect_right
br, bl = bisect_right, bisect_left
n = input()
a = sorted([int(x) for x in raw_input().split()])
b = sorted([int(x) for x in raw_input().split()])
c = sorted([int(x) for x in raw_input().split()])
ans = 0
for bi in b:
	ans += (bl(a, bi) * (n - br(c, bi)))
print ans
Buggy python submission (verdict: Runtime Error):
n = input()
a = [0] * 100000
for i in xrange(n):
	l, r = [int(x) for x in raw_input().split()]
	if l == r:
		a[l] = 1
		continue
	a[l:r + 1] = [1] * (r - l + 1)
print a.count(1)

Fixed submission:
n = input()
a = [0] * 100010
for i in xrange(n):
	l, r = [int(x) for x in raw_input().split()]
	a[l:r + 1] = [1] * (r - l + 1)
print a.count(1)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
n, l, b = input(), raw_input().split(), deque()
for t in xrange(n):
    b.append(l[t])
    b.reverse()
print ' '.join(b)

Fixed submission:
from collections import deque
n, l, b = input(), raw_input().split(), deque()
for t in xrange(n):
    if (t + 1) % 2:
        b.append(l[t])
    else:
        b.appendleft(l[t])
print ' '.join(reversed(b)) if n % 2 else ' '.join(b)
Buggy python submission (verdict: Runtime Error):
def main():
	n, a, b = [int(x) for x in raw_input().split()]
	if a == b:
		print 1
		return
	if n == 1:
		print 0
		return
	from itertools import combinations
	s = set()
	for t in combinations(sorted(range(a, b + 1) * 2), n - 2):
		ans = a + b
		for e in t:
			ans += e
		s.add(ans)
	print len(s)
	print s
	return
	
main()

Fixed submission:
n, a, b = [int(x) for x in raw_input().split()]
print max((b - a + 1) * (n - 2) - (n - 3), 0)
		#^^THIS IS LENGTH OF [a, ..., a, a+1, ..., b]
							  #^^THIS IS THE PART WHICH IS UNAVAILABLE
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
 
tmp = [0] * N
 
for i in range(K):
  input()
  for j in map(int, input().split()):
 	tmp[j-1] |= 1 
print(sum(tmp))

Fixed submission:
N, K = map(int, input().split())
 
tmp = set()
 
for i in range(K):
  input()
  tmp |= set(map(int, input().split()))
 
print(len(set(range(1, N+1)) - tmp))

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
 
tmp = [0] * N
 
for i in range(K):
  input()
  for j in map(int, input().split()):
 	tmp[j-1] |= 1 
print(sum(tmp))


Fixed submission:
N, K = map(int, input().split())
 
tmp = set()
 
for i in range(K):
  input()
  tmp |= set(map(int, input().split()))
 
print(len(set(range(1, N+1)) - tmp))

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
 
tmp = [0] * N
 
for i in range(K):
  input()
  for j in map(int, input().split()):
 	tmp[j] |= 1 
print(sum(tmp))


Fixed submission:
N, K = map(int, input().split())
 
tmp = set()
 
for i in range(K):
  input()
  tmp |= set(map(int, input().split()))
 
print(len(set(range(1, N+1)) - tmp))

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
 
tmp = [0] * N
 
for i in range(K):
  input()
  for j in set(map(int, input().split())):
 	tmp[j] |= 1 
print(sum(tmp))

Fixed submission:
N, K = map(int, input().split())
 
tmp = set()
 
for i in range(K):
  input()
  tmp |= set(map(int, input().split()))
 
print(len(set(range(1, N+1)) - tmp))

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
 
tmp = [0] * N
 
for i in range(K):
  input()
  for j in set(map(int, input().split()))
 	tmp[j] |= 1 
print(sum(tmp))

Fixed submission:
N, K = map(int, input().split())
 
tmp = set()
 
for i in range(K):
  input()
  tmp |= set(map(int, input().split()))
 
print(len(set(range(1, N+1)) - tmp))

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
 
tmp = [0] * N
 
for i in range(K):
  input()
  for j in map(int, input().split()):
    tmp[j] |= 1
 
print(sum(tmp))

Fixed submission:
N, K = map(int, input().split())
 
tmp = set()
 
for i in range(K):
  input()
  tmp |= set(map(int, input().split()))
 
print(len(set(range(1, N+1)) - tmp))

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
 
tmp = set()
 
for i in range(N):
  input()
  tmp |= set(map(int, input().split()))
 
print(len(set(range(1, N+1)) - tmp))

Fixed submission:
N, K = map(int, input().split())
 
tmp = set()
 
for i in range(K):
  input()
  tmp |= set(map(int, input().split()))
 
print(len(set(range(1, N+1)) - tmp))

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())

tmp = {}

for i in range(N):
  input()
  tmp |= set(map(int, input().split()))

print(len(set(range(1, N+1)) - tmp))

Fixed submission:
N, K = map(int, input().split())
 
tmp = set()
 
for i in range(K):
  input()
  tmp |= set(map(int, input().split()))
 
print(len(set(range(1, N+1)) - tmp))
Buggy python submission (verdict: Time Limit Exceeded):
import math
K = int(input())
s = 0
for a in range(1, K + 1):
    for b in range(1, K + 1):
        for c in range(1, K + 1):
            s = s + math.gcd(math.gcd(a, b), c)

print(s)


Fixed submission:
import math
K = int(input())
s = 0
for a in range(1, K + 1):
    for b in range(1, K + 1):
        for c in range(1, K + 1):
            s = s + math.gcd(math.gcd(a, b), c)

print(s)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()
sumnum = 0

if (n == 1) or (n == 2):
    print(0)
    exit()

for k in range(3, n + 1):
    for j in range(2, k):
        for i in range(1, j):
            if (s[i - 1] != s[j - 1]) and (s[j - 1] != s[k - 1]) and (s[k - 1] != s[i - 1]):
                if j - i != k - j:
                    sumnum += 1

print(sumnum)



Fixed submission:
n = int(input())
s = input()
firstcond = s.count('R') * s.count('G') * s.count('B')
minus = 0

for k in range(3, n + 1):
    for j in range(2, k):
        i = 2 * j - k
        if 1 <= i < j:
            if (s[i - 1] != s[j - 1]) and (s[j - 1] != s[k - 1]) and (s[k - 1] != s[i - 1]):
                minus += 1

print(firstcond - minus)
Buggy python submission (verdict: Runtime Error):
S = input()
li = []
for s in S:
    li.append(int(s))

count = 0
first = li[0]i
for i in range(len(li)):
    if i % 2 == 0:
        if li[i] != first:
            count += 1
    else:
        if li[i] == first:
            count += 1

count2 = 1
for i in range(len(li)):
    if i % 2 == 0:
        if li[i] == first:
            count2 += 1
    else:
        if li[i] != first:
            count += 1

print(min(count,count2))

Fixed submission:
S = input()
li = []
for s in S:
    li.append(int(s))

count = 0
first = li[0]
for i in range(len(li)):
    if i % 2 == 0:
        if li[i] != first:
            count += 1
    else:
        if li[i] == first:
            count += 1

count2 = 1
for i in range(len(li)):
    if i % 2 == 0:
        if li[i] == first:
            count2 += 1
    else:
        if li[i] != first:
            count2 += 1

print(min(count, count2))
Buggy python submission (verdict: Runtime Error):
import math
Alp = [chr(ord('a') + i) for i in range(26)]
N = int(input())
k = int(math.ceil(math.log((25*N/26)+1,26)))
n = int(N-(26*(26**(k-1)-1)/25))
for i in range(k):
  if i<k-1:
    kre = int(n//(26**(k-1-i)))
    print(Alp[kre], end='')
    n -= int((26**(k-1-i))*kre)
  else:
    print(Alp[n-1], end='')

Fixed submission:
import math
Alp = [chr(ord('a') + i) for i in range(26)]
N = int(input())
k = int(math.ceil(math.log((25*N/26)+1,26)))
n = int(N-(26*(26**(k-1)-1)/25))
for i in range(k):
  if i<k-1:
    if n%(26**(k-1-i))!=0:
      kre = int(n//(26**(k-1-i)))
    else:
      kre = int(n/(26**(k-1-i))-1)
    print(Alp[kre], end='')
    n -= int((26**(k-1-i))*kre)
  else:
    print(Alp[n-1], end='')

Buggy python submission (verdict: Runtime Error):
import math
Alp = [chr(ord('a') + i) for i in range(26)]
N = int(input())
k = math.ceil(math.log((25*N/26)+1,26))
n = N-(26*(26**(k-1)-1)/25)
for i in range(k):
  if i<k-1:
    kre = int(n//(26**(k-1-i)))
    print(Alp[kre], end='')
    n -= (26**(k-1-i))*kre
  else:
    print(Alp[int(n-1)], end='')

Fixed submission:
import math
Alp = [chr(ord('a') + i) for i in range(26)]
N = int(input())
k = int(math.ceil(math.log((25*N/26)+1,26)))
n = int(N-(26*(26**(k-1)-1)/25))
for i in range(k):
  if i<k-1:
    if n%(26**(k-1-i))!=0:
      kre = int(n//(26**(k-1-i)))
    else:
      kre = int(n/(26**(k-1-i))-1)
    print(Alp[kre], end='')
    n -= int((26**(k-1-i))*kre)
  else:
    print(Alp[n-1], end='')

Buggy python submission (verdict: Runtime Error):
import math
Alp = [chr(ord('a') + i) for i in range(26)]
N = int(input())
k = math.ceil(math.log((25*N/26)+1,26))
n = N-(26*(26**(k-1)-1)/25)
for i in range(k):
  if i<k-1:
    kre = int(n//(26**(k-1-i)))
    print(Alp[kre], end='')
    n -= (26**(k-1-i))*kre
  else:
    print(Alp[int(n-1)])

Fixed submission:
import math
Alp = [chr(ord('a') + i) for i in range(26)]
N = int(input())
k = int(math.ceil(math.log((25*N/26)+1,26)))
n = int(N-(26*(26**(k-1)-1)/25))
for i in range(k):
  if i<k-1:
    if n%(26**(k-1-i))!=0:
      kre = int(n//(26**(k-1-i)))
    else:
      kre = int(n/(26**(k-1-i))-1)
    print(Alp[kre], end='')
    n -= int((26**(k-1-i))*kre)
  else:
    print(Alp[n-1], end='')
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(x) for x in input().split()]
Q = int(input())
BC = [[int(x) for x in input().split()]for i in range(Q)]

for i in range(Q):
  b = BC[i][0]
  c = BC[i][1]
  A = [c if i == b else i for i in A]
  print(sum(A))



Fixed submission:
import collections
N = int(input())
a = [int(x) for x in input().split()]
aa = collections.Counter(a)
A = list(aa.items())
Alisted = [0]*(10**5+1)
for i in range(len(A)):
  Alisted[A[i][0]] = A[i][1]
Q = int(input())
BC = [[int(x) for x in input().split()]for i in range(Q)]

Sum = sum(a)
for i in range(Q):
  b = BC[i][0]
  c = BC[i][1]
  num = Alisted[b]
  Sum += (c-b)*num
  print(Sum)
  Alisted[b]=0
  Alisted[c]+=num

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(x) for x in input().split()]
Q = int(input())
BC = [[int(x) for x in input().split()]for i in range(Q)]

Sum = sum(A)
for i in range(Q):
  b = BC[i][0]
  c = BC[i][1]
  Sum += (c-b)*A.count(b)
  print(Sum)
  A = [c if i == b else i for i in A]


Fixed submission:
import collections
N = int(input())
a = [int(x) for x in input().split()]
aa = collections.Counter(a)
A = list(aa.items())
Alisted = [0]*(10**5+1)
for i in range(len(A)):
  Alisted[A[i][0]] = A[i][1]
Q = int(input())
BC = [[int(x) for x in input().split()]for i in range(Q)]

Sum = sum(a)
for i in range(Q):
  b = BC[i][0]
  c = BC[i][1]
  num = Alisted[b]
  Sum += (c-b)*num
  print(Sum)
  Alisted[b]=0
  Alisted[c]+=num
Buggy python submission (verdict: Runtime Error):
S = [int(x) for x in input().split()]
for i in range(5):
	if S[i]==0:
  		print(i+1)
        exit()

Fixed submission:
S = [int(x) for x in input().split()]
for i in range(5):
	if S[i]==0:
		print(i+1)
		exit()

Buggy python submission (verdict: Runtime Error):
S = [int(x) for x in input().split()]
for i in range(5)
	if S[i]==0
  		print(i+1)
        exit()

Fixed submission:
S = [int(x) for x in input().split()]
for i in range(5):
	if S[i]==0:
		print(i+1)
		exit()
Buggy python submission (verdict: Runtime Error):
S = input()
if S = 'ABC': print('ARC')
else: print('ABC')

Fixed submission:
S = input()
if S == 'ABC': print('ARC')
else: print('ABC')
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
list = []
list.append(str(input()))

for i in range(N-1):
  s = str(input())
  for j in range(len(list)):
    if list[j]==s: break
    elif j==len(list)-1 : list.append(s)

print(len(list))

Fixed submission:
N = int(input())
List = [str(input()) for i in range(N)] 
print(len(list(set(List))))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
list = []
list.append(str(input()))

for i in range(N-1):
  s = str(input())
  for j in range(len(list)):
    if list[j]==s: break
    elif j==len(list)-1 : list.append(s)

print(len(list))

Fixed submission:
N = int(input())
List = [str(input()) for i in range(N)] 
print(len(list(set(List))))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
list = []
for i in range(N):
  s = str(input())
  for x in list:
    if x == s: break
  else:
    list.append(s)
print(len(list))

Fixed submission:
N = int(input())
List = [str(input()) for i in range(N)] 
print(len(list(set(List))))
Buggy python submission (verdict: Runtime Error):
A = list(int(input))
if 7 in A: print('Yes')
else: print('No')


Fixed submission:
n = input()
A = list(n)
if '7' in A: print('Yes')
else: print('No')
Buggy python submission (verdict: Runtime Error):
from collections import Counter
N = int(input())
L = [str(input()) for i in range(N)]
Lc = Counter(L).most_common()
Llist = []             
L_max = Lc[0][1]       
i = 0
while True:
  Llist.append(Lc[i][0])
  if Lc[i+1][1]==L_max:
    i+=1
  else:
    break
print("\n".join(sorted(Llist)))

Fixed submission:
from collections import Counter
N = int(input())
L = [str(input()) for i in range(N)]
Lc = Counter(L).most_common()
Llist = []             
L_max = Lc[0][1]       
i = 0
while True:
  Llist.append(Lc[i][0])
  if i<len(Lc)-1 and Lc[i+1][1]==L_max:
    i+=1
  else:
    break
print("\n".join(sorted(Llist)))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
L = [int(x) for x in input().split()]

def Min(i,L):
  if i == 0:
    return L[0]
  else:
    return min(Min(i-1,L), L[i])

count = 1
for i in range(1,N):
  if L[i]<=Min(i-1,L):
    count+=1
print(count)

Fixed submission:
N = int(input())
L = [int(x) for x in input().split()]
count = 1
Min = L[0]
for i in range(1,N):
  if L[i]<=Min:
    count+=1
  Min = min(Min,L[i])
print(count)
Buggy python submission (verdict: Runtime Error):
D, G = map(int, input().split()) 
S = [[int(x) for x in input().split()]for i in range(D)]
Minimum_can = []
for i in range(2**D-1):
    binary = str(format(i,'b'))
    binary_zero = binary.zfill(D)
    SUM = 0
    Number = 0
    for j in range(D):
        if binary_zero[j]=='1':
            SUM += S[j][0]*100*(j+1)+S[j][1]
            Number += S[j][0]
    if SUM == G: Minimum_can.append(Number)        
    elif SUM < G:
        Biggest_0_number = 0
        for k in range(D):
            if binary_zero[D-k-1]=='0':
                Biggest_0_number = D-k-1
                break
        for k in range(S[Biggest_0_number][0]):
            if SUM+100*(Biggest_0_number+1)*(k+1) >= G:
                Minimum_can.append(Number+k+1)
                break 
print(min(Minimum_can))


Fixed submission:
D, G = map(int, input().split()) 
S = [[int(x) for x in input().split()]for i in range(D)]
Minimum_can = []
for i in range(2**D):
    binary = str(format(i,'b'))
    binary_zero = binary.zfill(D)
    SUM = 0
    Number = 0
    for j in range(D):
        if binary_zero[j]=='1':
            SUM += S[j][0]*100*(j+1)+S[j][1]
            Number += S[j][0]
    if SUM >= G: Minimum_can.append(Number)        
    elif SUM < G:
        Biggest_0_number = 0
        for k in range(D):
            if binary_zero[D-k-1]=='0':
                Biggest_0_number = D-k-1
                break
        for k in range(S[Biggest_0_number][0]):
            if SUM+100*(Biggest_0_number+1)*(k+1) >= G:
                Minimum_can.append(Number+k+1)
                break 
print(min(Minimum_can))
Buggy python submission (verdict: Runtime Error):
A, B, C, D, E, F = map(int,input().split())
answer_number = [0,0,0,0]
answer_max = 0
for i in range((F/(100*A))+1):
  for j in range(((F-100*A*i)/(100*B))+1):
    if i==0 and j ==0: continue
    for k in range(((F-100*A*i-100*B*j)/C)+1):
      for l in range(((F-100*A*i-100*B*j-C*k)/D)+1):
        if (C*k+D*l)/(A*i+B*j) <= E:
          if (C*k+D*l)/(A*i+B*j) > answer_max:
            answer_max = (C*k+D*l)/(A*i+B*j)      #### k
            answer_number = [i,j,k,l]
if answer_number == [0,0,0,0]: print(0,0)
else:
  print(C*answer_number[2]+D*answer_number[3]+100*(A*answer_number[0]+B*answer_number[1]), C*answer_number[2]+D*answer_number[3])
  


Fixed submission:
A, B, C, D, E, F = map(int,input().split())
answer_number = [0,0,0,0]
answer_max = 0
for i in range((F//(100*A))+1):
  for j in range(((F-100*A*i)//(100*B))+1):
    if i==0 and j ==0: continue
    for k in range(((F-100*A*i-100*B*j)//C)+1):
      for l in range(((F-100*A*i-100*B*j-C*k)//D)+1):
        if (C*k+D*l)/(A*i+B*j) <= E:
          if (C*k+D*l)/(A*i+B*j) > answer_max:
            answer_max = (C*k+D*l)/(A*i+B*j)      #### k
            answer_number = [i,j,k,l]
if answer_max == 0: print(100*A,0)
else:
  print(C*answer_number[2]+D*answer_number[3]+100*(A*answer_number[0]+B*answer_number[1]), C*answer_number[2]+D*answer_number[3])
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(input()) for i in range(N)]
A.sort()
count = 0
while A:
  a = A[0]
  b = A.count(a)
  if b%2 == 1:
    count += 1
  del A[:b]
print(count)


Fixed submission:
import collections
N = int(input())
A = [int(input()) for i in range(N)]
C = list(collections.Counter(A).values())
counter = 0
for x in C:
  if x%2 == 1:
    counter += 1
print(counter)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(input()) for i in range(N)]
A.sort()
count = 0
while A:
  a = A.count(A[0])
  if a%2 == 1:
    count += 1
  del A[:a]
print(count)

Fixed submission:
import collections
N = int(input())
A = [int(input()) for i in range(N)]
C = list(collections.Counter(A).values())
counter = 0
for x in C:
  if x%2 == 1:
    counter += 1
print(counter)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
count_list = []
for i in range(10**5):
  count_list.append(A.count(i))
Max = 0
for i in range(10**5-2):
  Max = max(Max, count_list[i]+count_list[i+1]+count_list[i+2])
print(Max)
  

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
count_list = [0]*10**5
for i in range(N):
  count_list[A[i]] += 1
Max = 0
for i in range(10**5-2):
  Max = max(Max, count_list[i]+count_list[i+1]+count_list[i+2])
print(Max)
Buggy python submission (verdict: Time Limit Exceeded):
import math
N = int(input())
n = math.floor(math.sqrt(N))
i=0
while True:
  if N%(n+i) == 0:
    print(len(str((n+i))))
    exit()
  else: i+=1

Fixed submission:
import math
N = int(input())
n = math.floor(math.sqrt(N))
for i in range(n):
  if N%(n-i) == 0:
    print(len(str(N//(n-i))))
    exit()
Buggy python submission (verdict: Time Limit Exceeded):
N, C, K = map(int,input().split())
T = [int(input()) for i in range(N)]
T.sort()
counter = 0
i = 0
while i<N:
    for j in range(C):
        if i+(C-j-1)<N and T[i]+K >= T[i+(C-j-1)]:
            counter += 1
            i = i+(C-j-1)+1
            break
print(counter)



Fixed submission:
N, C, K = map(int,input().split())
T = [int(input()) for i in range(N)]
T.sort(reverse = True)
counter = 1
i = 0           #### whileの中のカウント（バス乗車数）
A = T.pop()     #####先頭
while T:
  a = T.pop()
  i+=1
  if i>=C or a>A+K:
    i=0
    A=a
    counter += 1
  
print(counter)
Buggy python submission (verdict: Runtime Error):
# !/usr/bin/env python
# -*- coding utf-8 -*-

import sys

n = input()
a = raw_input().split() #a[0], a[1], .., a[n]
n = int(n)
b = []

for i in range(n):
    b.append(a[i])
    b.reverse()

for i in range(n):
    print b[i],

Fixed submission:
import sys
import math

l = raw_input().split()
l[0] = int(l[0])
l[1] = int(l[1])
l[2] = int(l[2])

sum = l[0]+l[1]+l[2]
min = sum

for i in range(3):
    s = sum - l[i]
    if s < min:
        min = s

print min
Buggy python submission (verdict: Runtime Error):
import math
import sys

x,y=[int(i) for i in input().split()]

if x > y:
    print("GREATER")
elif x == y:
    print("EQUAL")
else:
    print("LESS")


Fixed submission:
import math
import sys

s = input().split()

print(s[0][0].upper() + s[1][0].upper() + s[2][0].upper())
Buggy python submission (verdict: Runtime Error):
import math
import sys

x,y=[int(i) for i in input().split()]

if x == y:
    print("EQUAL")
elif x > y:
    print("GREATER")
else:
    print("LESS")


Fixed submission:
import math
import sys

x = int(input())
y = int(input())

if x == y:
    print("EQUAL")
elif x > y:
    print("GREATER")
else:
    print("LESS")

Buggy python submission (verdict: Runtime Error):
import math
import sys

x,y=[int(i) for i in input().split()]

if x > y:
    print("GREATER")
elif x == y:
    print("EQUAL")
else:
    print("LESS")


Fixed submission:
import math
import sys

x = int(input())
y = int(input())

if x == y:
    print("EQUAL")
elif x > y:
    print("GREATER")
else:
    print("LESS")