# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
392372 | Gamma | Prosjek (COCI18_prosjek) | C++14 | 1 ms | 208 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.
#include <bits/stdc++.h>
using namespace std;
int n;
double a[21];
int main()
{
cin >> n;
for(int i = 0; i < n; i++)
{
cin >> a[i];
}
sort(a, a + n);
for(int i = 1; i < n; i++)
{
//cout << a[i] << ' ';
a[i] = (a[i] + a[i - 1]) / 2.0;
}
cout << a[n - 1] << '\n';
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |