Skip to content

Commit 939c438

Browse files
lrvideckisweb-flow
andauthored
nits (#178)
* nits * [auto-verifier] verify commit 9b0dd36 --------- Co-authored-by: GitHub <noreply@github.com>
1 parent 4623957 commit 939c438

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

.verify-helper/timestamps.remote.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"tests/library_checker_aizu_tests/data_structures/implicit_seg_tree.test.cpp": "2026-01-18 11:15:41 +0000",
2626
"tests/library_checker_aizu_tests/data_structures/kruskal_tree_aizu.test.cpp": "2026-01-18 02:20:40 +0000",
2727
"tests/library_checker_aizu_tests/data_structures/kth_smallest_pst.test.cpp": "2026-01-18 11:15:41 +0000",
28-
"tests/library_checker_aizu_tests/data_structures/kth_smallest_wavelet_matrix.test.cpp": "2026-01-22 20:57:12 -0700",
28+
"tests/library_checker_aizu_tests/data_structures/kth_smallest_wavelet_matrix.test.cpp": "2026-02-03 09:18:52 -0700",
2929
"tests/library_checker_aizu_tests/data_structures/lazy_segment_tree.test.cpp": "2026-01-23 04:31:29 +0000",
3030
"tests/library_checker_aizu_tests/data_structures/lazy_segment_tree_constructor.test.cpp": "2026-01-23 04:31:29 +0000",
3131
"tests/library_checker_aizu_tests/data_structures/lazy_segment_tree_inc.test.cpp": "2026-01-23 04:31:29 +0000",
@@ -75,7 +75,7 @@
7575
"tests/library_checker_aizu_tests/handmade_tests/functional_graph.test.cpp": "2025-08-06 16:18:37 -0600",
7676
"tests/library_checker_aizu_tests/handmade_tests/hilbert_mos.test.cpp": "2026-01-18 02:20:40 +0000",
7777
"tests/library_checker_aizu_tests/handmade_tests/manacher.test.cpp": "2026-01-18 11:15:41 +0000",
78-
"tests/library_checker_aizu_tests/handmade_tests/merge_st_and_wavelet.test.cpp": "2026-01-22 20:57:12 -0700",
78+
"tests/library_checker_aizu_tests/handmade_tests/merge_st_and_wavelet.test.cpp": "2026-02-03 09:18:52 -0700",
7979
"tests/library_checker_aizu_tests/handmade_tests/mobius.test.cpp": "2025-02-10 14:50:36 -0700",
8080
"tests/library_checker_aizu_tests/handmade_tests/mod_division.test.cpp": "2025-09-07 16:12:35 -0600",
8181
"tests/library_checker_aizu_tests/handmade_tests/n_choose_k.test.cpp": "2025-08-28 13:19:16 -0600",

library/data_structures_[l,r)/seg_tree_uncommon/wavelet_count_less.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
int count(int l, int r, ll ub) {
66
int res = 0;
77
for (int h = sz(bv); h--;) {
8-
int l0 = bv[h].cnt(l), r0 = bv[h].cnt(r);
9-
if ((~ub >> h) & 1) l = l0, r = r0;
10-
else
11-
res += r0 - l0, l += bv[h].cnt(n) - l0,
12-
r += bv[h].cnt(n) - r0;
8+
int x = bv[h].cnt(l), y = bv[h].cnt(r);
9+
if ((ub >> h) & 1)
10+
res += y - x, l += bv[h].cnt(n) - x,
11+
r += bv[h].cnt(n) - y;
12+
else l = x, r = y;
1313
}
1414
return res;
1515
}

library/data_structures_[l,r)/seg_tree_uncommon/wavelet_matrix.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ struct wavelet_matrix {
2525
ll kth(int l, int r, int k) {
2626
ll res = 0;
2727
for (int h = sz(bv); h--;) {
28-
int l0 = bv[h].cnt(l), r0 = bv[h].cnt(r);
29-
if (k < r0 - l0) l = l0, r = r0;
28+
int x = bv[h].cnt(l), y = bv[h].cnt(r);
29+
if (k < y - x) l = x, r = y;
3030
else
31-
k -= r0 - l0, res |= 1LL << h,
32-
l += bv[h].cnt(n) - l0, r += bv[h].cnt(n) - r0;
31+
k -= y - x, res += 1LL << h, l += bv[h].cnt(n) - x,
32+
r += bv[h].cnt(n) - y;
3333
}
3434
return res;
3535
}

0 commit comments

Comments
 (0)