# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
642496 | Matteo_Verz | Speedrun (RMI21_speedrun) | C++17 | 136 ms | 920 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 "speedrun.h"
#include <bits/stdc++.h>
#ifdef BLAT
#include "debug/debug.hpp"
#else
#define debug(x...)
#endif
using namespace std;
using Graph = vector <vector <int>>;
void dfs(int node, Graph &g, vector <int> &preorder, vector <int> &p, int parent = 0) {
preorder.push_back(node);
p[node] = parent;
for (auto it : g[node])
if (it != parent)
dfs(it, g, preorder, p, node);
}
void setHintsParents(vector <int> &parent) {
for (int i = 1; i < parent.size(); i++) {
int p = parent[i];
for (int j = 0; (1 << j) <= p; j++)
if (p & (1 << j))
setHint(i, j + 1, true);
}
}
void setHintsPreorder(vector <int> &preorder) {
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |