# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
723362 | 2023-04-13T16:08:46 Z | t_holl | Measures (CEOI22_measures) | C++14 | 1500 ms | 544 KB |
#include <bits/stdc++.h> using namespace std; #define num long long int N, M, D; int compute (vector<num> &res) { num ans = 0; for (int i = 0; i < res.size(); i ++) for (int j = i; j < res.size(); j ++) ans = max(ans, D * (j - i) - res[j] + res[i]); return ans; } int main() { cin >> N >> M >> D; vector<num> res; for (int i = 0; i < N; i ++) { num x; cin >> x; res.push_back(x); } for (int i = 0; i < M; i ++) { num x; cin >> x; res.push_back(x); sort(res.begin(), res.end()); num total = compute(res); cout << total / 2; if (total % 2 == 1) cout << ".5"; cout << " "; } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 31 ms | 212 KB | Output is correct |
2 | Correct | 38 ms | 212 KB | Output is correct |
3 | Correct | 29 ms | 328 KB | Output is correct |
4 | Correct | 30 ms | 212 KB | Output is correct |
5 | Correct | 30 ms | 212 KB | Output is correct |
6 | Correct | 28 ms | 212 KB | Output is correct |
7 | Correct | 28 ms | 212 KB | Output is correct |
8 | Incorrect | 29 ms | 212 KB | Output isn't correct |
9 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 31 ms | 212 KB | Output is correct |
2 | Correct | 38 ms | 212 KB | Output is correct |
3 | Correct | 29 ms | 328 KB | Output is correct |
4 | Correct | 30 ms | 212 KB | Output is correct |
5 | Correct | 30 ms | 212 KB | Output is correct |
6 | Correct | 28 ms | 212 KB | Output is correct |
7 | Correct | 28 ms | 212 KB | Output is correct |
8 | Incorrect | 29 ms | 212 KB | Output isn't correct |
9 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1556 ms | 544 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1556 ms | 544 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |