Submission #340130

#TimeUsernameProblemLanguageResultExecution timeMemory
340130israeladewuyiProsjek (COCI18_prosjek)C++17
50 / 50
1 ms364 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<double> vi; typedef vector<string> vs; typedef vector<pair<int,int>> vp; #define PB push_back #define pb pop_back #define in insert #define endl "\n" #define MP make_pair #define f first #define Trav(a,x) for(auto& a: x) const unsigned int M = 1000000007; int main(){ ios::sync_with_stdio(0); cin.tie(0); int n; cin>>n; vi v(n); Trav(a, v)cin>>a; sort(v.begin(), v.end()); double mx = 0.000000; for(int i = 0; i < n - 1; i++){ double y = (v[i] + v[i+1])/2; mx = max(y, mx); v[i+1] = y; } cout<<setprecision(7)<<mx; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...