Problem p03246 (python)

Fixed submission:
# -*- coding: utf-8 -*-
import numpy as np
from collections import Counter
N = input()
t = np.array(map(int, raw_input().split()))

odd = t[0::2]
even = t[1::2]
rest = 0

co = Counter(odd)
ce = Counter(even)

omc = co.most_common()
emc = ce.most_common()

if omc[0][0] == emc[0][0]:
    if len(omc) < 2 and len(emc) < 2:       # same
        rest = len(even)
    elif len(omc) < 2:
        rest = len(even)
    elif len(emc) < 2:
        rest = len(odd)
    else:
        or1 = len(odd) - co.most_common()[0][1]
        or2 = len(odd) - co.most_common()[1][1]
        er1 = len(even) - ce.most_common()[0][1]
        er2 = len(even) - ce.most_common()[1][1]

        if or1 + er2 > or2 + er1:
            rest = or2 + er1
        else:
            rest = or1 + er2
else:
    rest = len(odd) - co.most_common()[0][1] + len(even) - ce.most_common()[0][1]


print rest

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import numpy as np
from collections import Counter


N = input()
# N = int(input())
# t = np.array(list(map(int, input().split())))
t = np.array(map(int, raw_input().split()))

odd = t[0::2]
even = t[1::2]

rest = 0

for _k in [odd, even]:
    counter = Counter(tmp_list)

    # counter.most_common()[0][0]
    # uni = list(set(_k))
    # cnt = np.zeros((len(uni), ))
    # for _i in uni:
    #     cnt[uni.index(_i)] += 1
    # unique = np.unique(odd, return_counts=True)
    # rest += len(_k) - count[np.argmax(count)]
    rest += len(_k) - counter.most_common()[0][1]
print rest

Buggy submission (verdict: Runtime Error):
import numpy as np

N = input()
# N = int(input())
# t = np.array(list(map(int, input().split())))
t = np.array(map(int, raw_input().split()))

odd = t[0::2]
even = t[1::2]

np.unique(odd, return_counts=True)

Buggy submission (verdict: Runtime Error):
import numpy as np

N = input()
# N = int(input())
# t = np.array(list(map(int, input().split())))
t = map(int, raw_input().split())

odd = t[0::2]
even = t[1::2]

rest = 0

for _k in [odd, even]:
    uni = list(set(_k))
    cnt = np.zeros((len(uni), ))
    for _i in _k:
        cnt[uni.index(_i_)] += 1

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import numpy as np

N = input()
# N = int(input())
# t = np.array(list(map(int, input().split())))
t = map(int, raw_input().split())

odd = t[0::2]
even = t[1::2]

rest = 0

for _k in [odd, even]:
    uni = list(set(_k))
    cnt = np.zeros((len(uni), ))
    for _i in _k:
        cnt[uni.index(_i_)] += 1
    # unique = np.unique(odd, return_counts=True)
    # rest += len(_k) - count[np.argmax(count)]
    rest += len(_k) - np.max(cnt)
print rest

Buggy submission (verdict: Runtime Error):
import numpy as np

N = input()
# N = int(input())
# t = np.array(list(map(int, input().split())))
t = map(int, raw_input().split())

odd = t[0::2]
even = t[1::2]

def get_count(L):
    for 


rest = 0
unique = np.unique(odd, return_counts=True)
print 'a'

Buggy submission (verdict: Runtime Error):
import numpy as np

N = input()
# N = int(input())
# t = np.array(list(map(int, input().split())))
t = map(int, raw_input().split())

odd = t[0::2]
even = t[1::2]

rest = 0
aa = np.unique(odd, return_counts=True)

Buggy submission (verdict: Runtime Error):
import numpy as np

N = input()
# N = int(input())
# t = np.array(list(map(int, input().split())))
t = map(int, raw_input().split())

odd = t[0::2]
even = t[1::2]

rest = 0
unique, count = np.unique(odd, return_counts=True)

print 'h'

Buggy submission (verdict: Runtime Error):
import numpy as np

N = input()
# N = int(input())
# t = np.array(list(map(int, input().split())))
t = map(int, raw_input().split())

odd = t[0::2]
even = t[1::2]

rest = 0
for _k in [odd, even]:
    unique, count = np.unique(_k, return_counts=True)


print 'h'

Buggy submission (verdict: Runtime Error):
import numpy as np

N = input()
# N = int(input())
# t = np.array(list(map(int, input().split())))
t = map(int, raw_input().split())

odd = t[0::2]
even = t[1::2]

rest = 0
for _k in [odd, even]:
    unique, count = np.unique(_k, return_counts=True)
    rest += np.sum(count) - count[np.argmax(count)]

print rest

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import numpy as np

N = input()
# N = int(input())
# t = np.array(list(map(int, input().split())))
t = map(int, raw_input().split())

odd = t[0::2]
even = t[1::2]

rest = 0
for _k in [odd, even]:
    unique, count = np.unique(_k, return_counts=True)
    rest += np.sum(count) - count[np.argmax(count)]

print rest

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import numpy as np

N = int(input())
t = np.array(list(map(int, input().split())))

odd = t[0::2]
even = t[1::2]

rest = 0
for _k in [odd, even]:
    unique, count = np.unique(_k, return_counts=True)
    rest += np.sum(count) - count[np.argmax(count)]

print(rest)