Skip to content

Commit ebd04bb

Browse files
author
Cameron Custer
committed
Merge remote-tracking branch 'origin/dev' into naming-consistency
# Conflicts: # library/data_structures_[l,r)/uncommon/priority_queue_of_updates.hpp
2 parents 5389925 + 29d8d92 commit ebd04bb

26 files changed

Lines changed: 78 additions & 77 deletions

.verify-helper/timestamps.remote.json

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"tests/library_checker_aizu_tests/convolution/gcd_convolution.test.cpp": "2025-08-28 13:19:16 -0600",
33
"tests/library_checker_aizu_tests/convolution/lcm_convolution.test.cpp": "2025-08-28 13:19:16 -0600",
4-
"tests/library_checker_aizu_tests/convolution/min_plus_convolution.test.cpp": "2026-04-12 16:21:27 -0600",
4+
"tests/library_checker_aizu_tests/convolution/min_plus_convolution.test.cpp": "2026-07-06 09:57:36 -0700",
55
"tests/library_checker_aizu_tests/convolution/xor_convolution.test.cpp": "2026-03-06 12:17:28 -0700",
66
"tests/library_checker_aizu_tests/data_structures/binary_search_example.test.cpp": "2024-11-18 10:51:39 -0600",
77
"tests/library_checker_aizu_tests/data_structures/binary_trie.test.cpp": "2026-01-18 02:20:40 +0000",
8-
"tests/library_checker_aizu_tests/data_structures/bit.test.cpp": "2026-04-26 11:38:07 -0600",
9-
"tests/library_checker_aizu_tests/data_structures/bit_inc.test.cpp": "2026-04-06 12:17:32 -0600",
10-
"tests/library_checker_aizu_tests/data_structures/bit_inc_walk.test.cpp": "2026-04-06 12:17:32 -0600",
11-
"tests/library_checker_aizu_tests/data_structures/bit_ordered_set.test.cpp": "2026-04-06 12:17:32 -0600",
12-
"tests/library_checker_aizu_tests/data_structures/bit_rupq.test.cpp": "2026-04-06 12:17:32 -0600",
13-
"tests/library_checker_aizu_tests/data_structures/bit_rurq.test.cpp": "2026-04-06 12:17:32 -0600",
14-
"tests/library_checker_aizu_tests/data_structures/bit_walk.test.cpp": "2026-04-26 11:38:07 -0600",
8+
"tests/library_checker_aizu_tests/data_structures/bit.test.cpp": "2026-07-06 09:26:00 -0700",
9+
"tests/library_checker_aizu_tests/data_structures/bit_inc.test.cpp": "2026-07-06 09:26:00 -0700",
10+
"tests/library_checker_aizu_tests/data_structures/bit_inc_walk.test.cpp": "2026-07-06 09:26:00 -0700",
11+
"tests/library_checker_aizu_tests/data_structures/bit_ordered_set.test.cpp": "2026-07-06 09:26:00 -0700",
12+
"tests/library_checker_aizu_tests/data_structures/bit_rupq.test.cpp": "2026-07-06 09:26:00 -0700",
13+
"tests/library_checker_aizu_tests/data_structures/bit_rurq.test.cpp": "2026-07-06 09:26:00 -0700",
14+
"tests/library_checker_aizu_tests/data_structures/bit_walk.test.cpp": "2026-07-06 09:26:00 -0700",
1515
"tests/library_checker_aizu_tests/data_structures/deque.test.cpp": "2026-01-18 02:20:40 +0000",
1616
"tests/library_checker_aizu_tests/data_structures/deque_index.test.cpp": "2026-01-18 02:20:40 +0000",
1717
"tests/library_checker_aizu_tests/data_structures/deque_op.test.cpp": "2026-01-18 02:20:40 +0000",
@@ -33,7 +33,7 @@
3333
"tests/library_checker_aizu_tests/data_structures/permutation_tree.test.cpp": "2026-05-24 23:00:07 -0500",
3434
"tests/library_checker_aizu_tests/data_structures/persistent_queue_tree.test.cpp": "2026-04-26 11:38:07 -0600",
3535
"tests/library_checker_aizu_tests/data_structures/persistent_seg_tree.test.cpp": "2026-04-26 11:38:07 -0600",
36-
"tests/library_checker_aizu_tests/data_structures/pq_ds_undo_sliding_window.test.cpp": "2026-01-18 02:20:40 +0000",
36+
"tests/library_checker_aizu_tests/data_structures/pq_ds_undo_sliding_window.test.cpp": "2026-07-06 09:26:00 -0700",
3737
"tests/library_checker_aizu_tests/data_structures/rmq_linear.test.cpp": "2026-05-24 23:00:07 -0500",
3838
"tests/library_checker_aizu_tests/data_structures/rmq_sparse_table.test.cpp": "2026-05-24 23:00:07 -0500",
3939
"tests/library_checker_aizu_tests/data_structures/rmq_sparse_table_inc.test.cpp": "2026-01-18 11:15:41 +0000",
@@ -55,33 +55,33 @@
5555
"tests/library_checker_aizu_tests/dsu/range_parallel_dsu.test.cpp": "2026-04-26 11:38:07 -0600",
5656
"tests/library_checker_aizu_tests/flow/hungarian.test.cpp": "2024-11-17 14:04:03 -0600",
5757
"tests/library_checker_aizu_tests/flow/min_cost_max_flow.test.cpp": "2026-04-06 14:41:55 -0600",
58-
"tests/library_checker_aizu_tests/graphs/bcc_callback_aizu_bcc.test.cpp": "2026-04-12 16:21:27 -0600",
59-
"tests/library_checker_aizu_tests/graphs/bcc_callback_aizu_two_edge_cc.test.cpp": "2026-04-12 16:21:27 -0600",
60-
"tests/library_checker_aizu_tests/graphs/bcc_callback_lib_checker_bcc.test.cpp": "2026-04-12 16:21:27 -0600",
61-
"tests/library_checker_aizu_tests/graphs/bcc_callback_lib_checker_two_cc.test.cpp": "2026-04-12 16:21:27 -0600",
62-
"tests/library_checker_aizu_tests/graphs/biconnected_components.test.cpp": "2026-04-26 11:38:07 -0600",
58+
"tests/library_checker_aizu_tests/graphs/bcc_callback_aizu_bcc.test.cpp": "2026-07-06 09:57:36 -0700",
59+
"tests/library_checker_aizu_tests/graphs/bcc_callback_aizu_two_edge_cc.test.cpp": "2026-07-06 09:57:36 -0700",
60+
"tests/library_checker_aizu_tests/graphs/bcc_callback_lib_checker_bcc.test.cpp": "2026-07-06 09:57:36 -0700",
61+
"tests/library_checker_aizu_tests/graphs/bcc_callback_lib_checker_two_cc.test.cpp": "2026-07-06 09:57:36 -0700",
62+
"tests/library_checker_aizu_tests/graphs/biconnected_components.test.cpp": "2026-07-06 09:57:36 -0700",
6363
"tests/library_checker_aizu_tests/graphs/connected_components_of_complement_graph.test.cpp": "2026-04-06 14:41:55 -0600",
6464
"tests/library_checker_aizu_tests/graphs/dijkstra_aizu.test.cpp": "2026-04-06 14:41:55 -0600",
6565
"tests/library_checker_aizu_tests/graphs/dijkstra_lib_checker.test.cpp": "2026-04-26 11:38:07 -0600",
66-
"tests/library_checker_aizu_tests/graphs/directed_cycle.test.cpp": "2026-04-12 16:21:27 -0600",
66+
"tests/library_checker_aizu_tests/graphs/directed_cycle.test.cpp": "2026-07-06 09:57:36 -0700",
6767
"tests/library_checker_aizu_tests/graphs/enumerate_triangles.test.cpp": "2026-04-26 11:38:07 -0600",
68-
"tests/library_checker_aizu_tests/graphs/euler_walk_directed.test.cpp": "2026-04-12 16:21:27 -0600",
69-
"tests/library_checker_aizu_tests/graphs/euler_walk_undirected.test.cpp": "2026-04-12 16:21:27 -0600",
68+
"tests/library_checker_aizu_tests/graphs/euler_walk_directed.test.cpp": "2026-07-06 09:57:36 -0700",
69+
"tests/library_checker_aizu_tests/graphs/euler_walk_undirected.test.cpp": "2026-07-06 09:57:36 -0700",
7070
"tests/library_checker_aizu_tests/graphs/hopcroft_karp_aizu.test.cpp": "2026-05-01 11:34:51 -0600",
7171
"tests/library_checker_aizu_tests/graphs/hopcroft_karp_lib_checker.test.cpp": "2026-05-01 11:34:51 -0600",
7272
"tests/library_checker_aizu_tests/graphs/mst.test.cpp": "2026-01-22 10:08:22 -0700",
73-
"tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp": "2026-04-12 16:21:27 -0600",
74-
"tests/library_checker_aizu_tests/graphs/strongly_connected_components_aizu.test.cpp": "2026-04-12 16:21:27 -0600",
75-
"tests/library_checker_aizu_tests/graphs/strongly_connected_components_lib_checker.test.cpp": "2026-04-12 16:21:27 -0600",
76-
"tests/library_checker_aizu_tests/graphs/two_edge_components.test.cpp": "2026-04-12 16:21:27 -0600",
77-
"tests/library_checker_aizu_tests/handmade_tests/count_paths.test.cpp": "2026-04-27 08:17:20 -0600",
73+
"tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp": "2026-07-06 09:57:36 -0700",
74+
"tests/library_checker_aizu_tests/graphs/strongly_connected_components_aizu.test.cpp": "2026-07-06 09:57:36 -0700",
75+
"tests/library_checker_aizu_tests/graphs/strongly_connected_components_lib_checker.test.cpp": "2026-07-06 09:57:36 -0700",
76+
"tests/library_checker_aizu_tests/graphs/two_edge_components.test.cpp": "2026-07-06 09:57:36 -0700",
77+
"tests/library_checker_aizu_tests/handmade_tests/count_paths.test.cpp": "2026-07-06 09:57:36 -0700",
7878
"tests/library_checker_aizu_tests/handmade_tests/dsu.test.cpp": "2026-01-22 10:08:22 -0700",
79-
"tests/library_checker_aizu_tests/handmade_tests/edge_cd_small_trees.test.cpp": "2026-04-27 08:17:20 -0600",
79+
"tests/library_checker_aizu_tests/handmade_tests/edge_cd_small_trees.test.cpp": "2026-07-06 09:57:36 -0700",
8080
"tests/library_checker_aizu_tests/handmade_tests/fib_matrix_expo.test.cpp": "2026-01-28 21:48:16 -0700",
8181
"tests/library_checker_aizu_tests/handmade_tests/functional_graph.test.cpp": "2026-04-26 11:38:07 -0600",
8282
"tests/library_checker_aizu_tests/handmade_tests/hilbert_mos.test.cpp": "2026-01-18 02:20:40 +0000",
8383
"tests/library_checker_aizu_tests/handmade_tests/kd_bit.test.cpp": "2026-02-19 18:06:52 -0700",
84-
"tests/library_checker_aizu_tests/handmade_tests/kth_par.test.cpp": "2026-06-27 18:29:52 -0500",
84+
"tests/library_checker_aizu_tests/handmade_tests/kth_par.test.cpp": "2026-07-06 09:57:36 -0700",
8585
"tests/library_checker_aizu_tests/handmade_tests/manacher.test.cpp": "2026-04-26 11:38:07 -0600",
8686
"tests/library_checker_aizu_tests/handmade_tests/merge_st_and_wavelet.test.cpp": "2026-04-26 11:38:07 -0600",
8787
"tests/library_checker_aizu_tests/handmade_tests/mobius.test.cpp": "2025-02-10 14:50:36 -0700",
@@ -90,7 +90,7 @@
9090
"tests/library_checker_aizu_tests/handmade_tests/permutation_tree_small.test.cpp": "2026-05-24 23:00:07 -0500",
9191
"tests/library_checker_aizu_tests/handmade_tests/rmq_small_n.test.cpp": "2026-05-24 23:00:07 -0500",
9292
"tests/library_checker_aizu_tests/handmade_tests/sa_find_subarray.test.cpp": "2026-04-26 11:38:07 -0600",
93-
"tests/library_checker_aizu_tests/handmade_tests/seg_tree_find.test.cpp": "2026-04-26 11:38:07 -0600",
93+
"tests/library_checker_aizu_tests/handmade_tests/seg_tree_find.test.cpp": "2026-07-06 09:26:00 -0700",
9494
"tests/library_checker_aizu_tests/handmade_tests/seg_tree_find_small.test.cpp": "2026-04-26 11:38:07 -0600",
9595
"tests/library_checker_aizu_tests/handmade_tests/seg_tree_midpoint.test.cpp": "2026-04-26 11:38:07 -0600",
9696
"tests/library_checker_aizu_tests/handmade_tests/xor_basis_walk.test.cpp": "2026-03-08 15:33:28 -0600",
@@ -108,7 +108,7 @@
108108
"tests/library_checker_aizu_tests/math/partitions.test.cpp": "2025-08-28 13:19:16 -0600",
109109
"tests/library_checker_aizu_tests/math/prime_sieve.test.cpp": "2024-11-22 11:54:52 -0600",
110110
"tests/library_checker_aizu_tests/math/solve_linear_mod.test.cpp": "2026-04-12 10:51:29 -0600",
111-
"tests/library_checker_aizu_tests/math/tetration.test.cpp": "2024-11-17 14:04:03 -0600",
111+
"tests/library_checker_aizu_tests/math/tetration.test.cpp": "2026-07-06 09:26:00 -0700",
112112
"tests/library_checker_aizu_tests/math/totient.test.cpp": "2024-11-17 14:04:03 -0600",
113113
"tests/library_checker_aizu_tests/math/xor_basis_intersection.test.cpp": "2026-04-26 11:38:07 -0600",
114114
"tests/library_checker_aizu_tests/monotonic_stack_related/cartesian_binary_tree.test.cpp": "2026-04-06 13:24:49 -0600",
@@ -120,7 +120,7 @@
120120
"tests/library_checker_aizu_tests/strings/lcp_query_palindrome.test.cpp": "2026-04-26 11:38:07 -0600",
121121
"tests/library_checker_aizu_tests/strings/lcp_query_zfunc.test.cpp": "2026-04-26 11:38:07 -0600",
122122
"tests/library_checker_aizu_tests/strings/lcs_dp.test.cpp": "2025-08-05 19:19:23 -0600",
123-
"tests/library_checker_aizu_tests/strings/lcs_queries.test.cpp": "2026-04-06 12:17:32 -0600",
123+
"tests/library_checker_aizu_tests/strings/lcs_queries.test.cpp": "2026-07-06 09:26:00 -0700",
124124
"tests/library_checker_aizu_tests/strings/lcs_queries_merge_sort_tree.test.cpp": "2026-04-26 11:38:07 -0600",
125125
"tests/library_checker_aizu_tests/strings/manacher.test.cpp": "2026-04-26 11:38:07 -0600",
126126
"tests/library_checker_aizu_tests/strings/multi_matching_bs.test.cpp": "2026-04-26 11:38:07 -0600",
@@ -132,23 +132,23 @@
132132
"tests/library_checker_aizu_tests/strings/suffix_array_short.test.cpp": "2026-04-12 06:15:25 -0600",
133133
"tests/library_checker_aizu_tests/strings/trie.test.cpp": "2026-01-17 12:38:18 -0700",
134134
"tests/library_checker_aizu_tests/strings/wildcard_pattern_matching.test.cpp": "2026-04-26 11:38:07 -0600",
135-
"tests/library_checker_aizu_tests/trees/cd_count_paths_per_length.test.cpp": "2026-04-26 21:56:36 -0600",
136-
"tests/library_checker_aizu_tests/trees/edge_cd_contour_range_query.test.cpp": "2026-04-27 08:17:20 -0600",
137-
"tests/library_checker_aizu_tests/trees/edge_cd_contour_range_update.test.cpp": "2026-04-27 08:17:20 -0600",
138-
"tests/library_checker_aizu_tests/trees/edge_cd_count_paths_per_length.test.cpp": "2026-04-27 08:17:20 -0600",
139-
"tests/library_checker_aizu_tests/trees/edge_cd_reroot_dp.test.cpp": "2026-04-27 08:17:20 -0600",
140-
"tests/library_checker_aizu_tests/trees/hld_aizu1.test.cpp": "2026-04-12 16:21:27 -0600",
135+
"tests/library_checker_aizu_tests/trees/cd_count_paths_per_length.test.cpp": "2026-07-06 09:57:36 -0700",
136+
"tests/library_checker_aizu_tests/trees/edge_cd_contour_range_query.test.cpp": "2026-07-06 09:57:36 -0700",
137+
"tests/library_checker_aizu_tests/trees/edge_cd_contour_range_update.test.cpp": "2026-07-06 09:57:36 -0700",
138+
"tests/library_checker_aizu_tests/trees/edge_cd_count_paths_per_length.test.cpp": "2026-07-06 09:57:36 -0700",
139+
"tests/library_checker_aizu_tests/trees/edge_cd_reroot_dp.test.cpp": "2026-07-06 09:57:36 -0700",
140+
"tests/library_checker_aizu_tests/trees/hld_aizu1.test.cpp": "2026-07-06 09:26:00 -0700",
141141
"tests/library_checker_aizu_tests/trees/hld_aizu2.test.cpp": "2026-04-26 11:38:07 -0600",
142-
"tests/library_checker_aizu_tests/trees/hld_lib_checker_path.test.cpp": "2026-04-12 16:21:27 -0600",
143-
"tests/library_checker_aizu_tests/trees/hld_lib_checker_subtree_edges.test.cpp": "2026-04-12 16:21:27 -0600",
144-
"tests/library_checker_aizu_tests/trees/hld_lib_checker_subtree_nodes.test.cpp": "2026-04-12 16:21:27 -0600",
145-
"tests/library_checker_aizu_tests/trees/kth_path_hagerup.test.cpp": "2026-06-27 13:02:40 -0500",
146-
"tests/library_checker_aizu_tests/trees/kth_path_ladder.test.cpp": "2026-06-27 13:02:40 -0500",
147-
"tests/library_checker_aizu_tests/trees/kth_path_linear.test.cpp": "2026-06-27 18:29:52 -0500",
148-
"tests/library_checker_aizu_tests/trees/kth_path_tree_lift.test.cpp": "2026-04-26 11:38:07 -0600",
149-
"tests/library_checker_aizu_tests/trees/lca_all_methods_aizu.test.cpp": "2026-04-26 11:38:07 -0600",
150-
"tests/library_checker_aizu_tests/trees/lca_all_methods_lib_checker.test.cpp": "2026-04-26 11:38:07 -0600",
151-
"tests/library_checker_aizu_tests/trees/shallowest_aizu_tree_height.test.cpp": "2026-04-12 16:21:27 -0600",
152-
"tests/library_checker_aizu_tests/trees/shallowest_lib_checker_tree_path_composite.test.cpp": "2026-04-26 11:38:07 -0600",
153-
"tests/library_checker_aizu_tests/trees/subtree_isomorphism.test.cpp": "2026-04-12 16:21:27 -0600"
142+
"tests/library_checker_aizu_tests/trees/hld_lib_checker_path.test.cpp": "2026-07-06 09:26:00 -0700",
143+
"tests/library_checker_aizu_tests/trees/hld_lib_checker_subtree_edges.test.cpp": "2026-07-06 09:26:00 -0700",
144+
"tests/library_checker_aizu_tests/trees/hld_lib_checker_subtree_nodes.test.cpp": "2026-07-06 09:26:00 -0700",
145+
"tests/library_checker_aizu_tests/trees/kth_path_hagerup.test.cpp": "2026-07-06 09:57:36 -0700",
146+
"tests/library_checker_aizu_tests/trees/kth_path_ladder.test.cpp": "2026-07-06 09:57:36 -0700",
147+
"tests/library_checker_aizu_tests/trees/kth_path_linear.test.cpp": "2026-07-06 09:57:36 -0700",
148+
"tests/library_checker_aizu_tests/trees/kth_path_tree_lift.test.cpp": "2026-07-06 09:57:36 -0700",
149+
"tests/library_checker_aizu_tests/trees/lca_all_methods_aizu.test.cpp": "2026-07-06 09:57:36 -0700",
150+
"tests/library_checker_aizu_tests/trees/lca_all_methods_lib_checker.test.cpp": "2026-07-06 09:57:36 -0700",
151+
"tests/library_checker_aizu_tests/trees/shallowest_aizu_tree_height.test.cpp": "2026-07-06 09:57:36 -0700",
152+
"tests/library_checker_aizu_tests/trees/shallowest_lib_checker_tree_path_composite.test.cpp": "2026-07-06 09:57:36 -0700",
153+
"tests/library_checker_aizu_tests/trees/subtree_isomorphism.test.cpp": "2026-07-06 09:57:36 -0700"
154154
}

library/contest/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ freopen("output.txt", "w", stdout);
99
If you changed something for debugging, add a `cout << "don't submit" << endl;`
1010
or `assert(0);` at the end of the code
1111

12-
for policy base DS:
12+
for policy-based DS:
1313
```
1414
#include <bits/extc++.h>
1515
```
@@ -25,7 +25,7 @@ don't use cin for doubles/floats, it's slow, read into string, then convert to d
2525
cin.exceptions(cin.failbit);
2626
```
2727

28-
- use pramgas for C++ speed boost
28+
- use pragmas for C++ speed boost
2929
```
3030
#pragma GCC optimize("O3,unroll-loops")
3131
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")

library/convolution/min_plus_convolution_convex_and_arbitrary.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ vi min_plus(const vi& convex, const vi& arbitrary) {
99
int n = sz(convex);
1010
int m = sz(arbitrary);
1111
vi res(n + m - 1, INT_MAX);
12-
auto dnc = [&](auto dnc, int res_le, int res_ri,
12+
auto dnc = [&](auto&& dnc, int res_le, int res_ri,
1313
int arb_le, int arb_ri) {
1414
if (res_le >= res_ri) return;
1515
int mid_res = (res_le + res_ri) / 2;

library/data_structures_[l,r)/bit.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//! int r = bit.walk2(sum);
88
//! // Returns min r s.t. sum of [0,r] >= sum
99
//! // Returns n if sum of [0,n-1] < sum
10+
//! // Returns -1 if sum <= 0
1011
//! @endcode
1112
//! @time O(n + q log n)
1213
//! @space O(n)

library/data_structures_[l,r)/uncommon/priority_queue_of_updates.hpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
#pragma once
22
//! https://codeforces.com/blog/entry/111117
33
//! @code
4-
//! dsu_restorable dsu_r(n);
5-
//! pq_updates<dsu_restorable, int, int> pq(dsu_r);
6-
//! rep (i, 0, n) pq.ds.add(i, initial_nums[i]);
7-
//! //or
8-
//! pq.ds.subtree = initial_nums;
9-
//! pq.push_update(u, v, cur_pri);
10-
//! cout << pq.ds.sum(v) << '\n';
4+
//! // DS = any struct with member functions join, undo
5+
//! DS ds;
6+
//! // int = argument type of DS::join
7+
//! pq_updates<DS, int> pq(ds);
8+
//! pq.push_update(val, pri);
9+
//! pq.pop_update();
1110
//! @endcode
1211
//! @time n interweaved calls to pop_update, push_update
1312
//! take O(T(n)*nlogn) where O(T(n)) = time complexity of

library/data_structures_[l,r]/bit.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//! int r = bit.walk2(sum);
88
//! // Returns min r s.t. sum of [0,r] >= sum
99
//! // Returns n if sum of [0,n-1] < sum
10+
//! // Returns -1 if sum <= 0
1011
//! @endcode
1112
//! @time O(n + q log n)
1213
//! @space O(n)

library/graphs/bcc_callback.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
void bcc(const auto& g, auto f) {
4545
int n = sz(g), q = 0, s = 0;
4646
vi t(n), st(n);
47-
auto dfs = [&](auto dfs, int u) -> int {
47+
auto dfs = [&](auto&& dfs, int u) -> int {
4848
int l = t[u] = ++q;
4949
for (int v : g[u]) {
5050
int siz = s, lu = 0;

library/graphs/euler_path.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
vector<pii> euler_path(auto& g, int m, int s) {
1717
vi vis(m);
1818
vector<pii> path;
19-
auto dfs = [&](auto dfs, int u, int eu) -> void {
19+
auto dfs = [&](auto&& dfs, int u, int eu) -> void {
2020
while (!empty(g[u])) {
2121
auto [v, ev] = g[u].back();
2222
g[u].pop_back();

library/graphs/scc.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
auto scc(const auto& g) {
1212
int n = sz(g), num_sccs = 0, q = 0, s = 0;
1313
vi scc_id(n, -1), tin(n), st(n);
14-
auto dfs = [&](auto dfs, int u) -> int {
14+
auto dfs = [&](auto&& dfs, int u) -> int {
1515
int low = tin[u] = ++q;
1616
st[s++] = u;
1717
for (int v : g[u])

library/graphs/strongly_connected_components/add_edges_strongly_connected.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ vector<pii> extra_edges(const auto& g, int num_sccs,
2929
zero_in[scc_id[v]] = 0;
3030
}
3131
vector<bool> vis(num_sccs);
32-
auto dfs = [&](auto dfs, int u) {
32+
auto dfs = [&](auto&& dfs, int u) {
3333
if (empty(scc_g[u])) return u;
3434
for (int v : scc_g[u])
3535
if (!vis[v]) {

0 commit comments

Comments
 (0)