# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
809215 | 2023-08-05T22:15:05 Z | HaroldVemeno | Measures (CEOI22_measures) | C++17 | 1500 ms | 3264 KB |
#include <bits/stdc++.h> #ifdef GUDEB #define D(x) cerr << #x << ": " << (x) << '\n'; #define ifdeb if(true) #else #define D(x) ; #define ifdeb if(false) #endif #define all(x) begin(x), end(x) using namespace std; using ull = unsigned long long; using ll = long long; // #define int ll; int n, m, d; vector<int> as; vector<int> bs; void solve() { cin >> n >> m >> d; as.resize(n); bs.resize(m); for(int i = 0; i < n; ++i) cin >> as[i]; for(int i = 0; i < m; ++i) cin >> bs[i]; for(int i = 0; i < m; ++i) { as.push_back(bs[i]); sort(all(as)); ll time = 0; int b = as[0]; for(int j = 1; j < as.size(); ++j) { time = max(time, 0ll+d-as[j]+b); b = max(b+d, as[j]); } cout << 1.0*time/2 << ' '; } cout << '\n'; return; } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); solve(); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 332 KB | Output is correct |
2 | Incorrect | 1 ms | 328 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 332 KB | Output is correct |
2 | Incorrect | 1 ms | 328 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1533 ms | 3264 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1533 ms | 3264 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |