File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff 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 ) {
Original file line number Diff line number Diff line change 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];
You can’t perform that action at this time.
0 commit comments