# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
379264 | wind_reaper | Synchronization (JOI13_synchronization) | C++17 | 551 ms | 20588 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>
using namespace std;
const int MXN = 100001;
const int lg = 20;
int n, m, q;
bool active[MXN];
vector<int> adj[MXN];
int a[MXN], c[MXN];
int up[lg][MXN];
int tin[MXN], tout[MXN];
int timer = 1;
void dfs(int node = 1, int par = 0){
tin[node] = timer++;
a[node] = 1;
up[0][node] = par;
for(int i = 1; i < lg && up[i-1][node]; i++)
up[i][node] = up[i-1][up[i-1][node]];
for(int v : adj[node]){
if(v == par)
continue;
dfs(v, node);
}
# | 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... |