# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
765753 | t6twotwo | 모임들 (IOI18_meetings) | C++17 | 266 ms | 1504 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "meetings.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll inf = 1e18;
vector<ll> minimum_costs(vector<int> H, vector<int> L, vector<int> R) {
int N = H.size(), Q = L.size();
vector<ll> ans(Q);
for (int i = 0; i < Q; i++) {
int T = L[i];
for (int j = L[i]; j <= R[i]; j++) {
if (H[j] < H[T]) {
T = j;
}
}
int mx = H[T];
for (int j = T; j <= R[i]; j++) {
mx = max(mx, H[j]);
ans[i] += mx;
}
mx = H[T];
for (int j = T; j >= L[i]; j--) {
mx = max(mx, H[j]);
ans[i] += mx;
}
ans[i] -= H[T];
}
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... |