Skip to content

Commit 7e97961

Browse files
committed
modify code
1 parent 7689795 commit 7e97961

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/class174/Code04_Bridge1.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,31 @@ public class Code04_Bridge1 {
3636
public static int[] nid = new int[MAXQ];
3737
public static int[] car = new int[MAXQ];
3838

39+
// edge里是所有边的序号
40+
// change表示边的分类
41+
// curw表示边最新的权值
3942
public static int[] edge = new int[MAXM];
4043
public static boolean[] change = new boolean[MAXM];
4144
public static int[] curw = new int[MAXM];
4245

46+
// edge里是所有操作的编号
47+
// query里是当前操作块里查询操作的编号
48+
// update里是当前操作块里修改操作的编号
4349
public static int[] operate = new int[MAXQ];
44-
public static int[] update = new int[MAXQ];
4550
public static int[] query = new int[MAXQ];
51+
public static int[] update = new int[MAXQ];
4652

53+
// 可撤销并查集
4754
public static int[] fa = new int[MAXN];
4855
public static int[] siz = new int[MAXN];
4956
public static int[][] rollback = new int[MAXM][2];
5057
public static int opsize = 0;
5158

59+
// 归并的辅助数组
5260
public static int[] arr1 = new int[MAXM];
5361
public static int[] arr2 = new int[MAXM];
5462

63+
// 所有查询的答案
5564
public static int[] ans = new int[MAXQ];
5665

5766
// idx[l..r]都是编号,编号根据val[编号]的值从大到小排序,手写双指针快排

src/class174/Code04_Bridge2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
//int curw[MAXM];
3939
//
4040
//int operate[MAXQ];
41-
//int update[MAXQ];
4241
//int query[MAXQ];
42+
//int update[MAXQ];
4343
//
4444
//int fa[MAXN];
4545
//int siz[MAXN];

0 commit comments

Comments
 (0)