# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
25835 | gs14004 | Ball Machine (BOI13_ballmachine) | C++11 | 803 ms | 24080 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 <cstdio>
#include <algorithm>
#include <vector>
#include <set>
using namespace std;
int n, q;
int dfn[100005], rev[100005];
int par[100005][17];
int dep[100005];
vector<int> graph[100005];
int piv;
int root;
int min_sub[100005];
int prep(int x){
min_sub[x] = x;
for(int ii=0; ii<graph[x].size(); ii++){
int i = graph[x][ii];
min_sub[x] = min(min_sub[x],prep(i));
}
return min_sub[x];
}
bool cmp(int a, int b){
return min_sub[a] < min_sub[b];
}
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... |