# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
314743 | aaae4hujikwe4rfjio | Prosjek (COCI18_prosjek) | C++14 | 1 ms | 384 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>
#define ll long long
#define MAXN 0
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
multiset<double> m;
int n, aux;
cin >> n;
for(int i = 0; i < n; i++)
cin >> aux, m.insert(aux);
for(int i = 0; i < n-1; i++){
double a = *m.begin();
m.erase(m.begin());
double b = *m.begin();
m.erase(m.begin());
m.insert((a+b)/2);
}
cout << *m.begin();
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |