Submission #723326

#TimeUsernameProblemLanguageResultExecution timeMemory
723326t_hollMeasures (CEOI22_measures)C++14
0 / 100
1572 ms1508 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...