# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
130839 | PeppaPig | Valley (BOI19_valley) | C++14 | 266 ms | 41436 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define long long long
#define pii pair<long, long>
#define x first
#define y second
using namespace std;
const int N = 1e5+5;
int n, s, q, e;
int u[N], v[N], w[N], in[N], out[N], pos[N];
int par[N][18], dep[N];
long d[N], dp[N], pre[N][18];
bitset<N> shop;
vector<pii> g[N];
void gen_lca(int u, int p) {
static int idx = 0;
in[u] = ++idx, pos[idx] = u;
dep[u] = dep[p] + 1, par[u][0] = p;
if(shop[u]) dp[u] = d[u];
for(pii v : g[u]) if(v.x != p) {
d[v.x] = d[u] + v.y;
gen_lca(v.x, u);
dp[u] = min(dp[u], dp[v.x]);
}
out[u] = idx;
}
컴파일 시 표준 에러 (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... |