diff --git a/.verify-helper/timestamps.remote.json b/.verify-helper/timestamps.remote.json index c8cc5334a..6b1608c67 100644 --- a/.verify-helper/timestamps.remote.json +++ b/.verify-helper/timestamps.remote.json @@ -8,7 +8,7 @@ "tests/library_checker_aizu_tests/data_structures/bit.test.cpp": "2026-07-10 20:39:22 -0700", "tests/library_checker_aizu_tests/data_structures/bit_inc.test.cpp": "2026-07-10 20:39:22 -0700", "tests/library_checker_aizu_tests/data_structures/bit_inc_walk.test.cpp": "2026-07-10 20:39:22 -0700", -"tests/library_checker_aizu_tests/data_structures/bit_ordered_set.test.cpp": "2026-07-10 20:39:22 -0700", +"tests/library_checker_aizu_tests/data_structures/bit_ordered_set.test.cpp": "2026-07-12 10:56:16 -0700", "tests/library_checker_aizu_tests/data_structures/bit_rupq.test.cpp": "2026-07-10 20:39:22 -0700", "tests/library_checker_aizu_tests/data_structures/bit_rurq.test.cpp": "2026-07-10 20:39:22 -0700", "tests/library_checker_aizu_tests/data_structures/bit_walk.test.cpp": "2026-07-10 20:39:22 -0700", @@ -22,20 +22,20 @@ "tests/library_checker_aizu_tests/data_structures/distinct_query.test.cpp": "2026-07-07 10:02:09 -0700", "tests/library_checker_aizu_tests/data_structures/implicit_seg_tree.test.cpp": "2026-07-07 10:02:09 -0700", "tests/library_checker_aizu_tests/data_structures/kd_bit_1d.test.cpp": "2026-07-06 13:10:16 -0700", -"tests/library_checker_aizu_tests/data_structures/kth_smallest_pst.test.cpp": "2026-07-07 10:02:09 -0700", +"tests/library_checker_aizu_tests/data_structures/kth_smallest_pst.test.cpp": "2026-07-12 10:56:16 -0700", "tests/library_checker_aizu_tests/data_structures/kth_smallest_wavelet_matrix.test.cpp": "2026-07-07 12:06:00 -0700", "tests/library_checker_aizu_tests/data_structures/lazy_segment_tree.test.cpp": "2026-07-07 12:06:00 -0700", "tests/library_checker_aizu_tests/data_structures/lazy_segment_tree_constructor.test.cpp": "2026-07-07 12:06:00 -0700", "tests/library_checker_aizu_tests/data_structures/lazy_segment_tree_inc.test.cpp": "2026-07-06 13:10:16 -0700", "tests/library_checker_aizu_tests/data_structures/lazy_segment_tree_inc_constructor.test.cpp": "2026-07-06 13:10:16 -0700", "tests/library_checker_aizu_tests/data_structures/merge_sort_tree.test.cpp": "2026-07-06 13:10:16 -0700", -"tests/library_checker_aizu_tests/data_structures/mode_query.test.cpp": "2026-07-06 13:10:16 -0700", +"tests/library_checker_aizu_tests/data_structures/mode_query.test.cpp": "2026-07-12 10:56:16 -0700", "tests/library_checker_aizu_tests/data_structures/permutation_tree.test.cpp": "2026-07-09 23:01:31 -0500", "tests/library_checker_aizu_tests/data_structures/persistent_queue_tree.test.cpp": "2026-07-07 10:02:09 -0700", "tests/library_checker_aizu_tests/data_structures/persistent_seg_tree.test.cpp": "2026-07-07 10:02:09 -0700", "tests/library_checker_aizu_tests/data_structures/pq_ds_undo_sliding_window.test.cpp": "2026-07-06 13:10:16 -0700", "tests/library_checker_aizu_tests/data_structures/rmq_linear.test.cpp": "2026-07-06 13:10:16 -0700", -"tests/library_checker_aizu_tests/data_structures/rmq_sparse_table.test.cpp": "2026-07-09 23:01:31 -0500", +"tests/library_checker_aizu_tests/data_structures/rmq_sparse_table.test.cpp": "2026-07-12 10:56:16 -0700", "tests/library_checker_aizu_tests/data_structures/rmq_sparse_table_inc.test.cpp": "2026-07-09 23:01:31 -0500", "tests/library_checker_aizu_tests/data_structures/simple_tree.test.cpp": "2026-07-10 20:39:22 -0700", "tests/library_checker_aizu_tests/data_structures/simple_tree_inc.test.cpp": "2026-07-10 20:39:22 -0700", @@ -50,8 +50,8 @@ "tests/library_checker_aizu_tests/dsu/dsu_weighted_aizu.test.cpp": "2026-07-07 12:06:00 -0700", "tests/library_checker_aizu_tests/dsu/dsu_weighted_lib_checker.test.cpp": "2026-07-07 12:06:00 -0700", "tests/library_checker_aizu_tests/dsu/kruskal_tree_aizu.test.cpp": "2026-07-12 10:49:50 -0700", -"tests/library_checker_aizu_tests/dsu/line_tree_aizu.test.cpp": "2026-07-09 23:01:31 -0500", -"tests/library_checker_aizu_tests/dsu/line_tree_lib_checker.test.cpp": "2026-07-12 10:49:50 -0700", +"tests/library_checker_aizu_tests/dsu/line_tree_aizu.test.cpp": "2026-07-12 10:47:05 -0700", +"tests/library_checker_aizu_tests/dsu/line_tree_lib_checker.test.cpp": "2026-07-12 12:26:31 -0700", "tests/library_checker_aizu_tests/dsu/range_parallel_dsu.test.cpp": "2026-07-09 23:01:31 -0500", "tests/library_checker_aizu_tests/flow/hungarian.test.cpp": "2026-07-07 12:06:00 -0700", "tests/library_checker_aizu_tests/flow/min_cost_max_flow.test.cpp": "2026-04-06 14:41:55 -0600", @@ -60,37 +60,37 @@ "tests/library_checker_aizu_tests/graphs/bcc_callback_lib_checker_bcc.test.cpp": "2026-07-07 12:06:00 -0700", "tests/library_checker_aizu_tests/graphs/bcc_callback_lib_checker_two_cc.test.cpp": "2026-07-07 12:06:00 -0700", "tests/library_checker_aizu_tests/graphs/biconnected_components.test.cpp": "2026-07-07 12:06:00 -0700", -"tests/library_checker_aizu_tests/graphs/connected_components_of_complement_graph.test.cpp": "2026-07-07 12:06:00 -0700", +"tests/library_checker_aizu_tests/graphs/connected_components_of_complement_graph.test.cpp": "2026-07-12 10:47:05 -0700", "tests/library_checker_aizu_tests/graphs/dijkstra_aizu.test.cpp": "2026-07-08 09:28:48 -0700", "tests/library_checker_aizu_tests/graphs/dijkstra_lib_checker.test.cpp": "2026-07-08 09:28:48 -0700", -"tests/library_checker_aizu_tests/graphs/directed_cycle.test.cpp": "2026-07-07 12:06:00 -0700", +"tests/library_checker_aizu_tests/graphs/directed_cycle.test.cpp": "2026-07-12 10:47:05 -0700", "tests/library_checker_aizu_tests/graphs/enumerate_triangles.test.cpp": "2026-07-08 09:28:48 -0700", "tests/library_checker_aizu_tests/graphs/euler_walk_directed.test.cpp": "2026-07-07 12:06:00 -0700", "tests/library_checker_aizu_tests/graphs/euler_walk_undirected.test.cpp": "2026-07-07 12:06:00 -0700", "tests/library_checker_aizu_tests/graphs/hopcroft_karp_aizu.test.cpp": "2026-07-09 08:31:16 -0500", "tests/library_checker_aizu_tests/graphs/hopcroft_karp_lib_checker.test.cpp": "2026-07-09 08:31:16 -0500", -"tests/library_checker_aizu_tests/graphs/mst.test.cpp": "2026-07-06 13:09:48 -0700", -"tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp": "2026-07-07 09:27:22 -0700", -"tests/library_checker_aizu_tests/graphs/strongly_connected_components_aizu.test.cpp": "2026-07-07 12:06:00 -0700", -"tests/library_checker_aizu_tests/graphs/strongly_connected_components_lib_checker.test.cpp": "2026-07-07 12:06:00 -0700", +"tests/library_checker_aizu_tests/graphs/mst.test.cpp": "2026-07-12 10:47:05 -0700", +"tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp": "2026-07-12 10:56:16 -0700", +"tests/library_checker_aizu_tests/graphs/strongly_connected_components_aizu.test.cpp": "2026-07-12 10:47:05 -0700", +"tests/library_checker_aizu_tests/graphs/strongly_connected_components_lib_checker.test.cpp": "2026-07-12 10:47:05 -0700", "tests/library_checker_aizu_tests/graphs/two_edge_components.test.cpp": "2026-07-07 12:06:00 -0700", -"tests/library_checker_aizu_tests/handmade_tests/count_paths.test.cpp": "2026-07-09 23:01:31 -0500", +"tests/library_checker_aizu_tests/handmade_tests/count_paths.test.cpp": "2026-07-12 10:52:48 -0700", "tests/library_checker_aizu_tests/handmade_tests/dsu.test.cpp": "2026-07-07 12:06:00 -0700", -"tests/library_checker_aizu_tests/handmade_tests/edge_cd_small_trees.test.cpp": "2026-07-08 09:28:48 -0700", +"tests/library_checker_aizu_tests/handmade_tests/edge_cd_small_trees.test.cpp": "2026-07-12 10:52:48 -0700", "tests/library_checker_aizu_tests/handmade_tests/fib_matrix_expo.test.cpp": "2026-07-07 12:06:00 -0700", "tests/library_checker_aizu_tests/handmade_tests/functional_graph.test.cpp": "2026-07-07 12:06:00 -0700", "tests/library_checker_aizu_tests/handmade_tests/hilbert_mos.test.cpp": "2026-07-10 20:39:22 -0700", "tests/library_checker_aizu_tests/handmade_tests/kd_bit.test.cpp": "2026-07-07 12:06:00 -0700", "tests/library_checker_aizu_tests/handmade_tests/kth_par.test.cpp": "2026-07-10 20:39:22 -0700", -"tests/library_checker_aizu_tests/handmade_tests/manacher.test.cpp": "2026-07-12 10:49:50 -0700", +"tests/library_checker_aizu_tests/handmade_tests/manacher.test.cpp": "2026-07-12 12:26:31 -0700", "tests/library_checker_aizu_tests/handmade_tests/merge_st_and_wavelet.test.cpp": "2026-07-07 12:06:00 -0700", -"tests/library_checker_aizu_tests/handmade_tests/mobius.test.cpp": "2026-07-06 13:10:16 -0700", +"tests/library_checker_aizu_tests/handmade_tests/mobius.test.cpp": "2026-07-12 10:47:05 -0700", "tests/library_checker_aizu_tests/handmade_tests/mod_division.test.cpp": "2026-07-08 09:28:48 -0700", "tests/library_checker_aizu_tests/handmade_tests/n_choose_k.test.cpp": "2026-07-07 12:06:00 -0700", -"tests/library_checker_aizu_tests/handmade_tests/permutation_tree_small.test.cpp": "2026-07-09 23:01:31 -0500", -"tests/library_checker_aizu_tests/handmade_tests/rmq_small_n.test.cpp": "2026-07-09 23:01:31 -0500", -"tests/library_checker_aizu_tests/handmade_tests/sa_find_subarray.test.cpp": "2026-07-12 10:49:50 -0700", -"tests/library_checker_aizu_tests/handmade_tests/seg_tree_find.test.cpp": "2026-07-10 20:39:22 -0700", +"tests/library_checker_aizu_tests/handmade_tests/permutation_tree_small.test.cpp": "2026-07-12 10:56:16 -0700", +"tests/library_checker_aizu_tests/handmade_tests/rmq_small_n.test.cpp": "2026-07-12 10:56:16 -0700", +"tests/library_checker_aizu_tests/handmade_tests/sa_find_subarray.test.cpp": "2026-07-12 12:26:31 -0700", +"tests/library_checker_aizu_tests/handmade_tests/seg_tree_find.test.cpp": "2026-07-12 10:56:16 -0700", "tests/library_checker_aizu_tests/handmade_tests/seg_tree_find_small.test.cpp": "2026-07-07 12:06:00 -0700", "tests/library_checker_aizu_tests/handmade_tests/seg_tree_midpoint.test.cpp": "2026-07-07 09:17:02 -0700", "tests/library_checker_aizu_tests/handmade_tests/xor_basis_walk.test.cpp": "2026-07-07 12:06:00 -0700", @@ -106,48 +106,48 @@ "tests/library_checker_aizu_tests/math/n_choose_k.test.cpp": "2026-07-06 13:10:16 -0700", "tests/library_checker_aizu_tests/math/num_subsequences.test.cpp": "2026-07-08 09:28:48 -0700", "tests/library_checker_aizu_tests/math/partitions.test.cpp": "2026-07-08 09:28:48 -0700", -"tests/library_checker_aizu_tests/math/prime_sieve.test.cpp": "2026-07-06 13:10:16 -0700", +"tests/library_checker_aizu_tests/math/prime_sieve.test.cpp": "2026-07-12 10:47:05 -0700", "tests/library_checker_aizu_tests/math/solve_linear_mod.test.cpp": "2026-07-08 09:28:48 -0700", "tests/library_checker_aizu_tests/math/tetration.test.cpp": "2026-07-10 20:39:22 -0700", "tests/library_checker_aizu_tests/math/totient.test.cpp": "2024-11-17 14:04:03 -0600", "tests/library_checker_aizu_tests/math/xor_basis_intersection.test.cpp": "2026-07-07 12:06:00 -0700", "tests/library_checker_aizu_tests/monotonic_stack_related/cartesian_binary_tree.test.cpp": "2026-07-07 12:06:00 -0700", -"tests/library_checker_aizu_tests/monotonic_stack_related/cartesian_k_ary_tree.test.cpp": "2026-07-07 12:06:00 -0700", -"tests/library_checker_aizu_tests/monotonic_stack_related/count_rectangles.test.cpp": "2026-07-07 12:06:00 -0700", -"tests/library_checker_aizu_tests/monotonic_stack_related/max_rect_histogram.test.cpp": "2026-07-07 12:06:00 -0700", +"tests/library_checker_aizu_tests/monotonic_stack_related/cartesian_k_ary_tree.test.cpp": "2026-07-12 10:56:16 -0700", +"tests/library_checker_aizu_tests/monotonic_stack_related/count_rectangles.test.cpp": "2026-07-12 10:56:16 -0700", +"tests/library_checker_aizu_tests/monotonic_stack_related/max_rect_histogram.test.cpp": "2026-07-12 10:56:16 -0700", "tests/library_checker_aizu_tests/strings/kmp.test.cpp": "2026-07-08 09:28:48 -0700", -"tests/library_checker_aizu_tests/strings/lcp_array.test.cpp": "2026-07-12 10:49:50 -0700", -"tests/library_checker_aizu_tests/strings/lcp_query_palindrome.test.cpp": "2026-07-12 10:49:50 -0700", -"tests/library_checker_aizu_tests/strings/lcp_query_zfunc.test.cpp": "2026-07-12 10:49:50 -0700", -"tests/library_checker_aizu_tests/strings/lcs_dp.test.cpp": "2026-07-06 13:10:16 -0700", -"tests/library_checker_aizu_tests/strings/lcs_queries.test.cpp": "2026-07-10 20:39:22 -0700", -"tests/library_checker_aizu_tests/strings/lcs_queries_merge_sort_tree.test.cpp": "2026-07-06 13:10:16 -0700", +"tests/library_checker_aizu_tests/strings/lcp_array.test.cpp": "2026-07-12 12:26:31 -0700", +"tests/library_checker_aizu_tests/strings/lcp_query_palindrome.test.cpp": "2026-07-12 12:26:31 -0700", +"tests/library_checker_aizu_tests/strings/lcp_query_zfunc.test.cpp": "2026-07-12 12:26:31 -0700", +"tests/library_checker_aizu_tests/strings/lcs_dp.test.cpp": "2026-07-12 10:47:05 -0700", +"tests/library_checker_aizu_tests/strings/lcs_queries.test.cpp": "2026-07-12 10:47:05 -0700", +"tests/library_checker_aizu_tests/strings/lcs_queries_merge_sort_tree.test.cpp": "2026-07-12 10:47:05 -0700", "tests/library_checker_aizu_tests/strings/manacher.test.cpp": "2026-07-12 10:49:50 -0700", -"tests/library_checker_aizu_tests/strings/multi_matching_bs.test.cpp": "2026-07-12 10:49:50 -0700", +"tests/library_checker_aizu_tests/strings/multi_matching_bs.test.cpp": "2026-07-12 12:26:31 -0700", "tests/library_checker_aizu_tests/strings/prefix_function.test.cpp": "2026-07-06 13:10:16 -0700", -"tests/library_checker_aizu_tests/strings/sa_cmp.test.cpp": "2026-07-12 10:49:50 -0700", -"tests/library_checker_aizu_tests/strings/sa_sort_pairs.test.cpp": "2026-07-12 10:49:50 -0700", -"tests/library_checker_aizu_tests/strings/single_matching_bs.test.cpp": "2026-07-12 10:49:50 -0700", -"tests/library_checker_aizu_tests/strings/suffix_array.test.cpp": "2026-07-12 10:49:50 -0700", -"tests/library_checker_aizu_tests/strings/suffix_array_short.test.cpp": "2026-07-12 10:49:50 -0700", +"tests/library_checker_aizu_tests/strings/sa_cmp.test.cpp": "2026-07-12 12:26:31 -0700", +"tests/library_checker_aizu_tests/strings/sa_sort_pairs.test.cpp": "2026-07-12 12:26:31 -0700", +"tests/library_checker_aizu_tests/strings/single_matching_bs.test.cpp": "2026-07-12 12:26:31 -0700", +"tests/library_checker_aizu_tests/strings/suffix_array.test.cpp": "2026-07-12 12:26:31 -0700", +"tests/library_checker_aizu_tests/strings/suffix_array_short.test.cpp": "2026-07-12 12:26:31 -0700", "tests/library_checker_aizu_tests/strings/trie.test.cpp": "2026-07-06 13:10:16 -0700", "tests/library_checker_aizu_tests/strings/wildcard_pattern_matching.test.cpp": "2026-07-07 12:06:00 -0700", "tests/library_checker_aizu_tests/trees/cd_count_paths_per_length.test.cpp": "2026-07-08 09:28:48 -0700", -"tests/library_checker_aizu_tests/trees/edge_cd_contour_range_query.test.cpp": "2026-07-10 20:39:22 -0700", -"tests/library_checker_aizu_tests/trees/edge_cd_contour_range_update.test.cpp": "2026-07-10 20:39:22 -0700", -"tests/library_checker_aizu_tests/trees/edge_cd_count_paths_per_length.test.cpp": "2026-07-08 09:28:48 -0700", -"tests/library_checker_aizu_tests/trees/edge_cd_reroot_dp.test.cpp": "2026-07-08 09:28:48 -0700", +"tests/library_checker_aizu_tests/trees/edge_cd_contour_range_query.test.cpp": "2026-07-12 10:52:48 -0700", +"tests/library_checker_aizu_tests/trees/edge_cd_contour_range_update.test.cpp": "2026-07-12 10:52:48 -0700", +"tests/library_checker_aizu_tests/trees/edge_cd_count_paths_per_length.test.cpp": "2026-07-12 10:52:48 -0700", +"tests/library_checker_aizu_tests/trees/edge_cd_reroot_dp.test.cpp": "2026-07-12 10:52:48 -0700", "tests/library_checker_aizu_tests/trees/hld_aizu1.test.cpp": "2026-07-10 20:39:22 -0700", "tests/library_checker_aizu_tests/trees/hld_aizu2.test.cpp": "2026-07-08 22:13:09 -0500", "tests/library_checker_aizu_tests/trees/hld_lib_checker_path.test.cpp": "2026-07-10 20:39:22 -0700", "tests/library_checker_aizu_tests/trees/hld_lib_checker_subtree_edges.test.cpp": "2026-07-10 20:39:22 -0700", "tests/library_checker_aizu_tests/trees/hld_lib_checker_subtree_nodes.test.cpp": "2026-07-10 20:39:22 -0700", -"tests/library_checker_aizu_tests/trees/kth_path_hagerup.test.cpp": "2026-07-09 23:01:31 -0500", +"tests/library_checker_aizu_tests/trees/kth_path_hagerup.test.cpp": "2026-07-12 10:52:48 -0700", "tests/library_checker_aizu_tests/trees/kth_path_ladder.test.cpp": "2026-07-09 23:01:31 -0500", "tests/library_checker_aizu_tests/trees/kth_path_linear.test.cpp": "2026-07-10 20:39:22 -0700", -"tests/library_checker_aizu_tests/trees/kth_path_tree_lift.test.cpp": "2026-07-09 23:01:31 -0500", -"tests/library_checker_aizu_tests/trees/lca_all_methods_aizu.test.cpp": "2026-07-09 23:01:31 -0500", -"tests/library_checker_aizu_tests/trees/lca_all_methods_lib_checker.test.cpp": "2026-07-09 23:01:31 -0500", +"tests/library_checker_aizu_tests/trees/kth_path_tree_lift.test.cpp": "2026-07-12 10:52:48 -0700", +"tests/library_checker_aizu_tests/trees/lca_all_methods_aizu.test.cpp": "2026-07-12 10:52:48 -0700", +"tests/library_checker_aizu_tests/trees/lca_all_methods_lib_checker.test.cpp": "2026-07-12 10:52:48 -0700", "tests/library_checker_aizu_tests/trees/shallowest_aizu_tree_height.test.cpp": "2026-07-07 09:27:22 -0700", "tests/library_checker_aizu_tests/trees/shallowest_lib_checker_tree_path_composite.test.cpp": "2026-07-07 09:27:22 -0700", "tests/library_checker_aizu_tests/trees/subtree_isomorphism.test.cpp": "2026-07-07 09:27:22 -0700" diff --git a/library/dsu/line_tree.hpp b/library/dsu/line_tree.hpp index 17b64c0af..9358c3cd6 100644 --- a/library/dsu/line_tree.hpp +++ b/library/dsu/line_tree.hpp @@ -20,7 +20,7 @@ struct line_tree { vi p, last; vector edge; line_tree(int n): p(n, -1), last(n), edge(n, {-1, -1}) { - iota(all(last), 0); + ranges::iota(last, 0); } int size(int u) { return -p[f(u)]; } int f(int u) { return p[u] < 0 ? u : p[u] = f(p[u]); } diff --git a/library/graphs/mst.hpp b/library/graphs/mst.hpp index 0e6ea8344..a8a669cbc 100644 --- a/library/graphs/mst.hpp +++ b/library/graphs/mst.hpp @@ -10,7 +10,7 @@ pair mst(const vector>& w_eds, int n) { vi order(sz(w_eds)); - iota(all(order), 0); + ranges::iota(order, 0); ranges::sort(order, {}, [&](int i) { return w_eds[i][2]; }); DSU dsu(n); diff --git a/library/graphs/strongly_connected_components/offline_incremental_scc.hpp b/library/graphs/strongly_connected_components/offline_incremental_scc.hpp index 10a63390c..e4dd62510 100644 --- a/library/graphs/strongly_connected_components/offline_incremental_scc.hpp +++ b/library/graphs/strongly_connected_components/offline_incremental_scc.hpp @@ -14,7 +14,7 @@ vi offline_incremental_scc(vector> eds, int n) { int m = sz(eds); vi ids(n, -1), joins(m, m), idx(m), vs(n), scc_id; - iota(all(idx), 0); + ranges::iota(idx, 0); vector g; auto dnc = [&](this auto&& dnc, auto el, auto er, int tl, int tr) { diff --git a/library/graphs/uncommon/complement_graph_ccs.hpp b/library/graphs/uncommon/complement_graph_ccs.hpp index 0da0f6c72..18ebc9ef4 100644 --- a/library/graphs/uncommon/complement_graph_ccs.hpp +++ b/library/graphs/uncommon/complement_graph_ccs.hpp @@ -12,7 +12,7 @@ vi get_complement_graph_ccs(const auto& g) { int n = sz(g); vi cc_id(n), unseen(n); - iota(all(unseen), 0); + ranges::iota(unseen, 0); vector is_g(n); for (int cnt = 0; !empty(unseen); cnt++) { int s = unseen.back(); diff --git a/library/math/prime_sieve/calc_linear_sieve.hpp b/library/math/prime_sieve/calc_linear_sieve.hpp index 0104524c4..863e6f445 100644 --- a/library/math/prime_sieve/calc_linear_sieve.hpp +++ b/library/math/prime_sieve/calc_linear_sieve.hpp @@ -2,7 +2,7 @@ //! @time O(mx) //! @space O(mx) vi primes, sieve(1001); //!< min prime factor -iota(all(sieve), 0); +ranges::iota(sieve, 0); rep(i, 2, sz(sieve)) { if (sieve[i] == i) primes.push_back(i); for (int prime : primes) { diff --git a/library/math/prime_sieve/calc_sieve.hpp b/library/math/prime_sieve/calc_sieve.hpp index 3fcbc1b01..4f2023b71 100644 --- a/library/math/prime_sieve/calc_sieve.hpp +++ b/library/math/prime_sieve/calc_sieve.hpp @@ -2,7 +2,7 @@ //! @time O(mx * log(log mx)) //! @space O(mx) vi sieve(1001); //!< min prime factor -iota(all(sieve), 0); +ranges::iota(sieve, 0); for (int i = 2; i * i < sz(sieve); i++) if (sieve[i] == i) for (int j = i * i; j < sz(sieve); j += i) diff --git a/library/strings/longest_common_subsequence/lcs_dp.hpp b/library/strings/longest_common_subsequence/lcs_dp.hpp index 3fe997236..1892c7092 100644 --- a/library/strings/longest_common_subsequence/lcs_dp.hpp +++ b/library/strings/longest_common_subsequence/lcs_dp.hpp @@ -10,7 +10,7 @@ template struct lcs_dp { T t; vi dp; - lcs_dp(const T& t): t(t), dp(sz(t)) { iota(all(dp), 0); } + lcs_dp(const T& t): t(t), dp(sz(t)) { ranges::iota(dp, 0); } void push_onto_s(int c) { int v = -1; rep(i, 0, sz(t)) if (c == t[i] || dp[i] < v) diff --git a/library/strings/manacher/longest_palindrome_query.hpp b/library/strings/manacher/longest_palindrome_query.hpp index 499619d4f..fcfc6514c 100644 --- a/library/strings/manacher/longest_palindrome_query.hpp +++ b/library/strings/manacher/longest_palindrome_query.hpp @@ -11,7 +11,7 @@ struct longest_pal_query { //! @space O(n log n) for rmq, everything else is O(n) longest_pal_query(const auto& s): man(manacher(s)) { vi init(sz(man)); - iota(all(init), 0); + ranges::iota(init, 0); rmq = {init, [&](int i1, int i2) { return len(i1) < len(i2) ? i2 : i1; }}; diff --git a/library/strings/suffix_array/suffix_array.hpp b/library/strings/suffix_array/suffix_array.hpp index 93b4b67e5..3c74bd7b6 100644 --- a/library/strings/suffix_array/suffix_array.hpp +++ b/library/strings/suffix_array/suffix_array.hpp @@ -38,10 +38,10 @@ auto get_sa(const auto& s, int max_num) { int n = sz(s); vi sa(n), sa_inv(all(s)), lcp(n - 1); - iota(all(sa), 0); + ranges::iota(sa, 0); for (int i = 0; i < n; i = max(1, 2 * i)) { vi y(sa_inv), freq(max_num); - iota(all(sa_inv), n - i); + ranges::iota(sa_inv, n - i); ranges::copy_if(sa, begin(sa_inv) + i, [&](int& x) { return (x -= i) >= 0; }); for (int x : y) freq[x]++; diff --git a/library/strings/suffix_array/suffix_array_short.hpp b/library/strings/suffix_array/suffix_array_short.hpp index 942c636c2..8f84007c5 100644 --- a/library/strings/suffix_array/suffix_array_short.hpp +++ b/library/strings/suffix_array/suffix_array_short.hpp @@ -14,7 +14,7 @@ auto sa_short(const auto& s) { int n = sz(s), b = 6; vi sa(n), sa_inv(all(s)), lcp(n - 1), t(n); - iota(all(sa), 0); + ranges::iota(sa, 0); for (int j = 1; j <= n; j *= b) { swap(t, sa_inv); auto cmp = [&](int i1, int i2) { diff --git a/library/trees/edge_cd.hpp b/library/trees/edge_cd.hpp index 496520209..d175ea0df 100644 --- a/library/trees/edge_cd.hpp +++ b/library/trees/edge_cd.hpp @@ -30,10 +30,10 @@ template void edge_cd(vector& g, auto f) { if (m < 2) return; u = ctd(u, u, m); int sum = 0; - auto it = partition(all(g[u]), [&](int v) { + auto it = begin(ranges::partition(g[u], [&](int v) { ll x = sum + s[v]; return x * x < m * (m - x) ? sum = x : 0; - }); + })); f(u, it - begin(g[u])); G oth(it, end(g[u])); g[u].erase(it, end(g[u])); diff --git a/library/trees/extra_members/virtual_tree.hpp b/library/trees/extra_members/virtual_tree.hpp index 824ac32b9..dfbd3d9f8 100644 --- a/library/trees/extra_members/virtual_tree.hpp +++ b/library/trees/extra_members/virtual_tree.hpp @@ -16,7 +16,7 @@ array compress_tree(vi subset) { rep(i, 1, len) subset.push_back(lca(subset[i - 1], subset[i])); ranges::sort(subset, {}, proj); - subset.erase(unique(all(subset)), end(subset)); + subset.erase(begin(ranges::unique(subset)), end(subset)); return { mono_st(subset, [&](int u, int v) { return in_subtree(u, v); }), diff --git a/tests/library_checker_aizu_tests/data_structures/bit_ordered_set.test.cpp b/tests/library_checker_aizu_tests/data_structures/bit_ordered_set.test.cpp index cf43717ea..0f5ee3797 100644 --- a/tests/library_checker_aizu_tests/data_structures/bit_ordered_set.test.cpp +++ b/tests/library_checker_aizu_tests/data_structures/bit_ordered_set.test.cpp @@ -17,7 +17,7 @@ int main() { compress.push_back(x); } ranges::sort(compress); - compress.erase(unique(all(compress)), end(compress)); + compress.erase(begin(ranges::unique(compress)), end(compress)); BIT bit(sz(compress)); auto get_compressed_idx = [&](int val) -> int { int l = 0, r = sz(compress); diff --git a/tests/library_checker_aizu_tests/data_structures/kth_smallest_pst.test.cpp b/tests/library_checker_aizu_tests/data_structures/kth_smallest_pst.test.cpp index e6e4353de..10fdb7aab 100644 --- a/tests/library_checker_aizu_tests/data_structures/kth_smallest_pst.test.cpp +++ b/tests/library_checker_aizu_tests/data_structures/kth_smallest_pst.test.cpp @@ -10,7 +10,7 @@ int main() { rep(i, 0, n) cin >> arr[i]; vi sorted(arr); ranges::sort(sorted); - sorted.erase(unique(all(sorted)), end(sorted)); + sorted.erase(begin(ranges::unique(sorted)), end(sorted)); for (int& val : arr) { int start = 0, end = sz(sorted); while (start + 1 < end) { diff --git a/tests/library_checker_aizu_tests/data_structures/mode_query.test.cpp b/tests/library_checker_aizu_tests/data_structures/mode_query.test.cpp index 4111a06c3..de0edb0cb 100644 --- a/tests/library_checker_aizu_tests/data_structures/mode_query.test.cpp +++ b/tests/library_checker_aizu_tests/data_structures/mode_query.test.cpp @@ -10,7 +10,7 @@ int main() { rep(i, 0, n) cin >> a[i]; vi comp(a); ranges::sort(comp); - comp.erase(unique(all(comp)), end(comp)); + comp.erase(begin(ranges::unique(comp)), end(comp)); for (int& val : a) { int start = 0, end = sz(comp); while (start + 1 < end) { diff --git a/tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp b/tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp index 3ab22751f..5ca50a4cc 100644 --- a/tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp +++ b/tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp @@ -17,7 +17,7 @@ int main() { rep(t, 0, m) assert((eds[t][0] == eds[t][1]) == (joins[t] == -1)); vi order(m); - iota(all(order), 0); + ranges::iota(order, 0); ranges::sort(order, {}, [&](int i) { return joins[i]; }); DSU dsu(n); int sum = 0; diff --git a/tests/library_checker_aizu_tests/handmade_tests/permutation_tree_small.test.cpp b/tests/library_checker_aizu_tests/handmade_tests/permutation_tree_small.test.cpp index bbbf327e2..a086b7c4b 100644 --- a/tests/library_checker_aizu_tests/handmade_tests/permutation_tree_small.test.cpp +++ b/tests/library_checker_aizu_tests/handmade_tests/permutation_tree_small.test.cpp @@ -7,10 +7,10 @@ int main() { cin.tie(0)->sync_with_stdio(0); for (int n = 1; n <= 8; n++) { vi a(n); - iota(all(a), 0); + ranges::iota(a, 0); do { perm_tree pt = perm_tree_asserts(a); - } while (next_permutation(all(a))); + } while (ranges::next_permutation(a).found); } cout << "Hello World\n"; return 0; diff --git a/tests/library_checker_aizu_tests/handmade_tests/rmq_small_n.test.cpp b/tests/library_checker_aizu_tests/handmade_tests/rmq_small_n.test.cpp index d84f14901..48c84ae01 100644 --- a/tests/library_checker_aizu_tests/handmade_tests/rmq_small_n.test.cpp +++ b/tests/library_checker_aizu_tests/handmade_tests/rmq_small_n.test.cpp @@ -20,10 +20,10 @@ int main() { cin.tie(0)->sync_with_stdio(0); for (int n = 1; n <= 8; n++) { vi perm(n); - iota(all(perm), 0); + ranges::iota(perm, 0); do { test_all_subarrays(perm); - } while (next_permutation(all(perm))); + } while (ranges::next_permutation(perm).found); } for (int n = 1; n <= 100; n++) { rep(times, 0, 40) { diff --git a/tests/library_checker_aizu_tests/handmade_tests/seg_tree_find.test.cpp b/tests/library_checker_aizu_tests/handmade_tests/seg_tree_find.test.cpp index 67eec1ce4..b84b7654b 100644 --- a/tests/library_checker_aizu_tests/handmade_tests/seg_tree_find.test.cpp +++ b/tests/library_checker_aizu_tests/handmade_tests/seg_tree_find.test.cpp @@ -51,7 +51,7 @@ int main() { else assert(cur_le == prv_ri); } ranges::sort(rngs); - assert(unique(all(rngs)) == end(rngs)); + assert(begin(ranges::unique(rngs)) == end(rngs)); reset(); assert( pos == rv(rev.find_last(rv(r - 1), rv(l) + 1, f))); @@ -67,7 +67,7 @@ int main() { else assert(prv_le == cur_ri); } ranges::sort(rngs); - assert(unique(all(rngs)) == end(rngs)); + assert(begin(ranges::unique(rngs)) == end(rngs)); } cout << "Hello World\n"; return 0; diff --git a/tests/library_checker_aizu_tests/mono_st_asserts.hpp b/tests/library_checker_aizu_tests/mono_st_asserts.hpp index aa5ad61dc..ff05e1e3c 100644 --- a/tests/library_checker_aizu_tests/mono_st_asserts.hpp +++ b/tests/library_checker_aizu_tests/mono_st_asserts.hpp @@ -11,7 +11,7 @@ tuple, vi> min_cartesian_tree(const vi& a, return r[i] == n || a[r[i]] < a[i]; }; vi to_min(n); - iota(all(to_min), 0); + ranges::iota(to_min, 0); for (int i = n - 1; i >= 0; i--) if (!is_node(i)) to_min[i] = to_min[r[i]]; vector adj(n); diff --git a/tests/library_checker_aizu_tests/strings/sa_sort_pairs.test.cpp b/tests/library_checker_aizu_tests/strings/sa_sort_pairs.test.cpp index 059f861d3..7a9a3ba53 100644 --- a/tests/library_checker_aizu_tests/strings/sa_sort_pairs.test.cpp +++ b/tests/library_checker_aizu_tests/strings/sa_sort_pairs.test.cpp @@ -10,7 +10,7 @@ int main() { for (int& x : arr) cin >> x; vi compress(arr); ranges::sort(compress); - compress.erase(unique(all(compress)), end(compress)); + compress.erase(begin(ranges::unique(compress)), end(compress)); for (int& x : arr) { int l = -1, r = int(sz(compress)); while (r - l > 1) { @@ -24,7 +24,7 @@ int main() { auto [sa, sa_inv, lcp] = get_sa(arr, int(sz(compress))); sa_query lq(arr, sa, sa_inv, lcp); vi idxs(n); - iota(all(idxs), 0); + ranges::iota(idxs, 0); ranges::sort(idxs, [&](int i, int j) -> bool { return lq.cmp_substrs(2 * i, 2 * (i + 1), 2 * j, 2 * (j + 1)) < 0; diff --git a/tests/library_checker_aizu_tests/strings/single_matching_bs.test.cpp b/tests/library_checker_aizu_tests/strings/single_matching_bs.test.cpp index 9bbc2e9ac..df6ca928e 100644 --- a/tests/library_checker_aizu_tests/strings/single_matching_bs.test.cpp +++ b/tests/library_checker_aizu_tests/strings/single_matching_bs.test.cpp @@ -70,8 +70,8 @@ int main() { vi matches_other(begin(lq_both.sa) + sa_le2, begin(lq_both.sa) + sa_ri2); matches_other.erase( - remove_if(all(matches_other), - [&](int val) { return val >= sz(s) + 1; }), + begin(ranges::remove_if(matches_other, + [&](int val) { return val >= sz(s) + 1; })), end(matches_other)); ranges::sort(matches_other); assert(matches == matches_other);