# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
780025 | vjudge1 | Prosjek (COCI18_prosjek) | C++17 | 1 ms | 212 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;
#define lalala ios_base::sync_with_stdio(false);cin.tie(NULL);
//#define endl "\n"
#define ll long long
#define pb push_back
#define N 200005
int main(){
lalala;
int n;cin>>n;
vector<long double> v;
for(int i=0;i<n;i++){
long double a;cin>>a;
v.pb(a*((long double)1.000000));
}
if(n==1){
cout<<v[0]<<endl;
return 0;
}
sort(v.begin(),v.end());
long double a=v[0];
for(int i=1;i<n;i++){
a=(a+v[i])/(2.000000);
}
cout<<a<<endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |