'''simple docstring'''




def __lowerCAmelCase			(							UpperCamelCase__    )     ->   list:
    __lowerCamelCase          =  False
    while is_sorted is False:  # Until all the indices are traversed keep looping
        __lowerCamelCase          =  True
        for i in range(0    ,  len(UpperCamelCase__    ) - 1    ,  2    ):  # iterating over all even indices
            if input_list[i] > input_list[i + 1]:
                __lowerCamelCase     ,  __lowerCamelCase          =  input_list[i + 1], input_list[i]
                # swapping if elements not in order
                __lowerCamelCase          =  False

        for i in range(1    ,  len(UpperCamelCase__    ) - 1    ,  2    ):  # iterating over all odd indices
            if input_list[i] > input_list[i + 1]:
                __lowerCamelCase     ,  __lowerCamelCase          =  input_list[i + 1], input_list[i]
                # swapping if elements not in order
                __lowerCamelCase          =  False
    return input_list


if __name__ == "__main__":
  print("Enter list to be sorted")
  __UpperCAmelCase												=[int(x) for x in input().split()]
  # inputing elements of the list in one line
  __UpperCAmelCase												=odd_even_sort(input_list)
  print("The sorted list is")
  print(sorted_list)

'''simple docstring'''




from bisect import bisect
from itertools import accumulate






def __lowerCAmelCase			(							UpperCamelCase__    ,  UpperCamelCase__    ,  UpperCamelCase__    ,  UpperCamelCase__    )     ->   str:
    __lowerCamelCase          =  sorted(zip(UpperCamelCase__    ,  UpperCamelCase__    )    ,  key=lambda UpperCamelCase__    : x[0] / x[1]    ,  reverse=UpperCamelCase__    )
    __lowerCamelCase     ,  __lowerCamelCase          =  [i[0] for i in r], [i[1] for i in r]
    __lowerCamelCase          =  list(accumulate(UpperCamelCase__    )    )
    __lowerCamelCase          =  bisect(UpperCamelCase__    ,  UpperCamelCase__    )
    return (
        0
        if k == 0
        else sum(vl[:k]    ) + (w - acc[k - 1]) * (vl[k]) / (wt[k])
        if k != n
        else sum(vl[:k]    )
    )


if __name__ == "__main__":
  import doctest

  doctest.testmod()
