| 9 | vector<vector<int>> up; |
| 10 | |
| 11 | void dfs(int v, int p) |
| 12 | { |
| 13 | tin[v] = ++timer; |
| 14 | up[v][0] = p; |
| 15 | for (int i = 1; i <= l; ++i) |
| 16 | up[v][i] = up[up[v][i-1]][i-1]; |
| 17 | |
| 18 | for (int u : adj[v]) { |
| 19 | if (u != p) |
| 20 | dfs(u, v); |
| 21 | } |
| 22 | |
| 23 | tout[v] = ++timer; |
| 24 | } |
| 25 | |
| 26 | bool is_ancestor(int u, int v) |
| 27 | { |
no outgoing calls
no test coverage detected