#include<bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
float n, x[22], m = 0;
cin >> n;
cin >> x[0];
for(int i = 1; i < n; ++i){
cin >> x[i];
x[i] = (x[i] + x[i - 1]) / 2;
if(x[i] > m) m = x[i];
}
cout << m;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
504 KB |
Output isn't correct |
2 |
Incorrect |
2 ms |
580 KB |
Output isn't correct |
3 |
Incorrect |
2 ms |
604 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
656 KB |
Output isn't correct |
5 |
Correct |
3 ms |
660 KB |
Output is correct |
6 |
Incorrect |
2 ms |
704 KB |
Output isn't correct |
7 |
Incorrect |
3 ms |
708 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
752 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
820 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
820 KB |
Output isn't correct |