(int u, int v, int w)
| 51 | public static int ans, ansu, ansv; |
| 52 | |
| 53 | public static void addEdge(int u, int v, int w) { |
| 54 | nxt[++cntg] = head[u]; |
| 55 | to[cntg] = v; |
| 56 | weight[cntg] = w; |
| 57 | head[u] = cntg; |
| 58 | } |
| 59 | |
| 60 | public static void getSize(int u, int fa) { |
| 61 | siz[u] = 1; |