# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
147259 | tincamatei | Valley (BOI19_valley) | C++14 | 388 ms | 30128 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>
using namespace std;
const int MAX_N = 100000;
const int MAX_Q = 100000;
const long long INF = 1LL << 60;
struct Edge {
int a, b, cost;
int other(int x) {
return a ^ b ^ x;
}
} edges[MAX_N - 1];
vector<int> graph[1+MAX_N];
int lastid;
int firstT[1+MAX_N], lastT[1+MAX_N];
long long depth[1+MAX_N], depthEuler[1+MAX_N];
bool shop[1+MAX_N], shopEuler[1+MAX_N], blockedEdge[1+MAX_N];
void predfs(int nod, int papa = -1) {
++lastid;
firstT[nod] = lastid;
if(shop[nod]) {
shopEuler[lastid] = true;
depthEuler[lastid] = depth[nod];
} else
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... |