This page is still under construction.

Parts of this page are still being built. What you see may change.

Cable Master

Time limit1sMemory limit128 MB

Summary
Find the largest centimeter-precision length such that cutting all stock cables yields at least K pieces of that length.
Level

Medium6 of 10

Topics
Binary search, Greedy
Solved
No attempts yet

Problem

A programming contest is being organized, and every contestant's computer will be wired in a "star" topology to a single central hub. To seat the contestants at an equal distance from the hub and as far apart from one another as possible, several network cables of exactly the same length are needed.

The stock contains NN cables, and the length of each cable is known to the centimeter. The cable master picks one target piece length and then cuts every cable into pieces of that length with centimeter precision. A cable of length LL yields at most ⌊L/x⌋\lfloor L / x \rfloor pieces of length xx, and any leftover is discarded.

Determine the maximum possible length of a single piece so that KK equal-length pieces can be cut from the cables in stock. The piece length is chosen with centimeter precision (two digits after the decimal point), and every piece must be at least one centimeter long.

Input

The first line contains two integers NN and KK separated by a space. NN (1≤N≤100001 \le N \le 10000) is the number of cables in stock, and KK (1≤K≤100001 \le K \le 10000) is the number of pieces required. Each of the following NN lines contains the length of one cable in meters. Every cable is at least 1 meter and at most 100 kilometers long, and all lengths are given with centimeter precision — exactly two digits after the decimal point.

Output

Print the maximum length, in meters, of the pieces that can be cut from the stock to obtain KK pieces. Print the value with centimeter precision — exactly two digits after the decimal point.

If it is impossible to cut KK pieces each at least one centimeter long, print the single number 0.00.

Examples1

  1. Example 1

    Input
    4 11
    8.02
    7.43
    4.57
    5.39
    
    Expected output
    2.00