output_description: Print the minimum number of elements that needs to be replaced.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      n
      v_1 v_2 ... v_n
attempt: import numpy as np
  
  n = int(input())
  v = np.array(list(map(int, input().split())))
  v1 = v.reshape(n // 2, 2)[:, 0]
  v2 = v.reshape(n // 2, 2)[:, 1]
  v1_unique = np.unique(v1)
  v2_unique = np.unique(v2)
  # 先に数字次に個数（新居まで）
  maxs1 = [0, 0, 0, 0]
  ma = 0
  for i in range(v1_unique.shape[0]):
      num = v1[v1 == v1_unique[i]].shape[0]
      if num > maxs1[1]:
          maxs1[0] = v1_unique[i]
          maxs1[1] = num
      elif num > maxs1[3]:
          maxs1[2] = v1_unique[i]
          maxs1[3] = num
  maxs2 = [0, 0, 0, 0]
  for i in range(v2_unique.shape[0]):
      num = v2[v2 == v2_unique[i]].shape[0]
      if num > maxs2[1]:
          maxs2[0] = v2_unique[i]
          maxs2[1] = num
      elif num > maxs2[3]:
          maxs2[2] = v2_unique[i]
          maxs2[3] = num
  if maxs1[0] != maxs2[0]:
      ma = n - maxs1[1] - maxs2[1]
  elif (maxs1[1] + maxs2[3]) > (maxs2[1] + maxs1[3]):
      ma = n - maxs1[1] - maxs2[3]
  else:
      ma = n - maxs2[1] - maxs1[3]
  print(ma)
  
problem_description: Statement
  
  A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following
  conditions are satisfied:
  
    * For each i = 1,2,..., n-2, a_i = a_{i+2}.
    * Exactly two different numbers appear in the sequence.
  
  You are given a sequence v_1,v_2,...,v_n whose length is even. We would like
  to make this sequence /\/\/\/ by replacing some of its elements. Find the
  minimum number of elements that needs to be replaced.
samples: [{"input": "4\n    3 1 3 2", "output": "1\n    \n\nThe sequence 3,1,3,2 is not /\\/\\/\\/, but we can make it /\\/\\/\\/ by replacing\none of its elements: for example, replace the fourth element to make it\n3,1,3,1.\n\n* * *"}, {"input": "6\n    105 119 105 119 105 119", "output": "0\n    \n\nThe sequence 105,119,105,119,105,119 is /\\/\\/\\/.\n\n* * *"}, {"input": "4\n    1 1 1 1", "output": "2\n    \n\nThe elements of the sequence 1,1,1,1 are all the same, so it is not /\\/\\/\\/."}]