# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
146889 | pedroslrey | Prosjek (COCI18_prosjek) | C++14 | 2 ms | 376 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;
vector<int> xs;
int main() {
int n;
scanf("%d", &n);
for (int i = 0; i < n; ++i) {
int x;
scanf("%d", &x);
xs.push_back(x);
}
sort(xs.begin(), xs.end());
float media = xs[0];
for (int i = 1; i < n; ++i) {
media = (media + xs[i])/2;
}
printf("%f\n", media);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |