PivotOJ

Zastave

시간 제한: 1000ms메모리 제한: 1024MB출처: COCI 2022-2023BOJ 27912

문제

After an exhausting day of preparing COCI, after sleeping for only three hours and in intervals of 2020 minutes, and finally after naughty Patrick and Josip got on his nerves, Vito fell asleep.

Vito was always a pacifist and as a sign of his resignation in front of the disobedience of his (un)reliable friends, Vito dreamed of nn white flags. The white flags had the shape of a right triangle swirling in the air with one of their sides parallel to the ground. In the morning, Vito could only remember a few key details... the length of the hypotenuse of the ii-th flag was rir_i and the total sum of heights of the flags was at most SS.

Now awake, he decided he shall fight on the beaches and never surrender! He rushed to the nearest paint shop so that next time he dreams of the nn white flags he can paint them over! But he quickly realized, he isn’t sure how much paint he has to buy. So he asked you to calculate the maximum possible total area of the nn white flags satisfying the constraints!

입력

The first line contains the integers nn and SS (1 ≤ n ≤ 100\,000, 1 ≤ S ≤ 10^{10}), the number of flags and the maximum possible sum of heights of the flags.

In the next line there are nn integers rir_i (1 ≤ r_i ≤ 100\,000).

출력

In the only line, output the maximum possible sum of areas of the flags. Your solution will be considered correct if the absolute or relative error is smaller than 10610^{-6}.

힌트

Clarification of the second example The largest possible area is achieved by a flag with sides 66, 88, and 1010 and the total area is 2424.

예제

예제 1

입력
2 3
4 5
출력
6.5200982141

예제 2

입력
1 6
10
출력
24.0000000000

예제 3

입력
4 7
5 5 6 6
출력
18.5706715170
코드를 제출하려면 로그인하세요.