In the middle of the night you have been attacked by bugs. The bugs are very well organised and form a line in front of you.
In order to protect yourself you have slippers that you will throw at the bugs one at a time (eventually you can throw multiple slippers at the same bug). The bugs, being very creative, are playing dead in order to fool you (the room is poorly illuminated and you can see the bugs, but you cannot tell which ones are squashed and which are alive).
Fortunately, you know for the bug what is the probability that it will be squashed by a single slipper (in the case in which the bug is not squashed, the next time you throw a slipper at it, the probability will stay the same).
As you are very tired and hate bugs crawling around in your room in the middle of the night you want to use the slippers you have at your disposal to squash as many bugs as possible.
Given such scenarios and for each scenario the number of bugs , the number of slippers and the array , calculate the expected value of the total number of squashed bugs if you throw the slippers optimally.
Input data
The first line will contain the number , representing the number of scenarios.
Every first line of each such scenario contains the numbers and , the number of bugs and the number of slippers you have. The next line of each test contains the array of length .
Output data
You will print lines, on the line being the expected value of the total number of squashed bugs if you optimally throw the slippers in the scenario.
The printed numbers have to have EXACTLY decimals, rounded down. It is guaranteed that the decimal of the answer is inside the interval .
Constraints and clarifications
- ,
- For tests worth points: ,
- For other tests worth points: ,
- The real numbers from the input have at most decimals.
- PAY ATTENTION to printing real numbers! When you will print a number, make sure that you print EXACTLY decimals.
- We recommand that you do all calculations using
long double
.
Example 1
stdin
2
5 5
0.9 0.7 0.5 0.3 0.1
4 2
0.1 0.1 0.5 0.5
stdout
2.650000
1.00000
Explanation
THIS EXAMPLE DOES NOT MEET THE CRITERION INVOLVING THE LAST DECIMAL DIGIT
Example 2
stdin
2
5 5
0.9 0.7123456 0.5 0.3 0.1
4 4
0.1 0.1 0.6 0.455652142
stdout
2.662346
1.543685