# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
118278 | tmwilliamlin168 | 무지개나라 (APIO17_rainbow) | C++14 | 1229 ms | 78412 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "rainbow.h"
#include <bits/stdc++.h>
using namespace std;
const int mxN=2e5, mxSTS=1e5*19+1;
struct pst {
vector<int> ta[mxN];
int rt[mxN+1], sts=1, st[mxSTS], lc[mxSTS], rc[mxSTS];
void a(array<int, 2> a) {
ta[a[0]].push_back(a[1]);
}
void bld() {
for(int i=0; i<mxN; ++i) {
rt[i+1]=rt[i];
for(int j : ta[i])
upd(j, rt[i+1]);
}
}
void upd(int l1, int &i, int l2=0, int r2=mxN-1) {
st[sts]=st[i]+1;
lc[sts]=lc[i];
rc[sts]=rc[i];
i=sts++;
if(l2==r2)
return;
int m2=(l2+r2)/2;
if(l1<=m2)
upd(l1, lc[i], l2, m2);
else
# | 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... |