diff --git a/.verify-helper/timestamps.remote.json b/.verify-helper/timestamps.remote.json index 8e59ca83b..8f6a3d6e6 100644 --- a/.verify-helper/timestamps.remote.json +++ b/.verify-helper/timestamps.remote.json @@ -37,14 +37,14 @@ "tests/library_checker_aizu_tests/data_structures/rmq_linear.test.cpp": "2026-03-09 12:21:26 -0600", "tests/library_checker_aizu_tests/data_structures/rmq_sparse_table.test.cpp": "2026-03-09 12:21:26 -0600", "tests/library_checker_aizu_tests/data_structures/rmq_sparse_table_inc.test.cpp": "2026-01-18 11:15:41 +0000", -"tests/library_checker_aizu_tests/data_structures/simple_tree.test.cpp": "2026-03-25 22:10:17 -0600", +"tests/library_checker_aizu_tests/data_structures/simple_tree.test.cpp": "2026-04-04 12:45:20 -0600", "tests/library_checker_aizu_tests/data_structures/simple_tree_inc.test.cpp": "2026-03-25 22:10:17 -0600", "tests/library_checker_aizu_tests/data_structures/simple_tree_inc_line.test.cpp": "2026-03-25 22:10:17 -0600", "tests/library_checker_aizu_tests/data_structures/simple_tree_inc_queue.test.cpp": "2026-03-25 22:10:17 -0600", "tests/library_checker_aizu_tests/data_structures/simple_tree_inc_walk.test.cpp": "2026-03-25 22:10:17 -0600", -"tests/library_checker_aizu_tests/data_structures/simple_tree_line.test.cpp": "2026-03-25 22:10:17 -0600", -"tests/library_checker_aizu_tests/data_structures/simple_tree_queue.test.cpp": "2026-03-25 22:10:17 -0600", -"tests/library_checker_aizu_tests/data_structures/simple_tree_walk.test.cpp": "2026-03-25 22:10:17 -0600", +"tests/library_checker_aizu_tests/data_structures/simple_tree_line.test.cpp": "2026-04-04 12:45:20 -0600", +"tests/library_checker_aizu_tests/data_structures/simple_tree_queue.test.cpp": "2026-04-04 12:45:20 -0600", +"tests/library_checker_aizu_tests/data_structures/simple_tree_walk.test.cpp": "2026-04-04 12:45:20 -0600", "tests/library_checker_aizu_tests/dsu/dsu.test.cpp": "2026-02-27 15:26:53 -0700", "tests/library_checker_aizu_tests/dsu/dsu_bipartite.test.cpp": "2026-03-06 16:06:56 -0700", "tests/library_checker_aizu_tests/dsu/dsu_weighted_aizu.test.cpp": "2026-03-06 16:06:56 -0700", diff --git a/library/data_structures_[l,r)/bit_uncommon/walk_lambda.hpp b/library/data_structures_[l,r)/bit_uncommon/walk_lambda.hpp index a652e94de..fe55e883d 100644 --- a/library/data_structures_[l,r)/bit_uncommon/walk_lambda.hpp +++ b/library/data_structures_[l,r)/bit_uncommon/walk_lambda.hpp @@ -1,4 +1,4 @@ -void walk(const auto& f) { +void walk(auto f) { ll sum = 0; for (int i = bit_floor(size(s)), r = 0; i; i /= 2) if (r + i <= sz(s) && f(r + i, sum + s[r + i - 1])) diff --git a/library/data_structures_[l,r)/seg_tree_uncommon/find_first.hpp b/library/data_structures_[l,r)/seg_tree_uncommon/find_first.hpp index dcc78aa2b..c960eb345 100644 --- a/library/data_structures_[l,r)/seg_tree_uncommon/find_first.hpp +++ b/library/data_structures_[l,r)/seg_tree_uncommon/find_first.hpp @@ -25,12 +25,11 @@ //! such element exists then `r` is returned //! @time O(log(n)) //! @space O(log(n)) for recursion stack -int find_first(int l, int r, const auto& f) { +int find_first(int l, int r, auto f) { return find_first_in_range(l, r, f, 0, n, 1); } //! invariant: f(tree[v], tl, tr) is 1 -int find_first_in_subtree(const auto& f, int tl, int tr, - int v) { +int find_first_in_subtree(auto f, int tl, int tr, int v) { if (v >= n) return tl; int tm = split(tl, tr); push(tl, tm, tr, v); @@ -38,8 +37,8 @@ int find_first_in_subtree(const auto& f, int tl, int tr, return find_first_in_subtree(f, tl, tm, 2 * v); return find_first_in_subtree(f, tm, tr, 2 * v + 1); } -int find_first_in_range(int l, int r, const auto& f, - int tl, int tr, int v) { +int find_first_in_range(int l, int r, auto f, int tl, + int tr, int v) { if (r <= tl || tr <= l) return r; if (l <= tl && tr <= r) return f(tree[v], tl, tr) diff --git a/library/data_structures_[l,r)/seg_tree_uncommon/find_last.hpp b/library/data_structures_[l,r)/seg_tree_uncommon/find_last.hpp index 74ee92c39..1b90f5b47 100644 --- a/library/data_structures_[l,r)/seg_tree_uncommon/find_last.hpp +++ b/library/data_structures_[l,r)/seg_tree_uncommon/find_last.hpp @@ -25,12 +25,11 @@ //! such element exists then (l - 1) is returned //! @time O(log(n)) //! @space O(log(n)) for recursion stack -int find_last(int l, int r, const auto& f) { +int find_last(int l, int r, auto f) { return find_last_in_range(l, r, f, 0, n, 1); } //! invariant: f(tree[v], tl, tr) is 1 -int find_last_in_subtree(const auto& f, int tl, int tr, - int v) { +int find_last_in_subtree(auto f, int tl, int tr, int v) { if (v >= n) return tl; int tm = split(tl, tr); push(tl, tm, tr, v); @@ -38,7 +37,7 @@ int find_last_in_subtree(const auto& f, int tl, int tr, return find_last_in_subtree(f, tm, tr, 2 * v + 1); return find_last_in_subtree(f, tl, tm, 2 * v); } -int find_last_in_range(int l, int r, const auto& f, int tl, +int find_last_in_range(int l, int r, auto f, int tl, int tr, int v) { if (r <= tl || tr <= l) return l - 1; if (l <= tl && tr <= r) diff --git a/library/data_structures_[l,r)/seg_tree_uncommon/max_right.hpp b/library/data_structures_[l,r)/seg_tree_uncommon/max_right.hpp index 3f615dbb1..4ac12cc48 100644 --- a/library/data_structures_[l,r)/seg_tree_uncommon/max_right.hpp +++ b/library/data_structures_[l,r)/seg_tree_uncommon/max_right.hpp @@ -1,4 +1,4 @@ -void max_right(int l, int r, const auto& f) { +void max_right(int l, int r, auto f) { for (T x = unit; l < r;) { int u = l + n, v = __lg(min(u & -u, r - l)), m = l + (1 << v); diff --git a/library/data_structures_[l,r)/seg_tree_uncommon/min_left.hpp b/library/data_structures_[l,r)/seg_tree_uncommon/min_left.hpp index 65a71a982..636721143 100644 --- a/library/data_structures_[l,r)/seg_tree_uncommon/min_left.hpp +++ b/library/data_structures_[l,r)/seg_tree_uncommon/min_left.hpp @@ -1,4 +1,4 @@ -void min_left(int l, int r, const auto& f) { +void min_left(int l, int r, auto f) { for (T x = unit; l < r;) { int u = r + n, v = __lg(min(u & -u, r - l)), m = r - (1 << v); diff --git a/library/data_structures_[l,r]/bit_uncommon/walk_lambda.hpp b/library/data_structures_[l,r]/bit_uncommon/walk_lambda.hpp index a87ee4aff..1f456b64f 100644 --- a/library/data_structures_[l,r]/bit_uncommon/walk_lambda.hpp +++ b/library/data_structures_[l,r]/bit_uncommon/walk_lambda.hpp @@ -1,4 +1,4 @@ -void walk(const auto& f) { +void walk(auto f) { ll sum = 0; for (int i = bit_floor(size(s)), r = 0; i; i /= 2) if (r + i <= sz(s) && f(r + i - 1, sum + s[r + i - 1])) diff --git a/library/data_structures_[l,r]/seg_tree_uncommon/max_right.hpp b/library/data_structures_[l,r]/seg_tree_uncommon/max_right.hpp index 48152e9bc..286c19d48 100644 --- a/library/data_structures_[l,r]/seg_tree_uncommon/max_right.hpp +++ b/library/data_structures_[l,r]/seg_tree_uncommon/max_right.hpp @@ -1,4 +1,4 @@ -void max_right(int l, int r, const auto& f) { +void max_right(int l, int r, auto f) { if (T x = s[l + n]; f(l, x)) for (l++; l <= r;) { int u = l + n, v = __lg(min(u & -u, r - l + 1)), diff --git a/library/data_structures_[l,r]/seg_tree_uncommon/min_left.hpp b/library/data_structures_[l,r]/seg_tree_uncommon/min_left.hpp index e86e26c64..d52d401dd 100644 --- a/library/data_structures_[l,r]/seg_tree_uncommon/min_left.hpp +++ b/library/data_structures_[l,r]/seg_tree_uncommon/min_left.hpp @@ -1,4 +1,4 @@ -int min_left(int l, int r, const auto& f) { +int min_left(int l, int r, auto f) { if (T x = s[r + n]; f(r, x)) for (r--; l <= r;) { int u = r + 1 + n, v = __lg(min(u & -u, r - l + 1)), diff --git a/library/dsu/range_parallel_dsu.hpp b/library/dsu/range_parallel_dsu.hpp index 03bd3d4f4..d18b4e914 100644 --- a/library/dsu/range_parallel_dsu.hpp +++ b/library/dsu/range_parallel_dsu.hpp @@ -8,12 +8,12 @@ struct rp_dsu { vector dsus; rp_dsu(int n): dsus(bit_width(n + 0u), DSU(n)) {} - void join(int u, int v, int len, const auto& f) { + void join(int u, int v, int len, auto f) { int i = __lg(len); join(u, v, f, i); join(u + len - (1 << i), v + len - (1 << i), f, i); } - void join(int u, int v, const auto& f, int i) { + void join(int u, int v, auto f, int i) { if (!dsus[i].join(u, v)) return; if (i == 0) return f(u, v); i--; diff --git a/library/monotonic_stack/monotonic_stack.hpp b/library/monotonic_stack/monotonic_stack.hpp index a133d804f..f17529d45 100644 --- a/library/monotonic_stack/monotonic_stack.hpp +++ b/library/monotonic_stack/monotonic_stack.hpp @@ -7,7 +7,7 @@ //! a[le[i]] < a[i] //! @time O(n) //! @space O(n) -vi mono_st(const auto& a, const auto& cmp) { +vi mono_st(const auto& a, auto cmp) { vi l(sz(a)); rep(i, 0, sz(a)) for (l[i] = i - 1; l[i] >= 0 && !cmp(a[l[i]], a[i]);) l[i] = l[l[i]]; diff --git a/library/trees/centroid_decomp.hpp b/library/trees/centroid_decomp.hpp index 572f25e13..4980acb45 100644 --- a/library/trees/centroid_decomp.hpp +++ b/library/trees/centroid_decomp.hpp @@ -5,7 +5,7 @@ //! @endcode //! @time O(n log n) //! @space O(n) -void centroid(auto& adj, const auto& f) { +void centroid(auto& adj, auto f) { vi siz(sz(adj)); auto calc_sz = [&](auto&& self, int u, int p) -> void { siz[u] = 1; diff --git a/library/trees/edge_cd.hpp b/library/trees/edge_cd.hpp index 372309c0f..d4038bf64 100644 --- a/library/trees/edge_cd.hpp +++ b/library/trees/edge_cd.hpp @@ -13,8 +13,7 @@ //! handle single-edge-paths separately //! @time O(n logφ n) //! @space O(n) -template -void edge_cd(vector& adj, const auto& f) { +template void edge_cd(vector& adj, auto f) { vi siz(sz(adj)); auto find_cent = [&](auto&& self, int u, int p, int m) -> int {