# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
125559 | eriksuenderhauf | Valley (BOI19_valley) | C++11 | 289 ms | 39772 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define pii pair<int,int>
#define pil pair<int,long long>
#define vii vector<pii>
#define vil vector<pil>
#define pb push_back
#define fi first
#define se second
#define mp make_pair
using namespace std;
typedef long long ll;
const int MAXN = 1e5 + 5;
const ll INF = 1e18 + 7;
int par[19][MAXN], dep[MAXN];
int sh[MAXN], mrk[MAXN];
ll depth[MAXN], nx2[MAXN], nxPar[19][MAXN];
vil adj[MAXN];
pair<pii,ll> edg[MAXN];
void dfs(int u, int p, ll d, int d2) {
depth[u] = d;
dep[u] = d2;
if (mrk[u])
nx2[u] = d;
else
nx2[u] = INF;
for (pil nx: adj[u]) {
int v; ll w;
tie(v, w) = nx;
if (v == p) continue;
Compilation message (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... |