# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
61247 | SpaimaCarpatilor | popa (BOI18_popa) | C++17 | 137 ms | 640 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include "popa.h"
using namespace std;
static int nxt[2018];
int solve (int l, int r, int *Left, int *Right)
{
if (l > r) return -1;
if (l == r)
return l;
if (r == l + 1)
{
if (nxt[l] > r)
{
Right[l] = r;
return l;
}
Left[r] = l;
return r;
}
int pos = l;
while (nxt[pos] <= r)
pos = nxt[pos];
int ras = pos;
Left[ras] = solve (l, ras - 1, Left, Right);
Right[ras] = solve (ras + 1, r, Left, Right);
return ras;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |