(int u, int v)
| 67 | public static PriorityQueue<int[]> heap = new PriorityQueue<>((a, b) -> a[1] - b[1]); |
| 68 | |
| 69 | public static void addEdge1(int u, int v) { |
| 70 | next1[++cnt1] = head1[u]; |
| 71 | to1[cnt1] = v; |
| 72 | head1[u] = cnt1; |
| 73 | } |
| 74 | |
| 75 | public static void addEdge2(int u, int v, int w) { |
| 76 | next2[++cnt2] = head2[u]; |