# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1209867 | taly | Prosjek (COCI18_prosjek) | C++20 | 0 ms | 328 KiB |
#include <bits/stdc++.h>
// #include <algorithm>
using namespace std;
int main() {
int n;
(void)scanf("%d", &n);
vector<double> grades(n);
for (int i=0; i < n; i++){
(void)scanf("%lf", &grades[i]);
}
sort(grades.begin(), grades.end());
double ultimo = grades[0];
for (int i=1; i < n; i++){
ultimo = (ultimo+grades[i])/2;
}
printf("%lf", ultimo);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |