Skip to content

Commit 8ce20c1

Browse files
committed
Merge branch 'dev' into adj_to_g
2 parents c13fdb5 + b93e006 commit 8ce20c1

13 files changed

Lines changed: 22 additions & 25 deletions

File tree

.verify-helper/timestamps.remote.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@
3737
"tests/library_checker_aizu_tests/data_structures/rmq_linear.test.cpp": "2026-03-09 12:21:26 -0600",
3838
"tests/library_checker_aizu_tests/data_structures/rmq_sparse_table.test.cpp": "2026-03-09 12:21:26 -0600",
3939
"tests/library_checker_aizu_tests/data_structures/rmq_sparse_table_inc.test.cpp": "2026-01-18 11:15:41 +0000",
40-
"tests/library_checker_aizu_tests/data_structures/simple_tree.test.cpp": "2026-03-25 22:10:17 -0600",
40+
"tests/library_checker_aizu_tests/data_structures/simple_tree.test.cpp": "2026-04-04 12:45:20 -0600",
4141
"tests/library_checker_aizu_tests/data_structures/simple_tree_inc.test.cpp": "2026-03-25 22:10:17 -0600",
4242
"tests/library_checker_aizu_tests/data_structures/simple_tree_inc_line.test.cpp": "2026-03-25 22:10:17 -0600",
4343
"tests/library_checker_aizu_tests/data_structures/simple_tree_inc_queue.test.cpp": "2026-03-25 22:10:17 -0600",
4444
"tests/library_checker_aizu_tests/data_structures/simple_tree_inc_walk.test.cpp": "2026-03-25 22:10:17 -0600",
45-
"tests/library_checker_aizu_tests/data_structures/simple_tree_line.test.cpp": "2026-03-25 22:10:17 -0600",
46-
"tests/library_checker_aizu_tests/data_structures/simple_tree_queue.test.cpp": "2026-03-25 22:10:17 -0600",
47-
"tests/library_checker_aizu_tests/data_structures/simple_tree_walk.test.cpp": "2026-03-25 22:10:17 -0600",
45+
"tests/library_checker_aizu_tests/data_structures/simple_tree_line.test.cpp": "2026-04-04 12:45:20 -0600",
46+
"tests/library_checker_aizu_tests/data_structures/simple_tree_queue.test.cpp": "2026-04-04 12:45:20 -0600",
47+
"tests/library_checker_aizu_tests/data_structures/simple_tree_walk.test.cpp": "2026-04-04 12:45:20 -0600",
4848
"tests/library_checker_aizu_tests/dsu/dsu.test.cpp": "2026-02-27 15:26:53 -0700",
4949
"tests/library_checker_aizu_tests/dsu/dsu_bipartite.test.cpp": "2026-03-06 16:06:56 -0700",
5050
"tests/library_checker_aizu_tests/dsu/dsu_weighted_aizu.test.cpp": "2026-03-06 16:06:56 -0700",

library/data_structures_[l,r)/bit_uncommon/walk_lambda.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
void walk(const auto& f) {
1+
void walk(auto f) {
22
ll sum = 0;
33
for (int i = bit_floor(size(s)), r = 0; i; i /= 2)
44
if (r + i <= sz(s) && f(r + i, sum + s[r + i - 1]))

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,20 @@
2525
//! such element exists then `r` is returned
2626
//! @time O(log(n))
2727
//! @space O(log(n)) for recursion stack
28-
int find_first(int l, int r, const auto& f) {
28+
int find_first(int l, int r, auto f) {
2929
return find_first_in_range(l, r, f, 0, n, 1);
3030
}
3131
//! invariant: f(tree[v], tl, tr) is 1
32-
int find_first_in_subtree(const auto& f, int tl, int tr,
33-
int v) {
32+
int find_first_in_subtree(auto f, int tl, int tr, int v) {
3433
if (v >= n) return tl;
3534
int tm = split(tl, tr);
3635
push(tl, tm, tr, v);
3736
if (f(tree[2 * v], tl, tm))
3837
return find_first_in_subtree(f, tl, tm, 2 * v);
3938
return find_first_in_subtree(f, tm, tr, 2 * v + 1);
4039
}
41-
int find_first_in_range(int l, int r, const auto& f,
42-
int tl, int tr, int v) {
40+
int find_first_in_range(int l, int r, auto f, int tl,
41+
int tr, int v) {
4342
if (r <= tl || tr <= l) return r;
4443
if (l <= tl && tr <= r)
4544
return f(tree[v], tl, tr)

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,19 @@
2525
//! such element exists then (l - 1) is returned
2626
//! @time O(log(n))
2727
//! @space O(log(n)) for recursion stack
28-
int find_last(int l, int r, const auto& f) {
28+
int find_last(int l, int r, auto f) {
2929
return find_last_in_range(l, r, f, 0, n, 1);
3030
}
3131
//! invariant: f(tree[v], tl, tr) is 1
32-
int find_last_in_subtree(const auto& f, int tl, int tr,
33-
int v) {
32+
int find_last_in_subtree(auto f, int tl, int tr, int v) {
3433
if (v >= n) return tl;
3534
int tm = split(tl, tr);
3635
push(tl, tm, tr, v);
3736
if (f(tree[2 * v + 1], tm, tr))
3837
return find_last_in_subtree(f, tm, tr, 2 * v + 1);
3938
return find_last_in_subtree(f, tl, tm, 2 * v);
4039
}
41-
int find_last_in_range(int l, int r, const auto& f, int tl,
40+
int find_last_in_range(int l, int r, auto f, int tl,
4241
int tr, int v) {
4342
if (r <= tl || tr <= l) return l - 1;
4443
if (l <= tl && tr <= r)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
void max_right(int l, int r, const auto& f) {
1+
void max_right(int l, int r, auto f) {
22
for (T x = unit; l < r;) {
33
int u = l + n, v = __lg(min(u & -u, r - l)),
44
m = l + (1 << v);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
void min_left(int l, int r, const auto& f) {
1+
void min_left(int l, int r, auto f) {
22
for (T x = unit; l < r;) {
33
int u = r + n, v = __lg(min(u & -u, r - l)),
44
m = r - (1 << v);

library/data_structures_[l,r]/bit_uncommon/walk_lambda.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
void walk(const auto& f) {
1+
void walk(auto f) {
22
ll sum = 0;
33
for (int i = bit_floor(size(s)), r = 0; i; i /= 2)
44
if (r + i <= sz(s) && f(r + i - 1, sum + s[r + i - 1]))

library/data_structures_[l,r]/seg_tree_uncommon/max_right.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
void max_right(int l, int r, const auto& f) {
1+
void max_right(int l, int r, auto f) {
22
if (T x = s[l + n]; f(l, x))
33
for (l++; l <= r;) {
44
int u = l + n, v = __lg(min(u & -u, r - l + 1)),

library/data_structures_[l,r]/seg_tree_uncommon/min_left.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
int min_left(int l, int r, const auto& f) {
1+
int min_left(int l, int r, auto f) {
22
if (T x = s[r + n]; f(r, x))
33
for (r--; l <= r;) {
44
int u = r + 1 + n, v = __lg(min(u & -u, r - l + 1)),

library/dsu/range_parallel_dsu.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
struct rp_dsu {
99
vector<DSU> dsus;
1010
rp_dsu(int n): dsus(bit_width(n + 0u), DSU(n)) {}
11-
void join(int u, int v, int len, const auto& f) {
11+
void join(int u, int v, int len, auto f) {
1212
int i = __lg(len);
1313
join(u, v, f, i);
1414
join(u + len - (1 << i), v + len - (1 << i), f, i);
1515
}
16-
void join(int u, int v, const auto& f, int i) {
16+
void join(int u, int v, auto f, int i) {
1717
if (!dsus[i].join(u, v)) return;
1818
if (i == 0) return f(u, v);
1919
i--;

0 commit comments

Comments
 (0)