# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
307693 | zwliew | Prosjek (COCI18_prosjek) | C++17 | 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 <algorithm>
#include <array>
#include <bitset>
#include <chrono>
#include <climits>
#include <cmath>
#include <cstring>
#include <deque>
#include <ext/pb_ds/assoc_container.hpp>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
//#include "bits/stdc++.h"
using namespace std;
#ifdef LOCAL
#include "../../_library/cc/debug.h"
#define FILE "test"
#else
#define debug(...) 0
#define FILE ""
#endif
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
if (fopen(FILE ".in", "r")) {
freopen(FILE ".in", "r", stdin);
freopen(FILE ".out", "w", stdout);
}
int n;
cin >> n;
vector<int> a(n);
for (auto &x : a) cin >> x;
sort(a.begin(), a.end());
double prev = a[0];
for (int i = 1; i < n; ++i) {
prev = (prev + a[i]) / 2;
}
cout << fixed << setprecision(6) << prev;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |