# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1073760 | shezitt | 모임들 (IOI18_meetings) | C++14 | 73 ms | 2908 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "meetings.h"
using ll = long long;
#define fore(a, b, c) for(int a=b; a<c; ++a)
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
using namespace std;
std::vector<ll> minimum_costs(vector<int> H, vector<int> L, vector<int> R) {
int Q = L.size();
vector<ll> C(Q);
int N = 0;
for (int j = 0; j < Q; ++j) {
N = max(N, R[j]);
}
N++;
if(Q <= 10 && N <= 3001){
// sb 1
for(int j=0; j<Q; ++j){
int l = L[j], r = R[j];
ll ans = 4e18;
for(int x=l; x<=r; ++x){
ll cur = 0;
ll mx = H[x];
for(int i=x; i>=l; --i){
mx = max(mx, 1ll * H[i]);
cur += mx;
}
mx = H[x];
for(int i=x+1; i<=r; ++i){
mx = max(mx, 1ll * H[i]);
cur += mx;
}
ans = min(ans, cur);
}
C[j] = ans;
}
return C;
}
// sb2
vector<int> doses;
fore(i, 0, N){
if(H[i] == 2){
doses.push_back(i);
}
}
fore(j, 0, Q){
int l = L[j], r = R[j];
}
}
컴파일 시 표준 에러 (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... |