#P11014. 「ALFR Round 4」D 罪人的终幕
「ALFR Round 4」D 罪人的终幕
Background
And I promise you, everything will end in a grand, theatrical trial...
Spin a little, jump lightly, and then comes the curtain call of the "sinner".
Problem Description
Define a function as the sum of distinct prime factors of the natural number .
If , then $a(x)=\sum\limits_{p_i\in \mathbb{P}}p_i\times[d_i\ge1]$, where is the set of primes, and .
Starting from the first day of her birth, Furina has had an expectation value .
Before the final trial arrives, every day she chooses to sort out her feelings. The method is as follows:
Suppose today is day . Furina sets today's expectation value to $\max\{\dfrac{m_j}{a(\operatorname{lcm}(w_i,w_j))+a(\gcd(w_i,w_j))}+k\}$, where , , and is the expectation value gained from watching the trial.
Please compute .
Input Format
The first line contains three integers , representing the number of days until the final trial (including the first day), the expectation value on the first day, and the expectation value gained from watching the trial.
The second line contains integers representing .
Output Format
Output one real number in one line representing . Your answer is considered correct if the absolute error compared with the correct answer does not exceed .
4 4 7
7 10 16 8
28.047619
Hint
Sample Explanation
The expectation values for these days are .
Constraints
| Subtask | Points | Limits |
|---|---|---|
| , | ||
| - |
For of the testdata, , , , .
The testdata for this problem may be a bit weak. You are welcome to provide hacks for incorrect solutions.
Translated by ChatGPT 5