# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
781932 | jakobrs | Regions (IOI09_regions) | C++17 | 6186 ms | 36980 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 <algorithm>
#include <cmath>
#include <iostream>
#include <tuple>
#include <utility>
#include <vector>
using i64 = int64_t;
using f64 = double;
struct Node {
i64 region;
i64 parent;
std::vector<i64> children;
i64 left = -1, right = -1;
};
void dfs(std::vector<Node> &nodes, i64 node, i64 &counter) {
nodes[node].left = counter++;
for (i64 child : nodes[node].children) {
dfs(nodes, child, counter);
}
nodes[node].right = counter;
}
int main() {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |