PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#BS0000382. Chia bánh (Pie)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Chia bánh (Pie)

Pie

Source: UVa

Version: Phuoc Hung OJ Extended

Problem Statement

For a birthday party, the host has NN cylindrical pies of height 1; pie ii has radius rir_i. There are FF guests. Each guest and the host must receive one piece of the same volume, although the shapes may differ.

Each piece must come from a single pie, not a combination of pieces from different pies. A whole pie may be served and leftovers are allowed. Find the maximum volume of each piece that can serve all F+1F+1 people.

Input

The first line contains two integers N,FN,F. The second line contains NN integers r1,r2,…,rNr_1,r_2,\ldots,r_N.

Output

Print the maximum volume per piece. The absolute error must not exceed 10−310^{-3}.

Subtasks

  • Subtask 1 (20 points): N=1N=1; 1≤F≤1001\le F\le100; 1≤ri≤100001\le r_i\le10000 for every 1≤i≤N1\le i\le N.
  • Subtask 2 (30 points): 1≤N≤1001\le N\le100; 1≤F≤1001\le F\le100; 1≤ri≤100001\le r_i\le10000 for every 1≤i≤N1\le i\le N.
  • Subtask 3 (50 points): 1≤N,F≤100001\le N,F\le10000; 1≤ri≤100001\le r_i\le10000 for every 1≤i≤N1\le i\le N.

Examples

Input

3 3
4 3 3

Output

25.1327

Explanation

Four pieces are required. The radius-4 pie has volume 16π16\pi and supplies two pieces of volume 8π8\pi. Each radius-3 pie has volume 9π9\pi and supplies one such piece. If a piece exceeds 8π8\pi, the three pies supply at most three pieces. Hence the answer is 8π≈25.13278\pi\approx25.1327.

Input

1 24
5

Output

3.1416

Explanation

The only pie has volume 25π25\pi. There are 24 guests and the host, 25 people in total. Dividing the entire pie evenly gives each person 25π/25=π≈3.141625\pi/25=\pi\approx3.1416.

Input

10 5
1 4 2 3 4 5 6 5 4 2

Output

50.2655

Explanation

Six pieces are needed. At volume 16π16\pi per piece, the three radius-4 pies give three pieces, the two radius-5 pies give two, and the radius-6 pie gives two. Six of the seven pieces can be selected. Above 16π16\pi, pies of radius at most 4 give no piece and the other three pies give at most four. Thus the optimum is 16π≈50.265516\pi\approx50.2655.