# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
493253 |
2021-12-10T13:58:08 Z |
123 |
Prosjek (COCI18_prosjek) |
C++14 |
|
1 ms |
204 KB |
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
double x[100];
cin>> n;
for(int i=0;i<n;i++){
cin>> x[i];
}
sort(x,x+n);
x[1]=(x[0]+x[1])/2;
for(int i=2;i<n;i++){
x[i]=(x[i-1]+x[i])/2;
}
printf("%.6lf\n",x[n-1]);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
0 ms |
204 KB |
Output is correct |
10 |
Correct |
0 ms |
204 KB |
Output is correct |