Submission #83312

# Submission time Handle Problem Language Result Execution time Memory
83312 2018-11-06T22:43:02 Z josiftepe Prosjek (COCI18_prosjek) C++14
30 / 50
3 ms 576 KB
#include <iostream>
#include <cstring>
#include <vector>
#include <set>
#include <map>
#include <sstream>
#include <cstdio>
#include <algorithm>
#include <stack>
#include <queue>
#include <cmath>
#include <iomanip>
#include <fstream>
//#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = (1 << 30);
const ll inf = (1LL << 60LL);
const int maxn = 1e5 + 10;
int n;
int arr[maxn];
int main(int argc, const char * argv[]) {
    ios_base::sync_with_stdio(false);
    cin >> n;
    for(int i =0 ; i < n; i ++){
        cin >> arr[i];
    }
    sort(arr, arr + n);
    double ret = ((double)arr[0] + (double)arr[1]) / (double)2;
    for(int i = 2; i < n; i ++){
        ret += (double)arr[i];
        ret /= (double)2;
    }
    printf("%.4f\n", ret);
        return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 500 KB Output is correct
3 Correct 2 ms 500 KB Output is correct
4 Correct 2 ms 500 KB Output is correct
5 Correct 2 ms 500 KB Output is correct
6 Correct 2 ms 500 KB Output is correct
7 Incorrect 2 ms 500 KB Output isn't correct
8 Incorrect 2 ms 500 KB Output isn't correct
9 Incorrect 3 ms 548 KB Output isn't correct
10 Incorrect 2 ms 576 KB Output isn't correct