Under construction

Still being built. Things may change

Survey

Time limit1sMemory limit512 MB

Summary
Split a budget of m dollars into n nonnegative shares, assigned to members at random, to maximize the expected number of members whose threshold is met.
Level

Medium6 of 10

Topics
Dynamic programming, Sorting, Math
Solved
No attempts yet

Problem

You are running a survey and want to find respondents in your social group. The group has nn members, and you have a budget of mm dollars. Divide the mm dollars into nn shares. Each member receives one of the shares, chosen uniformly at random. Each share can be any non-negative real number.

Each person has a reward threshold xx. A person participates in the survey if and only if they receive a share of at least xx dollars. Otherwise, they accept the payment and do not participate.

Divide the budget so that the expected number of participating members is as large as possible.

Input

The first line contains two integers nn (1≤n≤10001 \le n \le 1000) and mm (1≤m≤50001 \le m \le 5000), the number of group members and the budget.

The second line contains nn integers x1,x2,…,xnx_1, x_2, \ldots, x_n (0≤xi≤m0 \le x_i \le m), the reward threshold of each member.

Output

Print one real number: the maximum expected number of members who participate. An answer is accepted if its absolute or relative error is at most 10−910^{-9}.

Examples2

  1. Example 1

    Input
    5 5
    1 2 3 3 4
    
    Expected output
    1.200000000000
    
  2. Example 2

    Input
    8 69
    10 10 10 10 10 10 4 5
    
    Expected output
    6.375000000000