# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
782342 | alenter | Prosjek (COCI18_prosjek) | C++14 | 1 ms | 304 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 main(){
int N;
scanf("%d",&N);
int v[N];
for(int i=0;i<N;i++){
scanf("%d",&v[i]);
}
sort(v,v+N);
int b;
int aux = 1;
double ans;
if(N<2){
printf("%d",v[0]);
}else{
ans = (v[0]+v[1]);
ans = ans/2;
while(aux<N-1){
b = v[aux+1];
ans = (ans+b)/2;
aux++;
}
printf("%f",ans);
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |