-
-
Save Hacv16/76e6066b0d62bfc1e2a6c7455c720338 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int timer, tin[MAXN], tout[MAXN]; | |
void dfs(int u, int p) | |
{ | |
tin[u] = ++timer; | |
for(auto v : adj[u]) | |
{ | |
if(v == p) continue; | |
dfs(v, u); | |
} | |
tout[u] = timer; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment