# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
23087 | model_code | Pareto (COCI17_pareto) | Cpython 3 | 544 ms | 30 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
n = int(input())
niz = list(map(int, input().split()))
niz.sort(reverse=True)
ukupno = sum(niz)
a = 1
b = 1
tmp = 0
for i in range(n):
tmp += niz[i]
if tmp/ukupno - (i + 1)/n > b - a:
a = (i + 1) / n
b = tmp / ukupno
print(a * 100)
print(b * 100)
#print(a * 100, b * 100)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |