Submission #723326

# Submission time Handle Problem Language Result Execution time Memory
723326 2023-04-13T15:37:31 Z t_holl Measures (CEOI22_measures) C++14
0 / 100
1500 ms 1508 KB
	#include <bits/stdc++.h>

using namespace std;

int N, M, D;

double compute (multiset<int> &res) {
    double ans = 0;

    int last = - 1;
    for (int val : res) {
        int del = D - (val - last);
        if (del > 0 && last != -1) {
            ans += del / 2.0;
        }

        last = val;
    }

    return ans;
}

int main() {
    cin >> N >> M >> D;

    multiset<int> res;
    for (int i = 0; i < N; i ++) {
        int x; cin >> x;
        res.insert(x);
    }
    for (int i = 0; i < M; i ++) {
        int x; cin >> x;
        res.insert(x);

        cout << compute(res) << " ";
    }
    cout << endl;

    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1572 ms 1508 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1572 ms 1508 KB Time limit exceeded
2 Halted 0 ms 0 KB -