Skip to content

Commit 1a73475

Browse files
committed
modify code
1 parent de036d5 commit 1a73475

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/class174/Code03_ColorfulWorld1.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,24 @@ public class Code03_ColorfulWorld1 {
2626
public static int MAXV = 100002;
2727
public static int n, m;
2828
public static int blen, bnum;
29-
public static int maxv, lazy;
3029

3130
public static int[] arr = new int[MAXN];
3231
public static int[] op = new int[MAXM];
3332
public static int[] ql = new int[MAXM];
3433
public static int[] qr = new int[MAXM];
3534
public static int[] qx = new int[MAXM];
3635

36+
// maxv代表一个序列块中的最大值
37+
// lazy代表一个序列块中,所有数字需要统计减去多少
38+
// fa代表值域并查集
39+
// pre0代表数组前缀上0的词频统计
40+
// cntv代表一个序列块中每种值的词频统计
41+
public static int maxv, lazy;
3742
public static int[] fa = new int[MAXV];
3843
public static int[] pre0 = new int[MAXN];
3944
public static int[] cntv = new int[MAXV];
4045

46+
// 查询的答案
4147
public static int[] ans = new int[MAXM];
4248

4349
public static int find(int x) {

src/class174/Code03_ColorfulWorld2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
//const int MAXV = 100002;
2121
//int n, m;
2222
//int blen, bnum;
23-
//int maxv, lazy;
2423
//
2524
//int arr[MAXN];
2625
//int op[MAXM];
2726
//int ql[MAXM];
2827
//int qr[MAXM];
2928
//int qx[MAXM];
3029
//
30+
//int maxv, lazy;
3131
//int fa[MAXV];
3232
//int pre0[MAXN];
3333
//int cntv[MAXV];

0 commit comments

Comments
 (0)