# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
878339 | hazzu | Putovanje (COCI20_putovanje) | C++17 | 80 ms | 25528 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 taskname "A"
using namespace std;
typedef long long ll;
struct Edge {
int v, c1, c2;
};
class LowestCommonAncestor {
private:
struct Node {
int depth, label;
Node *parent, *jump;
Node() {}
Node(Node *p) {
parent = p;
depth = p->depth + 1;
if (p->depth - p->jump->depth
== p->jump->depth - p->jump->jump->depth) {
jump = p->jump->jump;
}
else jump = p;
}
};
int n;
vector<Node*> t;
vector<vector<int>> adj;
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... |