input: Write a function to optimize a list of integers by pairing and minimizing them.
  assert optimize_ints([2, 4, 6, 10, 12]) == [2, 2, 4, 4, 6]
  assert optimize_ints([1, 3, 5, 7, 9]) == [1, 1, 3, 3, 5]
  assert optimize_ints([10, 20, 30, 40, 50]) == [10, 10, 20, 20, 30]
output: def optimize_ints(lst):
      lst.sort()
      min_val = lst[0]
      return [min_val] * (len(lst) // 2) + lst[:len(lst) // 2 + 1]