# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
165503 | itiam | Prosjek (COCI18_prosjek) | C++11 | 2 ms | 424 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 <ctime>
#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int N;
double L[22],x;
cin >> N;
for (int i=0;i<N;i++){
cin >> x;
L[i]=x;
}
sort(L,L+N);
//ispis(L,N);
double a,b;
int y;
for (int i=0;i<N-1;i++){
a=L[i];
b=L[i+1];
L[i+1]=(a+b)/2.0;
y=i+1;
}
cout << L[y];
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |