# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
100945 | 2019-03-15T11:17:51 Z | AKaan37 | Prosjek (COCI18_prosjek) | C++17 | 4 ms | 384 KB |
//Sani buyuk Osman Pasa Plevneden cikmam diyor. //FatihSultanMehmedHan //Allah Buyuktur. //Bismillahirrahmanirrahim #include <bits/stdc++.h> using namespace std; typedef long long int lo; typedef pair< int,int > PII; #define fi first #define se second #define mp make_pair #define pb push_back #define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define FOR for(lo i=1;i<=n;i++) #define mid (bas+son)/2 const lo MAX = -1000000000000000000; const lo MIN = 1000000000000000000; const lo inf = 1000000000; const lo KOK = 100000; const lo LOG = 30; const lo li = 100005; const lo mod = 1000000007; lo n; double m,cev,b,a[li],k; string s; vector<int> v; int main(){ scanf("%lld",&n); FOR{ scanf("%lf",&a[i]); } sort(a+1,a+n+1); double aver=(a[1]+a[2])/2; for(lo i=3;i<=n;i++){ aver=(aver+a[i])/2; } printf("%lf\n",aver); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 384 KB | Output is correct |
2 | Correct | 3 ms | 384 KB | Output is correct |
3 | Correct | 2 ms | 384 KB | Output is correct |
4 | Correct | 3 ms | 384 KB | Output is correct |
5 | Correct | 3 ms | 384 KB | Output is correct |
6 | Correct | 4 ms | 256 KB | Output is correct |
7 | Correct | 3 ms | 256 KB | Output is correct |
8 | Correct | 3 ms | 384 KB | Output is correct |
9 | Correct | 4 ms | 256 KB | Output is correct |
10 | Correct | 2 ms | 384 KB | Output is correct |