| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 601580 | jack715 | Meetings (IOI18_meetings) | C++14 | 582 ms | 786432 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "meetings.h"
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define pp pop_back
#define mp make_pair
#define bb back
#define ff first
#define ss second
using namespace std;
std::vector<long long> minimum_costs(std::vector<int> H, std::vector<int> L,
std::vector<int> R) {
int n = H.size(), mx;
ll left[n][n], right[n][n];
ll now;
for (int i = n-1; i >= 0; i--) {
now = 0, mx = 0;
for (int j = i; j >= 0; j--) {
mx = max(mx, H[j]);
now += mx;
right[j][i] = now;
}
}
for (int i = 0; i < n; i++) {
now = 0, mx = 0;
for (int j = i; j < n; j++) {
mx = max(mx, H[j]);
now += mx;
left[i][j] = now;
}
}
vector<long long> ans(L.size(), 1e18);
for (int q = 0; q < L.size(); q++) {
for (int i = L[q]; i <= R[q]; i++) {
// cout << i << ' ' << left[L[q]][i]+right[i][R[q]]-H[i] << '\n';
ans[q] = min(ans[q], right[L[q]][i]+left[i][R[q]]-H[i]);
}
// cout << "===\n";
}
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
