아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Survey

시간 제한1초메모리 제한512 MB

요약
m달러를 n개의 몫으로 나누고 각 구성원의 임계값이 주어질 때, 무작위로 받은 몫이 임계값 이상인 구성원 수의 기댓값을 최대로 만드는 분배를 설계한다.
난이도

보통10점 중 7점

유형
동적 계획법, 정렬, 조합론
정답자
아직 제출이 없습니다

문제

You are doing a survey and want to find respondents in your social group. Your social group has size nn, and you have a budget of mm dollars. You need to divide the mm dollars into n n shares. Each group member will get one of the shares uniformly at random. Note that the money contained in each share can be any non-negative real number.

Luckily, you know the reward threshold of each group member. If a person has a reward threshold of xx, they will participate in the survey if and only if they have received a share of at least xx dollars, otherwise they will just accept the payment and not participate in the survey. Since you want as many group members as possible to participate in the survey, you need to design a plan to divide the mm dollars into nn shares in order to maximize the expected number of members who will participate in the survey.

입력

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

The next line contains nn integers x_1,x_2,…,x_nx\_1, x\_2, \ldots, x\_n (0≤x_i≤m0 \le x\_i \le m), denoting the reward threshold of each member.

출력

Print a single real number: the maximum expected number of members to participate in the survey.

The answer will be considered correct if the absolute or relative error between the output and the jury's answer is at most 10−910^{-9}.

예제2

  1. 예제 1

    입력
    5 5
    1 2 3 3 4
    
    예상 출력
    1.200000000000
    
  2. 예제 2

    입력
    8 69
    10 10 10 10 10 10 4 5
    
    예상 출력
    6.375000000000