# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
402415 | rainboy | 열대 식물원 (Tropical Garden) (IOI11_garden) | C11 | 2954 ms | 25080 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "garden.h"
#include "gardenlib.h"
#include <stdlib.h>
#define N 150000
#define M 150000
#define Q 2000
#define L 29 /* L = floor(log2(10^9)) */
#define INF 0x3f3f3f3f
void append(int **eh, int *eo, int i, int h) {
int o = eo[i]++;
if (o >= 2 && (o & o - 1) == 0)
eh[i] = (int *) realloc(eh[i], o * 2 * sizeof *eh[i]);
eh[i][o] = h;
}
int *eh[N], eo[N], *fj[M * 2], fo[M * 2];
int qu1[M * 2], cnt1, qu2[M * 2], cnt2; char src[M * 2], dest[M * 2], visited[M * 2];
int kk[Q], ans[Q], q;
void dfs(int i, int r) {
int o, h;
visited[i] = 1;
qu2[cnt2++] = i;
if (src[i])
for (h = 0; h < q; h++) {
int p = kk[h] < cnt2 ? qu2[cnt2 - 1 - kk[h]] : qu1[(r + kk[h] - (cnt2 - 1)) % cnt1];
컴파일 시 표준 에러 (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... |