(int u, int v)
| 48 | public static int[] addTag = new int[MAXN << 2]; |
| 49 | |
| 50 | public static void addEdge(int u, int v) { |
| 51 | next[++cntg] = head[u]; |
| 52 | to[cntg] = v; |
| 53 | head[u] = cntg; |
| 54 | } |
| 55 | |
| 56 | // 递归版,C++可以通过,java会爆栈 |
| 57 | public static void dfs1(int u, int f) { |