#include <bits/stdc++.h>
using namespace std;
int main() {
int n , m , d;
cin>>n>>m>>d;
vector<double> b(m);
for(int i = 0 ; i < m ; i++)
{
cin>>b[i];
}
vector<double> ans(m);
for(int i = 1 ; i < m ; i++)
{
ans[i] = ans[i - 1] + (max(0.0 , b[i - 1] - b[i] + d))/2.0;
}
for(int i = 0 ; i < m ; i++)
cout<<ans[i]<<" ";
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
143 ms |
7764 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
143 ms |
7764 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |