'''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()

'''simple docstring'''




from __future__ import annotations






def __lowerCAmelCase			(							UpperCamelCase__    ,  UpperCamelCase__    )     ->   list[list[int]]:
    __lowerCamelCase          =  []
    create_all_state(1    ,  UpperCamelCase__    ,  UpperCamelCase__    ,  []    ,  UpperCamelCase__    )
    return result






def __lowerCAmelCase			(							UpperCamelCase__    ,  UpperCamelCase__    ,  UpperCamelCase__    ,  UpperCamelCase__    ,  UpperCamelCase__    ,  )     ->   None:
    if level == 0:
        total_list.append(current_list[:]    )
        return

    for i in range(UpperCamelCase__    ,  total_number - level + 2    ):
        current_list.append(UpperCamelCase__    )
        create_all_state(i + 1    ,  UpperCamelCase__    ,  level - 1    ,  UpperCamelCase__    ,  UpperCamelCase__    )
        current_list.pop()






def __lowerCAmelCase			(							UpperCamelCase__    )     ->   None:
    for i in total_list:
        print(*UpperCamelCase__    )


if __name__ == "__main__":
  __UpperCAmelCase												=4
  __UpperCAmelCase												=2
  __UpperCAmelCase												=generate_all_combinations(n, k)
  print_all_state(total_list)
