Submission #1018688

# Submission time Handle Problem Language Result Execution time Memory
1018688 2024-07-10T08:29:01 Z amine_aroua Measures (CEOI22_measures) C++17
0 / 100
173 ms 7732 KB
#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);
    double t = 0;
    for(int i = 1 ; i < m ; i++)
    {
        b[i]+=t;
        double x = b[i - 1] , y = b[i];
        if(y - x >= d)
        {
            ans[i] = ans[i - 1];
            continue;
        }
        t+=(x - y + d)/2.0;
        b[i]+=(x - y + d)/2.0;
        ans[i] = t;
    }
    for(int i = 0 ; i < m ; i++)
        cout<<ans[i]<<" ";
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 173 ms 7732 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 173 ms 7732 KB Output isn't correct
2 Halted 0 ms 0 KB -