(int u, int fa)
| 196 | } |
| 197 | |
| 198 | public static void centroidTree(int u, int fa) { |
| 199 | centfa[u] = fa; |
| 200 | vis[u] = true; |
| 201 | for (int e = head[u]; e > 0; e = nxt[e]) { |
| 202 | int v = to[e]; |
| 203 | if (!vis[v]) { |
| 204 | centroidTree(getCentroid(v, u), u); |
| 205 | } |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | public static int add(int jobi, int jobv, int l, int r, int i) { |
| 210 | if (i == 0) { |