P10679 『STA - R6』spec

Description

The **spectrum** $\operatorname{Spec}(\alpha)$ of a real number $\alpha$ is an infinite sequence of integers defined as $\lceil \alpha \rceil - 1, \lceil 2\alpha \rceil - 1, \lceil 3\alpha \rceil - 1, \cdots$. For example, the beginning of the spectrum of $\frac{3}{5}$ is $0, 1, 1, 2, 2, 3, 4, \cdots$. Given $n$ integers $x_1, x_2, \ldots, x_n$, find the largest real number $\alpha$ such that every $x_i$ appears in $\operatorname{Spec}(\alpha)$.

Input Format

The first line contains a positive integer $n$. The second line contains $n$ positive integers $x_1, x_2, \ldots, x_n$.

Output Format

Output the largest $\alpha$. Your answer will be considered correct if its absolute error is less than $10^{-5}$.

Explanation/Hint

**This problem uses subtask scoring.** Data Constraints: - Subtask 0 (10 points): $n, x_i \le 100$. - Subtask 1 (15 points): Valid answers form a continuous interval. - Subtask 2 (25 points): Every $x_i$ is a non-negative integer power of 2. - Subtask 3 (50 points): No additional constraints. For all test cases, $1 \le n, x_i \le 1000$. Translation by DeepSeek R1