(int u, int v, long w)
| 87 | } |
| 88 | |
| 89 | public static void addEdge1(int u, int v, long w) { |
| 90 | next1[++cnt1] = head1[u]; |
| 91 | to1[cnt1] = v; |
| 92 | weight1[cnt1] = w; |
| 93 | head1[u] = cnt1; |
| 94 | } |
| 95 | |
| 96 | public static void addEdge2(int u, int v, long w) { |
| 97 | next2[++cnt2] = head2[u]; |