#include #include typedef long long int Int; const Int MAX_INT = 1000000000; const double EPS = 1e-9; Int min(Int L[], Int N) { Int min_val = MAX_INT; for (Int i=0; i L[i]) min_val = L[i]; } return min_val; } Int sum(Int L[], Int N) { Int sum_val = 0; for (Int i=0; i= K; } double find(double a, double b, Int L[], Int N, Int K) { if ((b - a) / a < EPS) { return a; } else { double c = (a + b) / 2; if (retrievable(c, L, N, K)) { return find(c, b, L, N, K); } else { return find(a, c, L, N, K); } } } int main() { Int N; std::cin >> N; Int L[N]; for (Int i=0; i> L[i]; Int K; std::cin >> K; double a = (double)min(L, N) / (double)K; double b = (double)sum(L, N) / (K-0.1) ; std::cout << std::setprecision(10) << find(a, b, L, N, K) << std::endl; return 0; }