Submission #780025

#TimeUsernameProblemLanguageResultExecution timeMemory
780025vjudge1Prosjek (COCI18_prosjek)C++17
50 / 50
1 ms212 KiB
#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 timeMemoryGrader output
Fetching results...