#P5602. 小 E 与美食
小 E 与美食
Description
Little E has kinds of food to choose from, and each kind of food can be eaten at most once. The -th food has a tastiness value . Eating a food with tastiness value increases Little E’s satisfaction by .
However, Little E’s stomach has a limit. Each time he eats a food, his fullness increases by .
Little E’s final comfort level is defined as the square of his satisfaction divided by his fullness. Your task is to find the maximum possible comfort level.
Input Format
The first line contains a positive integer .
The second line contains positive integers .
Output Format
Output one real number in one line, representing the maximum comfort level. Your answer is considered correct if its relative error or absolute error is within compared to the standard answer.
2
2 1
4.50
Hint
Hint
It is recommended to output at least significant digits.
Sample Explanation
It is easy to see that eating both kinds of food is optimal. The comfort level is .
Constraints
For of the testdata, .
For of the testdata, .
For another of the testdata, all are equal.
For of the testdata, and .
Translated by ChatGPT 5
京公网安备 11011102002149号