diff --git a/.verify-helper/timestamps.remote.json b/.verify-helper/timestamps.remote.json deleted file mode 100644 index 7ddafad0..00000000 --- a/.verify-helper/timestamps.remote.json +++ /dev/null @@ -1,141 +0,0 @@ -{ -"tests/library_checker_aizu_tests/convolution/gcd_convolution.test.cpp": "2025-06-25 15:06:18 -0600", -"tests/library_checker_aizu_tests/convolution/lcm_convolution.test.cpp": "2025-06-25 15:06:18 -0600", -"tests/library_checker_aizu_tests/convolution/min_plus_convolution.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/data_structures/binary_search_example.test.cpp": "2024-11-18 10:51:39 -0600", -"tests/library_checker_aizu_tests/data_structures/binary_trie.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/data_structures/bit.test.cpp": "2024-12-14 19:50:29 -0600", -"tests/library_checker_aizu_tests/data_structures/bit_inc.test.cpp": "2024-11-18 09:44:22 -0600", -"tests/library_checker_aizu_tests/data_structures/bit_ordered_set.test.cpp": "2024-12-15 14:34:10 -0600", -"tests/library_checker_aizu_tests/data_structures/bit_rupq.test.cpp": "2024-12-05 10:41:42 -0600", -"tests/library_checker_aizu_tests/data_structures/bit_rurq.test.cpp": "2024-12-05 10:41:42 -0600", -"tests/library_checker_aizu_tests/data_structures/bit_walk.test.cpp": "2024-12-14 19:50:29 -0600", -"tests/library_checker_aizu_tests/data_structures/deque.test.cpp": "2025-06-23 03:43:10 -0600", -"tests/library_checker_aizu_tests/data_structures/deque_op.test.cpp": "2025-06-23 03:43:10 -0600", -"tests/library_checker_aizu_tests/data_structures/deque_sliding_window.test.cpp": "2025-06-23 03:43:10 -0600", -"tests/library_checker_aizu_tests/data_structures/disjoint_rmq_inc.test.cpp": "2024-12-14 15:47:13 -0600", -"tests/library_checker_aizu_tests/data_structures/disjoint_rmq_inc_lines.test.cpp": "2024-12-14 15:47:13 -0600", -"tests/library_checker_aizu_tests/data_structures/disjoint_rmq_lines.test.cpp": "2024-12-14 15:47:13 -0600", -"tests/library_checker_aizu_tests/data_structures/disjoint_rmq_sum.test.cpp": "2024-12-14 15:47:13 -0600", -"tests/library_checker_aizu_tests/data_structures/distinct_query.test.cpp": "2024-12-05 10:41:42 -0600", -"tests/library_checker_aizu_tests/data_structures/dsu_bipartite.test.cpp": "2024-12-14 19:50:29 -0600", -"tests/library_checker_aizu_tests/data_structures/dsu_restorable.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/data_structures/dsu_segtree_undo_trick.test.cpp": "2024-12-14 19:50:29 -0600", -"tests/library_checker_aizu_tests/data_structures/implicit_seg_tree.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/data_structures/kruskal_tree_aizu.test.cpp": "2025-02-10 23:30:47 -0700", -"tests/library_checker_aizu_tests/data_structures/kth_smallest_pst.test.cpp": "2024-12-05 10:41:42 -0600", -"tests/library_checker_aizu_tests/data_structures/kth_smallest_wavelet_matrix.test.cpp": "2025-07-10 12:34:21 -0600", -"tests/library_checker_aizu_tests/data_structures/lazy_segment_tree.test.cpp": "2024-12-14 19:50:29 -0600", -"tests/library_checker_aizu_tests/data_structures/lazy_segment_tree_constructor.test.cpp": "2024-12-14 19:50:29 -0600", -"tests/library_checker_aizu_tests/data_structures/lazy_segment_tree_inc.test.cpp": "2024-12-05 10:41:42 -0600", -"tests/library_checker_aizu_tests/data_structures/lazy_segment_tree_inc_constructor.test.cpp": "2024-12-05 10:41:42 -0600", -"tests/library_checker_aizu_tests/data_structures/line_tree_aizu.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/data_structures/line_tree_lib_checker.test.cpp": "2025-02-10 23:30:47 -0700", -"tests/library_checker_aizu_tests/data_structures/merge_sort_tree.test.cpp": "2025-02-11 13:53:30 -0700", -"tests/library_checker_aizu_tests/data_structures/mode_query.test.cpp": "2025-02-10 23:30:47 -0700", -"tests/library_checker_aizu_tests/data_structures/permutation_tree.test.cpp": "2025-08-03 19:04:03 -0600", -"tests/library_checker_aizu_tests/data_structures/persistent_queue_tree.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/data_structures/persistent_seg_tree.test.cpp": "2024-12-05 10:41:42 -0600", -"tests/library_checker_aizu_tests/data_structures/pq_ds_undo_sliding_window.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/data_structures/pq_ds_undo_with_dsu.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/data_structures/range_parallel_dsu.test.cpp": "2025-02-10 23:30:47 -0700", -"tests/library_checker_aizu_tests/data_structures/rmq_disjoint_sparse_table.test.cpp": "2024-12-15 14:34:10 -0600", -"tests/library_checker_aizu_tests/data_structures/rmq_linear.test.cpp": "2025-08-03 19:04:03 -0600", -"tests/library_checker_aizu_tests/data_structures/rmq_sparse_table.test.cpp": "2025-08-03 19:04:03 -0600", -"tests/library_checker_aizu_tests/data_structures/rmq_sparse_table_inc.test.cpp": "2024-12-15 14:34:10 -0600", -"tests/library_checker_aizu_tests/data_structures/simple_tree.test.cpp": "2024-12-14 15:47:13 -0600", -"tests/library_checker_aizu_tests/data_structures/simple_tree_inc.test.cpp": "2024-12-21 00:23:10 -0500", -"tests/library_checker_aizu_tests/data_structures/simple_tree_inc_line.test.cpp": "2024-12-21 00:23:10 -0500", -"tests/library_checker_aizu_tests/data_structures/simple_tree_line.test.cpp": "2024-12-14 15:47:13 -0600", -"tests/library_checker_aizu_tests/flow/dinic_aizu.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/flow/hungarian.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/flow/min_cost_max_flow.test.cpp": "2024-12-05 10:41:42 -0600", -"tests/library_checker_aizu_tests/graphs/bcc_callback_aizu_bcc.test.cpp": "2025-07-08 19:09:51 -0600", -"tests/library_checker_aizu_tests/graphs/bcc_callback_aizu_two_edge_cc.test.cpp": "2025-07-08 19:09:51 -0600", -"tests/library_checker_aizu_tests/graphs/bcc_callback_lib_checker_bcc.test.cpp": "2025-07-08 19:09:51 -0600", -"tests/library_checker_aizu_tests/graphs/bcc_callback_lib_checker_two_cc.test.cpp": "2025-07-08 19:09:51 -0600", -"tests/library_checker_aizu_tests/graphs/biconnected_components.test.cpp": "2025-02-10 23:30:47 -0700", -"tests/library_checker_aizu_tests/graphs/connected_components_of_complement_graph.test.cpp": "2024-12-14 19:50:29 -0600", -"tests/library_checker_aizu_tests/graphs/dijkstra_aizu.test.cpp": "2024-12-14 19:50:29 -0600", -"tests/library_checker_aizu_tests/graphs/dijkstra_lib_checker.test.cpp": "2024-12-14 19:50:29 -0600", -"tests/library_checker_aizu_tests/graphs/directed_cycle.test.cpp": "2025-02-10 23:30:47 -0700", -"tests/library_checker_aizu_tests/graphs/enumerate_triangles.test.cpp": "2025-02-10 23:30:47 -0700", -"tests/library_checker_aizu_tests/graphs/hopcroft_karp_aizu.test.cpp": "2025-02-10 23:30:47 -0700", -"tests/library_checker_aizu_tests/graphs/hopcroft_karp_lib_checker.test.cpp": "2025-02-10 23:30:47 -0700", -"tests/library_checker_aizu_tests/graphs/mst.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/graphs/offline_incremental_scc.test.cpp": "2025-02-10 23:30:47 -0700", -"tests/library_checker_aizu_tests/graphs/strongly_connected_components_aizu.test.cpp": "2025-02-10 23:30:47 -0700", -"tests/library_checker_aizu_tests/graphs/strongly_connected_components_lib_checker.test.cpp": "2025-02-10 23:30:47 -0700", -"tests/library_checker_aizu_tests/graphs/two_edge_components.test.cpp": "2025-02-10 23:30:47 -0700", -"tests/library_checker_aizu_tests/handmade_tests/count_paths_forest.test.cpp": "2025-04-27 21:47:37 -0600", -"tests/library_checker_aizu_tests/handmade_tests/dsu_size.test.cpp": "2024-12-14 19:50:29 -0600", -"tests/library_checker_aizu_tests/handmade_tests/edge_cd_small_trees.test.cpp": "2025-04-27 21:47:37 -0600", -"tests/library_checker_aizu_tests/handmade_tests/fib_matrix_expo.test.cpp": "2024-12-14 19:50:29 -0600", -"tests/library_checker_aizu_tests/handmade_tests/functional_graph.test.cpp": "2025-07-08 19:28:25 -0600", -"tests/library_checker_aizu_tests/handmade_tests/lca_ladder_forest.test.cpp": "2025-08-03 23:07:33 -0600", -"tests/library_checker_aizu_tests/handmade_tests/manacher.test.cpp": "2024-12-14 19:50:29 -0600", -"tests/library_checker_aizu_tests/handmade_tests/merge_st_and_wavelet.test.cpp": "2025-07-10 12:34:21 -0600", -"tests/library_checker_aizu_tests/handmade_tests/mobius.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/handmade_tests/mod_int.test.cpp": "2024-12-14 19:50:29 -0600", -"tests/library_checker_aizu_tests/handmade_tests/n_choose_k.test.cpp": "2025-01-15 00:22:31 -0700", -"tests/library_checker_aizu_tests/handmade_tests/permutation_tree_small.test.cpp": "2025-08-03 19:04:03 -0600", -"tests/library_checker_aizu_tests/handmade_tests/rmq_small_n.test.cpp": "2025-08-03 19:04:03 -0600", -"tests/library_checker_aizu_tests/handmade_tests/sa_find_subarray.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/handmade_tests/seg_tree_find.test.cpp": "2024-12-14 19:50:29 -0600", -"tests/library_checker_aizu_tests/handmade_tests/seg_tree_find_small.test.cpp": "2024-12-14 19:50:29 -0600", -"tests/library_checker_aizu_tests/loops/chooses.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/loops/quotients.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/loops/submasks.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/loops/supermasks.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/math/binary_exponentiation_mod.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/math/binary_matrix_mult.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/math/count_paths.test.cpp": "2025-01-15 00:22:31 -0700", -"tests/library_checker_aizu_tests/math/derangement.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/math/matrix_determinant.test.cpp": "2024-12-14 15:47:13 -0600", -"tests/library_checker_aizu_tests/math/matrix_mult.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/math/mod_int_derangement.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/math/mod_int_gcd_convolution.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/math/mod_int_n_choose_k.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/math/mod_int_tetration.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/math/n_choose_k.test.cpp": "2025-01-15 00:22:31 -0700", -"tests/library_checker_aizu_tests/math/num_subsequences.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/math/partitions.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/math/prime_sieve.test.cpp": "2024-11-22 11:54:52 -0600", -"tests/library_checker_aizu_tests/math/solve_linear_mod.test.cpp": "2024-12-14 15:47:13 -0600", -"tests/library_checker_aizu_tests/math/tetration.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/math/totient.test.cpp": "2024-11-17 14:04:03 -0600", -"tests/library_checker_aizu_tests/math/xor_basis.test.cpp": "2025-04-22 21:37:22 -0500", -"tests/library_checker_aizu_tests/math/xor_basis_intersection.test.cpp": "2025-02-10 23:30:47 -0700", -"tests/library_checker_aizu_tests/monotonic_stack_related/cartesian_binary_tree.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/monotonic_stack_related/cartesian_k_ary_tree.test.cpp": "2025-08-03 19:04:03 -0600", -"tests/library_checker_aizu_tests/monotonic_stack_related/count_rectangles.test.cpp": "2025-08-03 19:04:03 -0600", -"tests/library_checker_aizu_tests/monotonic_stack_related/max_rect_histogram.test.cpp": "2025-08-03 19:04:03 -0600", -"tests/library_checker_aizu_tests/strings/kmp.test.cpp": "2024-12-14 19:50:29 -0600", -"tests/library_checker_aizu_tests/strings/lcp_array.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/strings/lcp_query_palindrome.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/strings/lcp_query_zfunc.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/strings/lcs_dp.test.cpp": "2024-12-05 10:41:42 -0600", -"tests/library_checker_aizu_tests/strings/lcs_queries.test.cpp": "2025-02-10 23:30:47 -0700", -"tests/library_checker_aizu_tests/strings/lcs_queries_merge_sort_tree.test.cpp": "2025-02-11 13:53:30 -0700", -"tests/library_checker_aizu_tests/strings/manacher.test.cpp": "2024-12-14 19:50:29 -0600", -"tests/library_checker_aizu_tests/strings/multi_matching_bs.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/strings/prefix_function.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/strings/sa_cmp.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/strings/sa_sort_pairs.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/strings/single_matching_bs.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/strings/suffix_array.test.cpp": "2025-08-03 19:04:03 -0600", -"tests/library_checker_aizu_tests/strings/suffix_array_short.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/strings/trie.test.cpp": "2024-12-05 10:41:42 -0600", -"tests/library_checker_aizu_tests/strings/wildcard_pattern_matching.test.cpp": "2024-12-14 19:50:29 -0600", -"tests/library_checker_aizu_tests/trees/count_paths_per_length.test.cpp": "2025-04-27 21:47:37 -0600", -"tests/library_checker_aizu_tests/trees/edge_cd_contour_range_query.test.cpp": "2025-04-27 21:47:37 -0600", -"tests/library_checker_aizu_tests/trees/edge_cd_contour_range_update.test.cpp": "2025-04-27 21:47:37 -0600", -"tests/library_checker_aizu_tests/trees/edge_cd_count_paths_per_length.test.cpp": "2025-04-27 21:47:37 -0600", -"tests/library_checker_aizu_tests/trees/edge_cd_reroot_dp.test.cpp": "2025-04-27 21:47:37 -0600", -"tests/library_checker_aizu_tests/trees/kth_path_ladder.test.cpp": "2025-02-10 23:30:47 -0700", -"tests/library_checker_aizu_tests/trees/kth_path_linear.test.cpp": "2025-08-03 23:07:33 -0600", -"tests/library_checker_aizu_tests/trees/kth_path_tree_lift.test.cpp": "2025-02-10 14:50:36 -0700", -"tests/library_checker_aizu_tests/trees/lca_all_methods_aizu.test.cpp": "2025-08-03 23:07:33 -0600", -"tests/library_checker_aizu_tests/trees/lca_all_methods_lib_checker.test.cpp": "2025-08-03 23:07:33 -0600", -"tests/library_checker_aizu_tests/trees/subtree_isomorphism.test.cpp": "2024-12-15 14:34:10 -0600" -} \ No newline at end of file diff --git a/library/data_structures/dsu/kruskal_tree.hpp b/library/data_structures/dsu/kruskal_tree.hpp index 56b02e55..366fd4ae 100644 --- a/library/data_structures/dsu/kruskal_tree.hpp +++ b/library/data_structures/dsu/kruskal_tree.hpp @@ -5,7 +5,7 @@ struct kr_tree { int id; vi p; - vector> adj; + vector> adj; kr_tree(int n): id(n), p(2 * n, -1), adj(2 * n) {} int find(int v) { return p[v] < 0 ? v : p[v] = find(p[v]); diff --git a/library/data_structures/dsu/range_parallel_equivalence_classes.hpp b/library/data_structures/dsu/range_parallel_equivalence_classes.hpp index 730ce8f3..870b63c0 100644 --- a/library/data_structures/dsu/range_parallel_equivalence_classes.hpp +++ b/library/data_structures/dsu/range_parallel_equivalence_classes.hpp @@ -5,13 +5,13 @@ //! @time O((n + q) * \alpha(n)) //! @space O(n + q) UF get_rp_dsu(const vector>& rests, int n) { - vector>> rests_by_len(n + 1); + vector> rests_by_len(n + 1); for (auto [l1, l2, len] : rests) - rests_by_len[len] += {l1, l2}; + rests_by_len[len].push_back({l1, l2}); UF uf(n); for (int len = n; len > 0; len--) for (auto [l1, l2] : rests_by_len[len]) if (uf.join(l1, l2)) - rests_by_len[len - 1] += {l1 + 1, l2 + 1}; + rests_by_len[len - 1].push_back({l1 + 1, l2 + 1}); return uf; } diff --git a/library/data_structures/seg_tree_uncommon/merge_sort_tree.hpp b/library/data_structures/seg_tree_uncommon/merge_sort_tree.hpp index 7309e27b..868f8466 100644 --- a/library/data_structures/seg_tree_uncommon/merge_sort_tree.hpp +++ b/library/data_structures/seg_tree_uncommon/merge_sort_tree.hpp @@ -2,7 +2,7 @@ #include "../lazy_seg_tree_midpoint.hpp" struct merge_sort_tree { int n; - vector> tree; + vector tree; merge_sort_tree(const vi& a): n(sz(a)), tree(2 * n) { int pw2 = bit_ceil(size(a)); rep(i, 0, n) tree[(i + pw2) % n + n] = {a[i]}; diff --git a/library/data_structures/uncommon/mode_query.hpp b/library/data_structures/uncommon/mode_query.hpp index 0eaf4a1c..1c1e205b 100644 --- a/library/data_structures/uncommon/mode_query.hpp +++ b/library/data_structures/uncommon/mode_query.hpp @@ -4,7 +4,7 @@ const int b = 318; //!< sqrt(1e5) struct mode_query { int n; vi a, cnt, index_into_index; - vector> index; + vector index; vector> mode_blocks; //!< {mode, cnt} of range of blocks //! @param a compressed array: 0 <= a[i] < n @@ -16,7 +16,7 @@ struct mode_query { vector((n + b - 1) / b)) { rep(i, 0, n) { index_into_index[i] = sz(index[a[i]]); - index[a[i]] += i; + index[a[i]].push_back(i); } for (int start = 0; start < n; start += b) { int mode = a[start]; diff --git a/library/data_structures/uncommon/permutation_tree.hpp b/library/data_structures/uncommon/permutation_tree.hpp index e5553677..ee951b21 100644 --- a/library/data_structures/uncommon/permutation_tree.hpp +++ b/library/data_structures/uncommon/permutation_tree.hpp @@ -17,13 +17,13 @@ struct perm_tree { }; vector p; int root; - vector> ch; + vector ch; bool touches(int u, int v) { return p[u].mn_num == p[v].mn_num + p[v].len || p[v].mn_num == p[u].mn_num + p[u].len; } int allocate(int mn_i, int mn_v, int ln, bool join, - const basic_string& chs) { + const vi& chs) { p.push_back({mn_i, mn_v, ln, join}); ch.push_back(chs); return sz(ch) - 1; @@ -50,7 +50,7 @@ struct perm_tree { if (!empty(ch[u]) && touches(ch[u].back(), v)) { p[u].mn_num = min(p[u].mn_num, p[v].mn_num); p[u].len += p[v].len; - ch[u] += v; + ch[u].push_back(v); v = u; st.pop_back(); continue; @@ -73,7 +73,7 @@ struct perm_tree { break; } int min_num = p[v].mn_num; - basic_string chs(1 + sz(st) - idx, v); + vi chs(1 + sz(st) - idx, v); rep(j, idx, sz(st)) min_num = min(min_num, p[chs[j - idx] = st[j][0]].mn_num); v = allocate(l, min_num, i - l + 1, 0, chs); diff --git a/library/graphs/bridges_cuts/block_vertex_tree.hpp b/library/graphs/bridges_cuts/block_vertex_tree.hpp index 69d9e853..5a027e4f 100644 --- a/library/graphs/bridges_cuts/block_vertex_tree.hpp +++ b/library/graphs/bridges_cuts/block_vertex_tree.hpp @@ -25,15 +25,15 @@ auto block_vertex_tree(const auto& adj, int num_bccs, const vi& bcc_id) { int n = sz(adj); - vector> bvt(n + num_bccs); + vector bvt(n + num_bccs); vector vis(num_bccs); rep(i, 0, n) { for (auto [_, e_id] : adj[i]) { int bccid = bcc_id[e_id]; if (!vis[bccid]) { vis[bccid] = 1; - bvt[i] += bccid + n; - bvt[bccid + n] += i; + bvt[i].push_back(bccid + n); + bvt[bccid + n].push_back(i); } } for (int bccid : bvt[i]) vis[bccid - n] = 0; diff --git a/library/graphs/bridges_cuts/bridge_tree.hpp b/library/graphs/bridges_cuts/bridge_tree.hpp index 0781c50b..e1c1f887 100644 --- a/library/graphs/bridges_cuts/bridge_tree.hpp +++ b/library/graphs/bridges_cuts/bridge_tree.hpp @@ -14,8 +14,9 @@ //! @space O(n) auto bridge_tree(const auto& adj, int num_ccs, const vi& br_id, const vi& is_br) { - vector> tree(num_ccs); + vector tree(num_ccs); rep(i, 0, sz(adj)) for (auto [u, e_id] : adj[i]) if ( - is_br[e_id]) tree[br_id[i]] += br_id[u]; + is_br[e_id]) tree[br_id[i]] + .push_back(br_id[u]); return tree; } diff --git a/library/graphs/enumerate_triangles.hpp b/library/graphs/enumerate_triangles.hpp index 6e247cce..5c50437d 100644 --- a/library/graphs/enumerate_triangles.hpp +++ b/library/graphs/enumerate_triangles.hpp @@ -11,10 +11,10 @@ void enumerate_triangles(const vector& edges, int n, auto f) { vi deg(n); for (auto [u, v] : edges) deg[u]++, deg[v]++; - vector> adj(n); + vector adj(n); for (auto [u, v] : edges) { if (tie(deg[u], u) > tie(deg[v], v)) swap(u, v); - adj[u] += v; + adj[u].push_back(v); } vector seen(n); for (auto [u, v] : edges) { diff --git a/library/graphs/functional_graph_processor.hpp b/library/graphs/functional_graph_processor.hpp index 4086930d..313ad5db 100644 --- a/library/graphs/functional_graph_processor.hpp +++ b/library/graphs/functional_graph_processor.hpp @@ -13,7 +13,7 @@ //! @space O(n) struct func_graph { vector root_of; - vector> cycle, childs; + vector cycle, childs; func_graph(const vi& a): root_of(sz(a)), childs(sz(a)) { vi state(sz(a)); rep(i, 0, sz(a)) if (!state[i]) { @@ -26,7 +26,7 @@ struct func_graph { cycle.emplace_back(); while (state[u] == 1) { root_of[u] = {sz(cycle) - 1, sz(cycle.back())}; - cycle.back() += u; + cycle.back().push_back(u); state[u] = 2; u = a[u]; } @@ -34,7 +34,7 @@ struct func_graph { int v = i; while (state[v] == 1) { root_of[v] = root_of[u]; - childs[a[v]] += v; + childs[a[v]].push_back(v); state[v] = 2; v = a[v]; } diff --git a/library/graphs/strongly_connected_components/add_edges_strongly_connected.hpp b/library/graphs/strongly_connected_components/add_edges_strongly_connected.hpp index 732d121f..72e4e23c 100644 --- a/library/graphs/strongly_connected_components/add_edges_strongly_connected.hpp +++ b/library/graphs/strongly_connected_components/add_edges_strongly_connected.hpp @@ -21,11 +21,11 @@ vector extra_edges(const auto& adj, int num_sccs, const vi& scc_id) { if (num_sccs == 1) return {}; int n = sz(adj); - vector> scc_adj(num_sccs); + vector scc_adj(num_sccs); vector zero_in(num_sccs, 1); rep(i, 0, n) for (int u : adj[i]) { if (scc_id[i] == scc_id[u]) continue; - scc_adj[scc_id[i]] += scc_id[u]; + scc_adj[scc_id[i]].push_back(scc_id[u]); zero_in[scc_id[u]] = 0; } vector vis(num_sccs); diff --git a/library/graphs/strongly_connected_components/offline_incremental_scc.hpp b/library/graphs/strongly_connected_components/offline_incremental_scc.hpp index 5aca8ee3..4507acd2 100644 --- a/library/graphs/strongly_connected_components/offline_incremental_scc.hpp +++ b/library/graphs/strongly_connected_components/offline_incremental_scc.hpp @@ -15,7 +15,7 @@ vi offline_incremental_scc(vector> eds, int m = sz(eds); vi ids(n, -1), joins(m, m), idx(m), vs(n), scc_id; iota(all(idx), 0); - vector> adj; + vector adj; auto divide_and_conquer = [&](auto&& self, auto el, auto er, int tl, int tr) { adj.clear(); @@ -29,7 +29,7 @@ vi offline_incremental_scc(vector> eds, adj.emplace_back(); } u = ids[u], v = ids[v]; - if (*it <= mid) adj[u] += v; + if (*it <= mid) adj[u].push_back(v); } rep(i, 0, sz(adj)) ids[vs[i]] = -1; scc_id = sccs(adj).second; diff --git a/library/math/matrix_related/xor_basis_unordered.hpp b/library/math/matrix_related/xor_basis_unordered.hpp index ba884bdb..ed8e0e5e 100644 --- a/library/math/matrix_related/xor_basis_unordered.hpp +++ b/library/math/matrix_related/xor_basis_unordered.hpp @@ -11,12 +11,12 @@ //! @time O(32) or O(64) //! @space O(32) or O(64) template struct basis { - basic_string b; + vector b; T shrink(T v) { for (T x : b) v = min(v, v ^ x); return v; } bool insert(T v) { - return (v = shrink(v)) ? b += v, 1 : 0; + return (v = shrink(v)) ? b.push_back(v), 1 : 0; } }; diff --git a/library/math/matrix_related/xor_basis_unordered_intersection.hpp b/library/math/matrix_related/xor_basis_unordered_intersection.hpp index 15dceaf6..c4383549 100644 --- a/library/math/matrix_related/xor_basis_unordered_intersection.hpp +++ b/library/math/matrix_related/xor_basis_unordered_intersection.hpp @@ -6,14 +6,14 @@ template basis intersection(const basis& u, const basis& v) { - basic_string> w; - for (T e : u.b) w += {e, e}; + vector> w; + for (T e : u.b) w.push_back({e, e}); basis res; for (T e : v.b) { T s = 0; for (auto [x, y] : w) if ((e ^ x) < e) e ^= x, s ^= y; - if (e) w += {e, s}; + if (e) w.push_back({e, s}); else res.insert(s); } return res; diff --git a/library/strings/longest_common_subsequence/lcs_queries.hpp b/library/strings/longest_common_subsequence/lcs_queries.hpp index e7bf70f5..25c2872d 100644 --- a/library/strings/longest_common_subsequence/lcs_queries.hpp +++ b/library/strings/longest_common_subsequence/lcs_queries.hpp @@ -16,11 +16,11 @@ vi lcs_queries(const auto& s, const auto& t, const vector>& queries) { int n = sz(s), m = sz(t), q = sz(queries); - vector>> qs(n); + vector>> qs(n); rep(i, 0, q) { auto [s_r, t_le, t_ri] = queries[i]; if (s_r == 0 || t_le == m) continue; - qs[s_r - 1] += {t_le, t_ri, i}; + qs[s_r - 1].push_back({t_le, t_ri, i}); } lcs_dp lcs(t); vi res(q); diff --git a/tests/.config/.cppcheck_suppression_list b/tests/.config/.cppcheck_suppression_list index a5be8a60..a561d7a6 100644 --- a/tests/.config/.cppcheck_suppression_list +++ b/tests/.config/.cppcheck_suppression_list @@ -60,6 +60,4 @@ uninitvar:library_checker_aizu_tests/handmade_tests/seg_tree_find_small.test.cpp unusedFunction:../kactl/content/data-structures/UnionFind.h:14 unusedFunction:../kactl/content/number-theory/ModPow.h:13 unusedFunction:../kactl/stress-tests/utilities/genTree.h:49 -assertWithSideEffect:library_checker_aizu_tests/math/xor_basis_intersection.test.cpp:27 -assertWithSideEffect:library_checker_aizu_tests/math/xor_basis_intersection.test.cpp:36 containerOutOfBounds:../library/data_structures/uncommon/permutation_tree.hpp:85 diff --git a/tests/library_checker_aizu_tests/handmade_tests/functional_graph.test.cpp b/tests/library_checker_aizu_tests/handmade_tests/functional_graph.test.cpp index f8fa251a..6901b9e8 100644 --- a/tests/library_checker_aizu_tests/handmade_tests/functional_graph.test.cpp +++ b/tests/library_checker_aizu_tests/handmade_tests/functional_graph.test.cpp @@ -119,12 +119,6 @@ struct functional_graph_processor { vector end; // [pos[u], end[u]) denotes the subtree vector size; // size of the subtree in abr }; -bool equal(const basic_string &a, const vi &b) { - if (sz(a) != sz(b)) return 0; - for (int i = 0; i < sz(a); i++) - if (a[i] != b[i]) return 0; - return 1; -} int main() { cin.tie(0)->sync_with_stdio(0); for (int num_tests = 100; num_tests--;) { @@ -133,17 +127,12 @@ int main() { for (int i = 0; i < n; i++) a[i] = rnd(0, n - 1); auto [root_of, cycle, childs] = func_graph(a); functional_graph_processor fgp(a); - assert(sz(cycle) == sz(fgp.cycle)); - for (int i = 0; i < sz(cycle); i++) { - assert(sz(cycle[i]) == sz(fgp.cycle[i])); - for (int j = 0; j < sz(cycle[i]); j++) - assert(cycle[i][j] == fgp.cycle[i][j]); - } + assert(cycle == fgp.cycle); + assert(childs == fgp.abr); for (int i = 0; i < n; i++) { int root = cycle[root_of[i].first][root_of[i].second]; assert(root == fgp.root_of[i]); - assert(equal(childs[i], fgp.abr[i])); assert((root == i) == (fgp.cycle_id[i] != -1)); if (root == i) { assert(root_of[i].first == fgp.cycle_id[i]);