Skip to content

Commit 047674b

Browse files
committed
modify code
1 parent a5910ec commit 047674b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/class174/Code03_ColorfulWorld1.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public static void compute(int l, int r) {
147147
}
148148

149149
public static void prepare() {
150-
blen = (int) Math.sqrt(n * 3.0);
150+
blen = (int) Math.sqrt(n);
151151
bnum = (n + blen - 1) / blen;
152152
for (int i = 1; i <= n; i++) {
153153
pre0[i] = pre0[i - 1] + (arr[i] == 0 ? 1 : 0);

src/class174/Code03_ColorfulWorld2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
//}
133133
//
134134
//void prepare() {
135-
// blen = (int)sqrt(n * 3.0);
135+
// blen = (int)sqrt(n);
136136
// bnum = (n + blen - 1) / blen;
137137
// for (int i = 1; i <= n; i++) {
138138
// pre0[i] = pre0[i - 1] + (arr[i] == 0 ? 1 : 0);

0 commit comments

Comments
 (0)