Submission #780023

# Submission time Handle Problem Language Result Execution time Memory
780023 2023-07-12T05:47:50 Z vjudge1 Prosjek (COCI18_prosjek) C++17
50 / 50
1 ms 436 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define faster ios_base::sync_with_stdio(false);cin.tie(NULL);
#define OYY 1000000005
#define mod 998244353

int32_t main(){
    faster
    int n;cin>>n;
    float dizi[n];
    for(int i=0;i<n;i++){
        cin>>dizi[i];
    }
    float sum;
    sort(dizi,dizi+n);
    for(int i=1;i<n;i++){
        if(i>1)sum=(sum+dizi[i])/2;
        else sum=(dizi[i]+dizi[i-1])/2;
        //cout<<sum<<endl;
    }
    cout << fixed << setprecision(6) << sum<<endl;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 328 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 320 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 316 KB Output is correct
7 Correct 1 ms 436 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct