#P7761. [COCI 2016/2017 #5] Pareto
[COCI 2016/2017 #5] Pareto
Description
You are given the deposits of bank customers. Find two real numbers such that exactly of the customers own exactly of the total deposits, and is maximized.
Input Format
The first line contains an integer , the number of bank customers.
The next line contains integers, in order, representing each customer's deposit.
Output Format
The first line outputs the required value .
The second line outputs the required value .
It is guaranteed that for the maximum , the final answer is unique.
Your output is considered correct if it differs from the answer by at most .
2
100 200
50.0
66.66666666666666
8
100100 10 100 1000 1 10100
90100 100100
37.5
96.28172769816027
Hint
[Sample 1 Explanation]
It is easy to see that the customer with deposit owns about of the total deposits.
[Constraints]
For of the testdata, , and all deposits are non-negative integers not exceeding .
[Hints and Notes]
This problem is translated from COCI 2016-2017 CONTEST #5 T2 Pareto.
The score of this problem follows the original COCI setting, with a full score of .
Translated by ChatGPT 5
京公网安备 11011102002149号