# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
253212 | nandonathaniel | Prosjek (COCI18_prosjek) | C++14 | 0 ms | 256 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;
double a[25];
int main(){
int n;
double ans;
scanf("%d",&n);
for(int i=1;i<=n;i++){
scanf("%lf",&a[i]);
}
sort(a+1,a+n+1);
ans=(a[1]+a[2])/2.0;
for(int i=3;i<=n;i++){
ans=(ans+a[i])/2.0;
}
printf("%.6lf\n",ans);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |