# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1043933 | 2024-08-05T04:43:47 Z | 정민찬(#11007) | Measures (CEOI22_measures) | C++17 | 1500 ms | 3420 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<ll,ll> pll; int main() { ios_base :: sync_with_stdio(false); cin.tie(NULL); ll N, M, D; cin >> N >> M >> D; vector<ll> a(N); for (ll i=0; i<N; i++) { cin >> a[i]; } for (ll i=0; i<M; i++) { ll nw; cin >> nw; a.push_back(nw); sort(a.begin(), a.end()); ll ans = 0; for (ll i=0; i<a.size(); i++) { for (ll j=i+1; j<a.size(); j++) { ans = max(ans, D * (j-i) - (a[j] - a[i])); } } if (ans % 2 == 0) cout << ans / 2 << ' '; else cout << ans / 2 << ".5 "; } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 13 ms | 344 KB | Output is correct |
2 | Correct | 12 ms | 348 KB | Output is correct |
3 | Correct | 13 ms | 496 KB | Output is correct |
4 | Correct | 16 ms | 348 KB | Output is correct |
5 | Correct | 15 ms | 496 KB | Output is correct |
6 | Correct | 13 ms | 348 KB | Output is correct |
7 | Correct | 13 ms | 488 KB | Output is correct |
8 | Correct | 12 ms | 492 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 13 ms | 344 KB | Output is correct |
2 | Correct | 12 ms | 348 KB | Output is correct |
3 | Correct | 13 ms | 496 KB | Output is correct |
4 | Correct | 16 ms | 348 KB | Output is correct |
5 | Correct | 15 ms | 496 KB | Output is correct |
6 | Correct | 13 ms | 348 KB | Output is correct |
7 | Correct | 13 ms | 488 KB | Output is correct |
8 | Correct | 12 ms | 492 KB | Output is correct |
9 | Execution timed out | 1577 ms | 3420 KB | Time limit exceeded |
10 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1552 ms | 592 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1552 ms | 592 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |