# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
547254 | Jomnoi | Ball Machine (BOI13_ballmachine) | C++17 | 1086 ms | 22092 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 DEBUG 0
using namespace std;
const int MAX_N = 1e5 + 10;
int timer;
vector <int> graph[MAX_N];
int depth[MAX_N], parent[MAX_N][20];
int minimum[MAX_N];
int st[MAX_N], pos[MAX_N];
bool state[MAX_N];
bool tree[4 * MAX_N];
int get_min(int u) {
minimum[u] = u;
for(auto v : graph[u]) {
depth[v] = depth[u] + 1;
minimum[u] = min(minimum[u], get_min(v));
}
return minimum[u];
}
void postorder(int u) {
for(auto v : graph[u]) {
postorder(v);
}
timer++;
st[u] = timer;
pos[timer] = u;
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... |