import java.io.OutputStream;
import java.io.FilenameFilter;
import java.util.Locale;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.FileInputStream;
import java.io.File;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*
* @author Hieu Le
*/
public class Main {
public static void main
(String[] args
) { try {
final String regex
= "C-(small|large).*[.]in"; return name.matches(regex);
}
});
for (File candidate
: candidates
) { if (toRun == null || candidate.lastModified() > toRun.lastModified())
toRun = candidate;
}
}
try {
}
InputReader in = new InputReader(inputStream);
TaskC solver = new TaskC();
int testCount
= Integer.
parseInt(in.
next()); for (int i = 1; i <= testCount; i++)
solver.solve(i, in, out);
out.close();
}
static class TaskC {
private static final double EPS = 1e-7;
public void solve
(int testNumber, InputReader in,
PrintWriter out
) { int nCores = in.nextInt();
int target = in.nextInt();
double units = in.nextDouble();
double[] probs = new double[nCores];
for (int i = 0; i < nCores; ++i)
probs[i] = in.nextDouble();
double low = 0.0, high = 1.0;
for (int i = 0; i < 200; ++i) {
double mid = (low + high) / 2;
if (validate(probs, mid, units))
low = mid;
else
high = mid;
}
double result = 1.0;
for (double prob : probs)
result
*= Math.
max(prob, low
); out.printf("Case #%d: %.7f\n", testNumber, result);
}
private boolean validate(double[] probs, double floor, double units) {
double required = 0;
for (double p : probs) {
if (p < floor - EPS)
required += floor - p;
}
return required - units <= EPS;
}
}
static class InputReader {
private static final int BUFFER_SIZE = 32768;
tokenizer = null;
}
while (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
}
}
return tokenizer.nextToken();
}
public int nextInt() {
}
public double nextDouble() {
return Double.
parseDouble(next
()); }
}
}