| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 800679 | vjudge1 | 쌀 창고 (IOI11_ricehub) | C++17 | 12 ms | 2492 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "ricehub.h"
#include <bits/stdc++.h>
using namespace std;
int64_t P[100101];
int besthub(int R, int L, int X[], long long B) {
int l = 1, r = R, res = -1;
for (int i = 0; i < R; i++) P[i + 1] = P[i] + X[i];
while (l <= r) {
int mid = l + r >> 1;
bool ok = 0;
for (int i = mid - 1, j = 0; i < R; i++) {
while (j - (i - mid + 1) < i - j) j++;
int median = X[j];
long long LL = P[j] - P[i - mid + 1];
long long RR = P[i + 1] - P[j];
LL = 1ll * median * (j - i + mid - 1) - LL;
RR = RR - 1ll * median * (i + 1 - j);
if (LL + RR <= B) ok = 1;
}
if (ok) {
res = mid;
l = mid + 1;
} else {
r = mid - 1;
}
}
return res;
}
컴파일 시 표준 에러 (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... | ||||
