├── .github └── workflows │ ├── verify.yml │ └── verify_parallel.yml ├── .gitignore ├── .gitmodules ├── .verify-helper ├── config.toml ├── docs │ └── _config.yml └── timestamps.remote.json ├── README.md ├── docs ├── algebra │ ├── field │ │ └── nimber.md │ └── monoid │ │ ├── affine.md │ │ └── affine_clamp.md ├── algorithm │ ├── area_of_union_of_rectangles.md │ ├── dynamic_convex_hull_offline.md │ ├── horn_sat.md │ ├── inversion_number.md │ ├── maximum_rectangle.md │ ├── maximum_square.md │ ├── mo.md │ ├── monotone_minima.md │ ├── offline_dynamic_connectivity.md │ ├── offline_dynamic_connectivity_component_sum.md │ ├── rmq_pm1.md │ ├── rmq_pm1_with_index.md │ └── two_sat.md ├── convolution │ ├── and_convolution.md │ ├── arbitrary_mod_convolution.md │ ├── array_subset_convolution.md │ ├── convolution.md │ ├── convolution_2_64.md │ ├── convolution_large.md │ ├── convolution_naive.md │ ├── dirichlet_convolution.md │ ├── gcd_convolution.md │ ├── lcm_convolution.md │ ├── min_plus_convolution.md │ ├── multi_variate_convolution.md │ ├── multi_variate_convolution_circular.md │ ├── multiplicative_convolution_mod_2^n.md │ ├── or_convolution.md │ ├── polynomial_eval.md │ ├── polynomial_eval_multipoint_eval.md │ ├── relaxed_convolution.md │ ├── relaxed_convolution_ntt.md │ ├── semi_relaxed_convolution.md │ ├── semi_relaxed_convolution_ntt.md │ ├── subset_convolution.md │ └── xor_convolution.md ├── datastructure │ ├── ZDD.md │ ├── bbst │ │ ├── implicit_treap.md │ │ ├── implicit_treap_base.md │ │ ├── implicit_treap_dual_segtree.md │ │ ├── implicit_treap_lazy_segtree.md │ │ ├── implicit_treap_segtree.md │ │ ├── persistent_red_black_lazy_segment_tree.md │ │ ├── persistent_red_black_reversible_lazy_segment_tree.md │ │ ├── persistent_red_black_segment_tree.md │ │ ├── persistent_red_black_tree.md │ │ ├── persistent_red_black_tree_base.md │ │ ├── red_black_lazy_segment_tree.md │ │ ├── red_black_reversible_lazy_segment_tree.md │ │ ├── red_black_segment_tree.md │ │ ├── red_black_tree.md │ │ ├── red_black_tree_base.md │ │ ├── reversible_implicit_treap.md │ │ ├── reversible_implicit_treap_base.md │ │ ├── reversible_implicit_treap_dual_segtree.md │ │ ├── reversible_implicit_treap_lazy_segtree.md │ │ └── reversible_implicit_treap_segtree.md │ ├── binary_trie.md │ ├── binary_trie_patricia.md │ ├── bit_vector.md │ ├── cartesian_tree.md │ ├── compressed_wavelet_matrix.md │ ├── convex_hull_trick.md │ ├── deque_aggregation.md │ ├── double_ended_priority_queue.md │ ├── dynamic_sequence.md │ ├── fenwick_tree │ │ ├── compressed_fenwick_tree.md │ │ ├── compressed_fenwick_tree_prefix.md │ │ ├── fenwick_tree.md │ │ ├── fenwick_tree_2d.md │ │ ├── fenwick_tree_2d_sparse.md │ │ ├── fenwick_tree_prefix.md │ │ ├── fenwick_tree_set.md │ │ ├── offline_rectangle_add_point_get.md │ │ ├── persistent_fenwick_tree.md │ │ ├── rectangle_add_rectangle_sum.md │ │ └── static_rectangle_add_rectangle_sum.md │ ├── heap │ │ ├── binary_heap.md │ │ ├── heap_tag.md │ │ └── interval_heap.md │ ├── lazy_eval_dynamic_sequence.md │ ├── lazy_eval_map.md │ ├── monotonic_convex_hull_trick.md │ ├── permutation_tree.md │ ├── persistent_array.md │ ├── priority_queue.md │ ├── queue_aggregation.md │ ├── range_foldable_dynamic_sequence.md │ ├── range_foldable_map.md │ ├── segment_tree │ │ ├── application │ │ │ └── range_arithmetic_progression_add_range_sum.md │ │ ├── commutative_dual_segment_tree.md │ │ ├── compressed_segment_tree.md │ │ ├── dual_segment_tree.md │ │ ├── lazy_segment_tree.md │ │ ├── li_chao_segment_tree.md │ │ ├── persistent_commutative_dual_segment_tree.md │ │ ├── persistent_dual_segment_tree.md │ │ ├── persistent_lazy_segment_tree.md │ │ ├── persistent_segment_tree.md │ │ ├── segment_tree.md │ │ ├── segment_tree_2d.md │ │ ├── segment_tree_2d_sparse.md │ │ ├── segment_tree_beats.md │ │ ├── sortable_segment_tree.md │ │ ├── sparse_lazy_segment_tree.md │ │ ├── sparse_segment_tree.md │ │ └── trees │ │ │ └── range_chmin_chmax_add_range_sum.md │ ├── sliding_window_minimum.md │ ├── slope_trick.md │ ├── sparse_table.md │ ├── splay_tree_map.md │ ├── splay_tree_set.md │ ├── union_find │ │ ├── linked_union_find.md │ │ ├── merge_history_forest.md │ │ ├── persistent_union_find.md │ │ ├── undo_union_find.md │ │ ├── undo_union_find_component_sum.md │ │ ├── union_find.md │ │ ├── union_find_component_sum.md │ │ ├── union_find_lazy.md │ │ └── weighted_union_find.md │ ├── util │ │ ├── dynamic_bitset.md │ │ ├── priority_sum.md │ │ ├── range_set.md │ │ └── static_bitset.md │ └── wavelet_matrix.md ├── debug │ ├── suffix_automaton.md │ ├── tree.md │ └── warning.md ├── dp │ ├── grid_connectivity.md │ ├── longest_increasing_subsequence.md │ └── number_of_subsequences.md ├── experimental │ ├── bbst │ │ ├── persistent_red_black_lazy_segment_tree.md │ │ ├── persistent_red_black_reversible_lazy_segment_tree.md │ │ ├── persistent_red_black_segment_tree.md │ │ ├── persistent_red_black_tree.md │ │ ├── persistent_red_black_tree_base.md │ │ ├── red_black_lazy_segment_tree.md │ │ ├── red_black_reversible_lazy_segment_tree.md │ │ ├── red_black_segment_tree.md │ │ ├── red_black_tree.md │ │ └── red_black_tree_base.md │ └── implicit_treap.md ├── geom │ ├── closest_pair.md │ ├── convex_hull.md │ ├── geometry.md │ ├── geometry3d.md │ └── segment_intersections.md ├── graph │ ├── assignment_problem.md │ ├── bfs.md │ ├── bfs01.md │ ├── bfs_complement.md │ ├── biconnected_components.md │ ├── bipartite_graph_recognition.md │ ├── bipartite_matching.md │ ├── block_cut_forest.md │ ├── chromatic_number.md │ ├── csr_graph.md │ ├── cycle_detection.md │ ├── dijkstra.md │ ├── directed_eulerian_graph.md │ ├── dulmage_mendelsohn_decomposition.md │ ├── edge_coloring_of_bipartite_graph.md │ ├── enumerate_cliques.md │ ├── enumerate_triangles.md │ ├── functional_graph.md │ ├── graph.md │ ├── kruscal.md │ ├── low_link.md │ ├── manhattan_minimum_distances.md │ ├── manhattan_mst.md │ ├── maximum_clique.md │ ├── maximum_independent_set.md │ ├── min_cost_flow.md │ ├── minimum_vertex_cover.md │ ├── minmax_floyd_warshall.md │ ├── project_selection.md │ ├── remove_multiedges.md │ ├── scc_tournament.md │ ├── segment_tree_graph.md │ ├── single_source_shortest_path_dag.md │ ├── topological_sort.md │ ├── tree_decomposition_tw2.md │ ├── tree_decomposition_tw2_dp.md │ ├── two_edge_connected_components.md │ └── undirected_eulerian_graph.md ├── icpc │ └── parsing.md ├── integral_geom │ ├── closest_pair.md │ ├── convex_hull.md │ ├── convex_hull_inclusion.md │ ├── count_lattice_point.md │ ├── farthest_pair.md │ ├── geometry.md │ ├── inclusion.md │ ├── point.md │ └── sort_points_by_argument.md ├── linear_algebra │ ├── array_matrix.md │ ├── characteristic_polynomial.md │ ├── circulant_matrix.md │ ├── count_spanning_trees.md │ ├── gaussian_elimination.md │ ├── gaussian_elimination_f2.md │ ├── hafnian.md │ ├── hessenberg_reduction.md │ ├── matrix.md │ ├── matrix_f2.md │ └── xor_base.md ├── math │ ├── array_set_power_series.md │ ├── array_sps.md │ ├── bigint.md │ ├── binomial_coefficient_sum.md │ ├── factorial.md │ ├── factorial_embeded.md │ ├── factorial_large.md │ ├── inv_mods.md │ ├── modint_extension.md │ ├── pow_mods.md │ ├── product_of_differences.md │ ├── set_power_series.md │ ├── sps.md │ ├── sum_i^d_r^i.md │ ├── unsigned_bigint.md │ └── util.md ├── number │ ├── anymod_binom.md │ ├── barrett_reduction.md │ ├── bezout_equation.md │ ├── deterministic_miller_rabin.md │ ├── deterministic_miller_rabin_simd.md │ ├── discrete_logarithm.md │ ├── enumerate_quotient.md │ ├── ext_gcd.md │ ├── factorial_number.md │ ├── fast_discrete_logarithm.md │ ├── fast_factorize.md │ ├── find_denominators.md │ ├── garner.md │ ├── index_calculus.md │ ├── internal_eratosthenes.md │ ├── kth_root_mod.md │ ├── kth_root_round.md │ ├── linear_sieve.md │ ├── min_of_mod_of_linear.md │ ├── mobius_function.md │ ├── mod_sqrt.md │ ├── modint.md │ ├── modint_2^61m1.md │ ├── montogomery.md │ ├── order_Z_mZ.md │ ├── order_prime_mod.md │ ├── primitive_root.md │ ├── rational.md │ ├── sieve_of_eratosthenes.md │ ├── sieve_of_eratosthenes_constexpr.md │ ├── stern_brocot_tree.md │ ├── sum_of_mobius_function.md │ ├── sum_of_totient_function.md │ ├── tetration_mod.md │ └── util.md ├── optimization │ ├── alien_dp.md │ ├── k_project_selection_problem.md │ └── project_selection_problem.md ├── polynomial │ ├── array_fps_naive.md │ ├── berlekamp_massey.md │ ├── bostan_mori.md │ ├── compose.md │ ├── compose_exp.md │ ├── compose_inv.md │ ├── convert_to_newton_basis.md │ ├── formal_power_series.md │ ├── formal_power_series_relaxed.md │ ├── fps.md │ ├── fps_naive.md │ ├── lagrange_interpolation.md │ ├── multi_point_eval.md │ ├── polynomial_gcd.md │ ├── polynomial_interpolation.md │ ├── polynomial_taylor_shift.md │ ├── prod_f(r^k_x).md │ ├── rational_fps.md │ ├── shift_of_sampling_points.md │ ├── subset_sum.md │ └── vec_sparse_fps.md ├── range_query │ ├── range_chmin_chmax_add_range_sum.md │ ├── range_set_range_composite.md │ ├── static range_count_distinct.md │ ├── static_range_inversion_number_query.md │ ├── static_range_mode_query.md │ └── static_range_xored_mex_query.md ├── sequence │ ├── bell_number.md │ ├── bernoulli_number.md │ ├── binomial_coefficient.md │ ├── binomial_coefficient_small_prime_mod.md │ ├── binomial_coefficient_small_r_offline.md │ ├── binomial_coefficitnt_enumeration.md │ ├── eulerian_number.md │ ├── montmort_number.md │ ├── partition_number.md │ ├── powers.md │ ├── stirling_number1.md │ ├── stirling_number1_small_prime_mod.md │ ├── stirling_number2.md │ └── stirling_number2_small_prime_mod.md ├── string │ ├── aho_corasick.md │ ├── aho_corasick_array.md │ ├── compare_substring.md │ ├── dynamic_rolling_hash.md │ ├── manacher.md │ ├── morris_pratt.md │ ├── palindromic_tree.md │ ├── rolling_hash.md │ ├── rolling_hash_field.md │ ├── run_enumerate.md │ ├── substring_set.md │ ├── suffix_automaton.md │ ├── trie_array.md │ └── trie_map.md ├── template.md ├── transform │ ├── chirp_z_transform.md │ ├── divisor.md │ ├── kronecker.md │ ├── kronecker_power.md │ ├── multiple.md │ ├── subset.md │ ├── supset.md │ └── walsh_hadamard.md ├── tree │ ├── auxiliary_tree.md │ ├── centroid_decomposition.md │ ├── contour_aggregation_query_on_tree.md │ ├── contour_sum.md │ ├── euler_tour.md │ ├── find_centroid.md │ ├── frequency_table_of_tree_distance.md │ ├── get_path.md │ ├── heavy_light_decomposition.md │ ├── level_ancestor.md │ ├── link_cut_tree.md │ ├── link_cut_tree_base.md │ ├── link_cut_tree_path_foldable.md │ ├── link_cut_tree_path_foldable_lazy.md │ ├── lowest_common_ancestor.md │ ├── point_add_range_contour_sum.md │ ├── point_add_range_contour_sum_invertible.md │ ├── point_get_range_contour_add_invertible.md │ ├── point_get_range_contour_operate.md │ ├── point_set_range_contour_sum.md │ ├── range_contour_sum_invertible.md │ ├── rerooting.md │ ├── rerooting_invertible.md │ ├── rooted_tree_isomorphism_classification.md │ └── tree_isomorphism_classification.md ├── type_traits │ ├── operator.md │ └── type_traits.md └── util │ ├── bit_utils.md │ ├── container_utils.md │ ├── coordinate_compressor.md │ ├── cumulative_sum.md │ ├── cumulative_sum_2d.md │ ├── default_operator.md │ ├── default_vector.md │ ├── grid_utils.md │ ├── hashes.md │ ├── iter_util.md │ ├── object_pool.md │ ├── pair_ops.md │ ├── permutation.md │ ├── pointer_32bit.md │ ├── rot90.md │ ├── run_length_encoder.md │ ├── step_sum.md │ ├── step_view.md │ ├── subset_iterator.md │ ├── sum_count.md │ ├── timer.md │ ├── transpose.md │ ├── tuple_hash.md │ ├── tuple_ops.md │ ├── update_proxy_object.md │ ├── variant_utils.md │ ├── vector_ops.md │ ├── vector_pool.md │ └── zobrist_hash.md ├── library ├── algebra │ ├── field │ │ └── nimber.hpp │ └── monoid │ │ ├── affine.hpp │ │ └── affine_clamp.hpp ├── algorithm │ ├── area_of_union_of_rectangles.hpp │ ├── dynamic_convex_hull_offline.hpp │ ├── horn_sat.hpp │ ├── inversion_number.hpp │ ├── maximum_rectangle.hpp │ ├── maximum_square.hpp │ ├── mo.hpp │ ├── monotone_minima.hpp │ ├── offline_dynamic_connectivity.hpp │ ├── offline_dynamic_connectivity_component_sum.hpp │ ├── rmq_pm1.hpp │ ├── rmq_pm1_with_index.hpp │ └── two_sat.hpp ├── convolution │ ├── and_convolution.hpp │ ├── arbitrary_mod_convolution.hpp │ ├── array_subset_convolution.hpp │ ├── convolution.hpp │ ├── convolution_2_64.hpp │ ├── convolution_large.hpp │ ├── convolution_naive.hpp │ ├── dirichlet_convolution.hpp │ ├── gcd_convolution.hpp │ ├── lcm_convolution.hpp │ ├── min_plus_convolution.hpp │ ├── multi_variate_convolution.hpp │ ├── multi_variate_convolution_circular.hpp │ ├── multiplicative_convolution_mod_2^n.hpp │ ├── or_convolution.hpp │ ├── polynomial_eval.hpp │ ├── polynomial_eval_multipoint_eval.hpp │ ├── relaxed_convolution.hpp │ ├── relaxed_convolution_ntt.hpp │ ├── semi_relaxed_convolution.hpp │ ├── semi_relaxed_convolution_ntt.hpp │ ├── subset_convolution.hpp │ └── xor_convolution.hpp ├── datastructure │ ├── ZDD.hpp │ ├── bbst │ │ ├── implicit_treap.hpp │ │ ├── implicit_treap_base.hpp │ │ ├── implicit_treap_segtree.hpp │ │ ├── persistent_red_black_lazy_segment_tree.hpp │ │ ├── persistent_red_black_reversible_lazy_segment_tree.hpp │ │ ├── persistent_red_black_segment_tree.hpp │ │ ├── persistent_red_black_tree.hpp │ │ ├── persistent_red_black_tree_base.hpp │ │ ├── red_black_lazy_segment_tree.hpp │ │ ├── red_black_reversible_lazy_segment_tree.hpp │ │ ├── red_black_segment_tree.hpp │ │ ├── red_black_tree.hpp │ │ ├── red_black_tree_base.hpp │ │ ├── reversible_implicit_treap.hpp │ │ ├── reversible_implicit_treap_base.hpp │ │ ├── reversible_implicit_treap_dual_segtree.hpp │ │ ├── reversible_implicit_treap_lazy_segtree.hpp │ │ └── reversible_implicit_treap_segtree.hpp │ ├── binary_trie.hpp │ ├── binary_trie_patricia.hpp │ ├── bit_vector.hpp │ ├── cartesian_tree.hpp │ ├── compressed_wavelet_matrix.hpp │ ├── convex_hull_trick.hpp │ ├── deque_aggregation.hpp │ ├── double_ended_priority_queue.hpp │ ├── dynamic_sequence.hpp │ ├── fenwick_tree │ │ ├── compressed_fenwick_tree.hpp │ │ ├── compressed_fenwick_tree_prefix.hpp │ │ ├── fenwick_tree.hpp │ │ ├── fenwick_tree_2d.hpp │ │ ├── fenwick_tree_2d_sparse.hpp │ │ ├── fenwick_tree_prefix.hpp │ │ ├── fenwick_tree_set.hpp │ │ ├── offline_rectangle_add_point_get.hpp │ │ ├── persistent_fenwick_tree.hpp │ │ ├── rectangle_add_rectangle_sum.hpp │ │ └── static_rectangle_add_rectangle_sum.hpp │ ├── heap │ │ ├── binary_heap.hpp │ │ ├── heap_tag.hpp │ │ └── interval_heap.hpp │ ├── lazy_eval_dynamic_sequence.hpp │ ├── lazy_eval_map.hpp │ ├── monotonic_convex_hull_trick.hpp │ ├── permutation_tree.hpp │ ├── persistent_array.hpp │ ├── priority_queue.hpp │ ├── queue_aggregation.hpp │ ├── range_foldable_dynamic_sequence.hpp │ ├── range_foldable_map.hpp │ ├── segment_tree │ │ ├── commutative_dual_segment_tree.hpp │ │ ├── compressed_segment_tree.hpp │ │ ├── dual_segment_tree.hpp │ │ ├── lazy_segment_tree.hpp │ │ ├── li_chao_segment_tree.hpp │ │ ├── persistent_commutative_dual_segment_tree.hpp │ │ ├── persistent_dual_segment_tree.hpp │ │ ├── persistent_lazy_segment_tree.hpp │ │ ├── persistent_segment_tree.hpp │ │ ├── segment_tree.hpp │ │ ├── segment_tree_2d.hpp │ │ ├── segment_tree_2d_sparse.hpp │ │ ├── segment_tree_beats.hpp │ │ ├── sortable_segment_tree.hpp │ │ ├── sparse_lazy_segment_tree.hpp │ │ └── sparse_segment_tree.hpp │ ├── sliding_window_minimum.hpp │ ├── slope_trick.hpp │ ├── sparse_table.hpp │ ├── splay_tree_map.hpp │ ├── splay_tree_set.hpp │ ├── union_find │ │ ├── linked_union_find.hpp │ │ ├── merge_history_forest.hpp │ │ ├── persistent_union_find.hpp │ │ ├── undo_union_find.hpp │ │ ├── undo_union_find_component_sum.hpp │ │ ├── union_find.hpp │ │ ├── union_find_component_sum.hpp │ │ ├── union_find_lazy.hpp │ │ └── weighted_union_find.hpp │ ├── util │ │ ├── dynamic_bitset.hpp │ │ ├── priority_sum.hpp │ │ ├── range_set.hpp │ │ └── static_bitset.hpp │ └── wavelet_matrix.hpp ├── debug │ ├── suffix_automaton.hpp │ ├── tree.hpp │ └── warning.hpp ├── dp │ ├── grid_connectivity.hpp │ ├── longest_increasing_subsequence.hpp │ └── number_of_subsequences.hpp ├── geom │ ├── closest_pair.hpp │ ├── convex_hull.hpp │ ├── geometry.hpp │ ├── geometry3d.hpp │ └── segment_intersections.hpp ├── graph │ ├── assignment_problem.hpp │ ├── bfs.hpp │ ├── bfs01.hpp │ ├── bfs_complement.hpp │ ├── biconnected_components.hpp │ ├── bipartite_graph_recognition.hpp │ ├── bipartite_matching.hpp │ ├── block_cut_forest.hpp │ ├── chromatic_number.hpp │ ├── csr_graph.hpp │ ├── cycle_detection.hpp │ ├── dijkstra.hpp │ ├── directed_eulerian_graph.hpp │ ├── dulmage_mendelsohn_decomposition.hpp │ ├── edge_coloring_of_bipartite_graph.hpp │ ├── enumerate_cliques.hpp │ ├── enumerate_triangles.hpp │ ├── functional_graph.hpp │ ├── kruscal.hpp │ ├── low_link.hpp │ ├── manhattan_minimum_distances.hpp │ ├── manhattan_mst.hpp │ ├── maximum_clique.hpp │ ├── maximum_independent_set.hpp │ ├── min_cost_flow.hpp │ ├── minimum_vertex_cover.hpp │ ├── minmax_floyd_warshall.hpp │ ├── remove_multiedges.hpp │ ├── scc_tournament.hpp │ ├── segment_tree_graph.hpp │ ├── single_source_shortest_path_dag.hpp │ ├── topological_sort.hpp │ ├── tree_decomposition_tw2.hpp │ ├── tree_decomposition_tw2_dp.hpp │ ├── two_edge_connected_components.hpp │ └── undirected_eulerian_graph.hpp ├── icpc │ └── parsing.hpp ├── integral_geom │ ├── closest_pair.hpp │ ├── convex_hull.hpp │ ├── convex_hull_inclusion.hpp │ ├── count_lattice_point.hpp │ ├── farthest_pair.hpp │ ├── geometry.hpp │ ├── inclusion.hpp │ ├── point.hpp │ └── sort_points_by_argument.hpp ├── io │ ├── input_stream.hpp │ └── output_stream.hpp ├── linear_algebra │ ├── array_matrix.hpp │ ├── characteristic_polynomial.hpp │ ├── circulant_matrix.hpp │ ├── count_spanning_trees.hpp │ ├── gaussian_elimination.hpp │ ├── gaussian_elimination_f2.hpp │ ├── hafnian.hpp │ ├── hessenberg_reduction.hpp │ ├── matrix.hpp │ ├── matrix_f2.hpp │ └── xor_base.hpp ├── math │ ├── array_set_power_series.hpp │ ├── bigint.hpp │ ├── binomial_coefficient_sum.hpp │ ├── factorial.hpp │ ├── factorial_embeded.hpp │ ├── factorial_large.hpp │ ├── inv_mods.hpp │ ├── modint_extension.hpp │ ├── pow_mods.hpp │ ├── product_of_differences.hpp │ ├── set_power_series.hpp │ ├── sum_i^d_r^i.hpp │ ├── unsigned_bigint.hpp │ └── util.hpp ├── number │ ├── barrett_reduction.hpp │ ├── bezout_equation.hpp │ ├── count_square_free.hpp │ ├── deterministic_miller_rabin.hpp │ ├── deterministic_miller_rabin_simd.hpp │ ├── discrete_logarithm.hpp │ ├── enumerate_quotient.hpp │ ├── ext_gcd.hpp │ ├── factorial_number.hpp │ ├── factorized_form.hpp │ ├── fast_discrete_logarithm.hpp │ ├── fast_factorize.hpp │ ├── find_denominators.hpp │ ├── garner.hpp │ ├── internal_eratosthenes.hpp │ ├── kth_root_round.hpp │ ├── linear_sieve.hpp │ ├── min_of_mod_of_linear.hpp │ ├── mobius_function.hpp │ ├── mod_sqrt.hpp │ ├── modint.hpp │ ├── modint_2^61m1.hpp │ ├── montogomery.hpp │ ├── order_Z_mZ.hpp │ ├── primitive_root.hpp │ ├── rational.hpp │ ├── sieve_of_eratosthenes.hpp │ ├── sieve_of_eratosthenes_constexpr.hpp │ ├── stern_brocot_tree.hpp │ ├── sum_of_mobius_function.hpp │ ├── sum_of_totient_function.hpp │ ├── tetration_mod.hpp │ └── util.hpp ├── optimization │ ├── alien_dp.hpp │ ├── k_project_selection_problem.hpp │ └── project_selection_problem.hpp ├── polynomial │ ├── array_fps_naive.hpp │ ├── berlekamp_massey.hpp │ ├── bostan_mori.hpp │ ├── compose.hpp │ ├── compose_exp.hpp │ ├── compose_inv.hpp │ ├── convert_to_newton_basis.hpp │ ├── formal_power_series.hpp │ ├── formal_power_series_relaxed.hpp │ ├── fps.hpp │ ├── fps_naive.hpp │ ├── lagrange_interpolation.hpp │ ├── multi_point_eval.hpp │ ├── polynomial_gcd.hpp │ ├── polynomial_interpolation.hpp │ ├── polynomial_taylor_shift.hpp │ ├── prod_f(r^k_x).hpp │ ├── rational_fps.hpp │ ├── rook_polynomial.hpp │ ├── shift_of_sampling_points.hpp │ ├── subset_sum.hpp │ └── vec_sparse_fps.hpp ├── range_query │ ├── range_chmin_chmax_add_range_sum.hpp │ ├── range_set_range_composite.hpp │ ├── static range_count_distinct.hpp │ ├── static_range_inversion_number_query.hpp │ ├── static_range_mode_query.hpp │ └── static_range_xored_mex_query.hpp ├── sequence │ ├── bell_number.hpp │ ├── bernoulli_number.hpp │ ├── binomial_coefficient.hpp │ ├── binomial_coefficient_small_prime_mod.hpp │ ├── binomial_coefficient_small_r_offline.hpp │ ├── binomial_coefficitnt_enumeration.hpp │ ├── eulerian_number.hpp │ ├── montmort_number.hpp │ ├── partition_number.hpp │ ├── powers.hpp │ ├── stirling_number1.hpp │ ├── stirling_number1_small_prime_mod.hpp │ ├── stirling_number2.hpp │ ├── stirling_number2_small_prime_mod.hpp │ └── sum_of_powers.hpp ├── string │ ├── aho_corasick.hpp │ ├── aho_corasick_array.hpp │ ├── compare_substring.hpp │ ├── dynamic_rolling_hash.hpp │ ├── manacher.hpp │ ├── morris_pratt.hpp │ ├── palindromic_tree.hpp │ ├── rolling_hash.hpp │ ├── rolling_hash_field.hpp │ ├── run_enumerate.hpp │ ├── substring_set.hpp │ ├── suffix_automaton.hpp │ ├── trie_array.hpp │ └── trie_map.hpp ├── template.cpp ├── template.hpp ├── transform │ ├── chirp_z_transform.hpp │ ├── divisor.hpp │ ├── kronecker.hpp │ ├── kronecker_power.hpp │ ├── multiple.hpp │ ├── subset.hpp │ ├── supset.hpp │ └── walsh_hadamard.hpp ├── tree │ ├── auxiliary_tree.hpp │ ├── centroid_decomposition.hpp │ ├── contour_sum.hpp │ ├── euler_tour.hpp │ ├── find_centroid.hpp │ ├── frequency_table_of_tree_distance.hpp │ ├── get_path.hpp │ ├── heavy_light_decomposition.hpp │ ├── level_ancestor.hpp │ ├── link_cut_tree.hpp │ ├── link_cut_tree_base.hpp │ ├── link_cut_tree_path_foldable.hpp │ ├── link_cut_tree_path_foldable_lazy.hpp │ ├── lowest_common_ancestor.hpp │ ├── point_add_range_contour_sum.hpp │ ├── point_add_range_contour_sum_invertible.hpp │ ├── point_get_range_contour_add_invertible.hpp │ ├── point_get_range_contour_operate.hpp │ ├── point_set_range_contour_sum.hpp │ ├── range_contour_sum_invertible.hpp │ ├── rerooting.hpp │ ├── rerooting_invertible.hpp │ ├── static_top_tree.hpp │ └── tree_isomorphism_classification.hpp ├── type_traits │ ├── operator.hpp │ └── type_traits.hpp └── util │ ├── bit_utils.hpp │ ├── container_utils.hpp │ ├── coordinate_compressor.hpp │ ├── cumulative_sum.hpp │ ├── cumulative_sum_2d.hpp │ ├── default_operator.hpp │ ├── default_vector.hpp │ ├── grid_utils.hpp │ ├── hashes.hpp │ ├── iter_util.hpp │ ├── object_pool.hpp │ ├── pair_ops.hpp │ ├── permutation.hpp │ ├── pointer_32bit.hpp │ ├── rot90.hpp │ ├── run_length_encoder.hpp │ ├── search.hpp │ ├── step_sum.hpp │ ├── step_view.hpp │ ├── subset_iterator.hpp │ ├── sum_count.hpp │ ├── timer.hpp │ ├── transpose.hpp │ ├── tuple_ops.hpp │ ├── update_proxy_object.hpp │ ├── variant_utils.hpp │ ├── vector_ops.hpp │ └── zobrist_hash.hpp ├── scripts ├── generate_doc_files.py ├── generate_test_src_folders.py └── verify.py └── test ├── README.md └── src ├── algebra ├── field │ └── nimber │ │ ├── .gitignore │ │ └── nim_product_64.test.cpp └── monoid │ ├── affine │ └── .gitignore │ └── affine_clamp │ └── .gitignore ├── algorithm ├── area_of_union_of_rectangles │ ├── .gitignore │ └── area_of_union_of_rectangles.test.cpp ├── dynamic_convex_hull_offline │ ├── .gitignore │ └── convex_layers.test.cpp ├── horn_sat │ └── .gitignore ├── inversion_number │ └── .gitignore ├── maximum_rectangle │ └── .gitignore ├── maximum_square │ └── .gitignore ├── mo │ ├── .gitignore │ ├── abc174_f.test.cpp │ ├── abc238_g.test.cpp │ └── abc242_g.test.cpp ├── monotone_minima │ └── .gitignore ├── offline_dynamic_connectivity │ └── .gitignore ├── offline_dynamic_connectivity_component_sum │ ├── .gitignore │ └── dynamic_graph_vertex_add_component_sum.test.cpp ├── rmq_pm1 │ └── .gitignore ├── rmq_pm1_with_index │ └── .gitignore └── two_sat │ └── .gitignore ├── convolution ├── and_convolution │ ├── .gitignore │ └── and_convolution.test.cpp ├── arbitrary_mod_convolution │ ├── .gitignore │ └── convolution_mod_1000000007.test.cpp ├── array_subset_convolution │ └── .gitignore ├── convolution │ └── .gitignore ├── convolution_2_64 │ ├── .gitignore │ ├── convolution_mod_2_64.test.cpp │ └── convolution_mod_2_64_6mod.test.cpp ├── convolution_large │ ├── .gitignore │ └── convolution_large.test.cpp ├── convolution_naive │ └── .gitignore ├── dirichlet_convolution │ └── .gitignore ├── gcd_convolution │ ├── .gitignore │ ├── gcd_convolution.test.cpp │ └── lcms.test.cpp ├── lcm_convolution │ ├── .gitignore │ └── lcm_convolution.test.cpp ├── min_plus_convolution │ ├── .gitignore │ ├── min_plus_convolution_convex_arbitrary.test.cpp │ └── min_plus_convolution_convex_convex.test.cpp ├── multi_variate_convolution │ ├── .gitignore │ └── multivariate_convolution.test.cpp ├── multi_variate_convolution_circular │ ├── .gitignore │ ├── bitwise_xor_convolution.test.cpp │ ├── dummy.test.cpp │ └── multivariate_convolution_cyclic.test.cpp ├── multiplicative_convolution_mod_2^n │ ├── .gitignore │ └── mul_mod2n_convolution.test.cpp ├── or_convolution │ └── .gitignore ├── polynomial_eval │ ├── .gitignore │ └── nim_counting.test.cpp ├── polynomial_eval_multipoint_eval │ ├── .gitignore │ └── nim_counting.test.cpp ├── relaxed_convolution │ ├── .gitignore │ ├── abc230_h.test.cpp │ └── convolution_mod.test.cpp ├── relaxed_convolution_ntt │ ├── .gitignore │ └── convolution_mod.test.cpp ├── semi_relaxed_convolution │ ├── .gitignore │ ├── abc213_h.test.cpp │ └── convolution_mod.test.cpp ├── semi_relaxed_convolution_ntt │ ├── .gitignore │ ├── convolution_mod.test.cpp │ └── exp_of_formal_power_series.test.cpp ├── subset_convolution │ ├── .gitignore │ └── subset_convolution.test.cpp └── xor_convolution │ ├── .gitignore │ └── xor_convolution.test.cpp ├── datastructure ├── ZDD │ ├── .gitignore │ └── maximum_independent_set.test.cpp ├── bbst │ ├── implicit_treap │ │ ├── .gitignore │ │ ├── abc237_d.test.cpp │ │ ├── arc155_b.test.cpp │ │ ├── dummy.test.cpp │ │ └── yuki649.test.cpp │ ├── implicit_treap_base │ │ └── .gitignore │ ├── implicit_treap_segtree │ │ ├── .gitignore │ │ ├── abc238_f.test.cpp │ │ └── dummy.test.cpp │ ├── persistent_red_black_lazy_segment_tree │ │ └── .gitignore │ ├── persistent_red_black_reversible_lazy_segment_tree │ │ └── .gitignore │ ├── persistent_red_black_segment_tree │ │ └── .gitignore │ ├── persistent_red_black_tree │ │ └── .gitignore │ ├── persistent_red_black_tree_base │ │ └── .gitignore │ ├── red_black_lazy_segment_tree │ │ ├── .gitignore │ │ └── dynamic_sequence_range_affine_range_sum.test.cpp │ ├── red_black_reversible_lazy_segment_tree │ │ ├── .gitignore │ │ └── dynamic_sequence_range_affine_range_sum.test.cpp │ ├── red_black_segment_tree │ │ ├── .gitignore │ │ └── abc238_f.test.cpp │ ├── red_black_tree │ │ ├── .gitignore │ │ └── abc237_d.test.cpp │ ├── red_black_tree_base │ │ └── .gitignore │ ├── reversible_implicit_treap │ │ ├── .gitignore │ │ ├── abc237_d.test.cpp │ │ ├── dummy.test.cpp │ │ └── yuki649.test.cpp │ ├── reversible_implicit_treap_base │ │ └── .gitignore │ ├── reversible_implicit_treap_dual_segtree │ │ ├── .gitignore │ │ └── dummy.test.cpp │ ├── reversible_implicit_treap_lazy_segtree │ │ ├── .gitignore │ │ ├── dummy.test.cpp │ │ └── dynamic_sequence_range_affine_range_sum.test.cpp │ └── reversible_implicit_treap_segtree │ │ ├── .gitignore │ │ ├── abc238_f.test.cpp │ │ ├── dummy.test.cpp │ │ └── range_reverse_range_sum.test.cpp ├── binary_trie │ ├── .gitignore │ ├── set_xor_min.test.cpp │ └── xor_game.test.cpp ├── binary_trie_patricia │ ├── .gitignore │ ├── predecessor_problem.test.cpp │ └── set_xor_min.test.cpp ├── bit_vector │ └── .gitignore ├── cartesian_tree │ ├── .gitignore │ └── cartesian_tree.test.cpp ├── compressed_wavelet_matrix │ ├── .gitignore │ ├── range_kth_smallest.test.cpp │ ├── static_range_frequency.test.cpp │ └── static_rmq.test.cpp ├── convex_hull_trick │ ├── .gitignore │ ├── EDPC_Z.test.cpp │ ├── abc228_h.test.cpp │ └── line_add_get_min.test.cpp ├── deque_aggregation │ ├── .gitignore │ ├── deque_operate_all_composite.test.cpp │ ├── queue_operate_all_composite.test.cpp │ └── staticrmq.test.cpp ├── double_ended_priority_queue │ ├── .gitignore │ └── double_ended_priority_queue.test.cpp ├── dynamic_sequence │ └── .gitignore ├── fenwick_tree │ ├── compressed_fenwick_tree │ │ └── .gitignore │ ├── compressed_fenwick_tree_prefix │ │ ├── .gitignore │ │ └── abc266_h.test.cpp │ ├── fenwick_tree │ │ ├── .gitignore │ │ ├── DSL_2_B.test.cpp │ │ └── point_add_range_sum.test.cpp │ ├── fenwick_tree_2d │ │ ├── .gitignore │ │ └── random_is.test.cpp │ ├── fenwick_tree_2d_sparse │ │ ├── .gitignore │ │ ├── point_add_rectangle_sum.test.cpp │ │ └── rectangle_sum.test.cpp │ ├── fenwick_tree_prefix │ │ └── .gitignore │ ├── fenwick_tree_set │ │ └── .gitignore │ ├── offline_rectangle_add_point_get │ │ ├── .gitignore │ │ └── rectangle_add_point_get.test.cpp │ ├── persistent_fenwick_tree │ │ ├── .gitignore │ │ ├── abc253_f.test.cpp │ │ └── rectangle_sum.test.cpp │ ├── rectangle_add_rectangle_sum │ │ ├── .gitignore │ │ ├── dummy.test.cpp │ │ └── static_rectangle_add_rectangle_sum.test.cpp │ └── static_rectangle_add_rectangle_sum │ │ ├── .gitignore │ │ ├── dummy.test.cpp │ │ └── static_rectangle_add_rectangle_sum.test.cpp ├── heap │ ├── binary_heap │ │ └── .gitignore │ ├── heap_tag │ │ └── .gitignore │ └── interval_heap │ │ ├── .gitignore │ │ └── double_ended_priority_queue.test.cpp ├── internal_splay_tree │ └── .gitignore ├── lazy_eval_dynamic_sequence │ ├── .gitignore │ └── dynamic_sequence_range_affine_range_sum.test.cpp ├── lazy_eval_map │ ├── .gitignore │ └── leq_and_neq.test.cpp ├── monotonic_convex_hull_trick │ ├── .gitignore │ ├── EDPC_Z_max_dec.test.cpp │ ├── EDPC_Z_max_inc.test.cpp │ ├── EDPC_Z_max_nonmonotonic.test.cpp │ ├── EDPC_Z_min_dec.test.cpp │ ├── EDPC_Z_min_inc.test.cpp │ ├── EDPC_Z_min_nonmonotonic.test.cpp │ └── abc228_h.test.cpp ├── permutation_tree │ ├── .gitignore │ └── common_interval_decomposition_tree.test.cpp ├── persistent_array │ └── .gitignore ├── priority_queue │ └── .gitignore ├── queue_aggregation │ └── .gitignore ├── range_foldable_dynamic_sequence │ └── .gitignore ├── range_foldable_map │ └── .gitignore ├── segment_tree │ ├── commutative_dual_segment_tree │ │ ├── .gitignore │ │ ├── DSL_2_E.test.cpp │ │ └── rectilinear_polygons.test.cpp │ ├── compressed_segment_tree │ │ ├── .gitignore │ │ ├── abc266_h.test.cpp │ │ └── abc266_h_2.test.cpp │ ├── dual_segment_tree │ │ ├── .gitignore │ │ ├── DSL_2_D.test.cpp │ │ ├── DSL_2_E.test.cpp │ │ ├── range_affine_point_get.test.cpp │ │ └── rectilinear_polygons.test.cpp │ ├── lazy_segment_tree │ │ ├── .gitignore │ │ ├── DSL_2_F.test.cpp │ │ ├── DSL_2_G.test.cpp │ │ ├── DSL_2_H.test.cpp │ │ └── DSL_2_I.test.cpp │ ├── li_chao_segment_tree │ │ ├── .gitignore │ │ ├── line_add_get_min.test.cpp │ │ └── segment_add_get_min.test.cpp │ ├── persistent_commutative_dual_segment_tree │ │ ├── .gitignore │ │ └── abc253.test.cpp │ ├── persistent_dual_segment_tree │ │ ├── .gitignore │ │ └── abc253.test.cpp │ ├── persistent_lazy_segment_tree │ │ ├── .gitignore │ │ ├── abc253.test.cpp │ │ └── dummy.test.cpp │ ├── persistent_segment_tree │ │ ├── .gitignore │ │ ├── abc253_f.test.cpp │ │ ├── dummy.test.cpp │ │ └── rectangle_sum.test.cpp │ ├── segment_tree │ │ ├── .gitignore │ │ ├── DSL_2_A.test.cpp │ │ ├── DSL_2_B.test.cpp │ │ └── point_add_range_sum.test.cpp │ ├── segment_tree_2d │ │ ├── .gitignore │ │ └── point_add_range_sum.test.cpp │ ├── segment_tree_2d_sparse │ │ ├── .gitignore │ │ ├── point_add_rectangle_sum.test.cpp │ │ └── rectangle_sum.test.cpp │ ├── segment_tree_beats │ │ ├── .gitignore │ │ ├── abc256_Ex.test.cpp │ │ └── yuki880.test.cpp │ ├── sortable_segment_tree │ │ ├── .gitignore │ │ ├── abc237_g.test.cpp │ │ └── point_set_range_sort_range_composite.test.cpp │ ├── sparse_lazy_segment_tree │ │ ├── .gitignore │ │ ├── abc255_Ex.test.cpp │ │ └── arc115_e.test.cpp │ └── sparse_segment_tree │ │ └── .gitignore ├── sliding_window_minimum │ ├── .gitignore │ └── DSL_3_D.test.cpp ├── slope_trick │ ├── .gitignore │ ├── absolute_minima.test.cpp │ ├── inc_dec_decomposition.test.cpp │ └── narrow_rectangles.test.cpp ├── sparse_table │ └── .gitignore ├── splay_tree_map │ └── .gitignore ├── splay_tree_set │ └── .gitignore ├── union_find │ ├── linked_union_find │ │ ├── .gitignore │ │ └── past202203_h.test.cpp │ ├── merge_history_forest │ │ ├── .gitignore │ │ └── abc235_h.test.cpp │ ├── persistent_union_find │ │ ├── .gitignore │ │ └── persistent_unionfind.test.cpp │ ├── undo_union_find │ │ └── .gitignore │ ├── undo_union_find_component_sum │ │ └── .gitignore │ ├── union_find │ │ ├── .gitignore │ │ ├── DSL_1_A.test.cpp │ │ └── unionfind.test.cpp │ ├── union_find_component_sum │ │ ├── .gitignore │ │ └── abc183_f.test.cpp │ ├── union_find_lazy │ │ └── .gitignore │ └── weighted_union_find │ │ ├── .gitignore │ │ └── DSL_1_B.test.cpp ├── util │ ├── dynamic_bitset │ │ ├── .gitignore │ │ └── dummy.test.cpp │ ├── priority_sum │ │ ├── .gitignore │ │ └── agc018_c.test.cpp │ ├── range_set │ │ ├── .gitignore │ │ ├── DSL_2_D.test.cpp │ │ ├── DSL_4_A.test.cpp │ │ └── yuki674.test.cpp │ └── static_bitset │ │ └── .gitignore └── wavelet_matrix │ ├── .gitignore │ ├── dummy.test.cpp │ ├── range_kth_smallest.test.cpp │ ├── static_range_frequency.test.cpp │ └── static_rmq.test.cpp ├── debug ├── suffix_automaton │ └── .gitignore ├── tree │ └── .gitignore └── warning │ └── .gitignore ├── dp ├── grid_connectivity │ └── .gitignore ├── longest_increasing_subsequence │ ├── .gitignore │ ├── longest_increasing_subsequence.test.cpp │ └── longest_increasing_subsequence_2.test.cpp └── number_of_subsequences │ ├── .gitignore │ └── number_of_subsequences.test.cpp ├── geom ├── closest_pair │ ├── .gitignore │ └── CGL_5_A.test.cpp ├── convex_hull │ ├── .gitignore │ └── CGL_4_A.test.cpp ├── geometry │ ├── .gitignore │ ├── CGL_1_A.test.cpp │ ├── CGL_1_B.test.cpp │ ├── CGL_1_C.test.cpp │ ├── CGL_2_A.test.cpp │ ├── CGL_2_B.test.cpp │ ├── CGL_2_C.test.cpp │ ├── CGL_2_D.test.cpp │ ├── CGL_3_A.test.cpp │ ├── CGL_3_B.test.cpp │ ├── CGL_3_C.test.cpp │ ├── CGL_4_B.test.cpp │ ├── CGL_4_C.test.cpp │ ├── CGL_7_A.test.cpp │ ├── CGL_7_B.test.cpp │ ├── CGL_7_C.test.cpp │ ├── CGL_7_D.test.cpp │ ├── CGL_7_E.test.cpp │ ├── CGL_7_F.test.cpp │ ├── CGL_7_G.test.cpp │ ├── CGL_7_H.test.cpp │ └── CGL_7_I.test.cpp ├── geometry3d │ └── .gitignore └── segment_intersections │ ├── .gitignore │ └── CGL_6_A.test.cpp ├── graph ├── assignment_problem │ ├── .gitignore │ └── assignment.test.cpp ├── bfs │ └── .gitignore ├── bfs01 │ └── .gitignore ├── bfs_complement │ ├── .gitignore │ └── AOJ_2744.test.cpp ├── biconnected_components │ ├── .gitignore │ └── biconnected_components.test.cpp ├── bipartite_graph_recognition │ └── .gitignore ├── bipartite_matching │ ├── .gitignore │ └── bipartite_matching.test.cpp ├── block_cut_forest │ └── .gitignore ├── chromatic_number │ └── .gitignore ├── csr_graph │ ├── .gitignore │ └── dummy.test.cpp ├── cycle_detection │ ├── .gitignore │ ├── cycle_detection.test.cpp │ ├── cycle_detection_undirected.test.cpp │ └── dummy.test.cpp ├── dijkstra │ └── .gitignore ├── directed_eulerian_graph │ ├── .gitignore │ └── eulerian_trail_directed.test.cpp ├── dulmage_mendelsohn_decomposition │ ├── .gitignore │ ├── abc223_g.test.cpp │ ├── yuki1744.test.cpp │ └── yuki1745.test.cpp ├── edge_coloring_of_bipartite_graph │ ├── .gitignore │ └── bipartite_edge_coloring.test.cpp ├── enumerate_cliques │ ├── .gitignore │ └── enumerate_cliques.test.cpp ├── enumerate_triangles │ ├── .gitignore │ ├── abc258_g.test.cpp │ └── enumerate_triangles.test.cpp ├── functional_graph │ ├── .gitignore │ ├── abc254_g.test.cpp │ ├── abc258_e.test.cpp │ └── dummy.test.cpp ├── graph │ └── .gitignore ├── kruscal │ └── .gitignore ├── low_link │ ├── .gitignore │ ├── abc334_g.test.cpp │ ├── articulation_points.test.cpp │ ├── bridges.test.cpp │ └── dummy.test.cpp ├── manhattan_minimum_distances │ └── .gitignore ├── manhattan_mst │ ├── .gitignore │ └── manhattanmst.test.cpp ├── maximum_clique │ └── .gitignore ├── maximum_independent_set │ ├── .gitignore │ └── maximum_independent_set.test.cpp ├── min_cost_flow │ ├── .gitignore │ ├── abc214_h.test.cpp │ └── min_cost_flow.test.cpp ├── minimum_vertex_cover │ └── .gitignore ├── minmax_floyd_warshall │ ├── .gitignore │ └── abc287_h.test.cpp ├── remove_multiedges │ └── .gitignore ├── scc_tournament │ └── .gitignore ├── segment_tree_graph │ ├── .gitignore │ └── flags.test.cpp ├── single_source_shortest_path_dag │ └── .gitignore ├── topological_sort │ └── .gitignore ├── tree_decomposition_tw2 │ ├── .gitignore │ ├── nice_tree_decomposition_width_2.test.cpp │ └── tree_decomposition_width_2.test.cpp ├── tree_decomposition_tw2_dp │ ├── .gitignore │ └── AOJ2405.test.cpp ├── two_edge_connected_components │ ├── .gitignore │ └── two_edge_connected_components.test.cpp └── undirected_eulerian_graph │ ├── .gitignore │ └── eulerian_trail_undirected.test.cpp ├── icpc └── parsing │ └── .gitignore ├── integral_geom ├── closest_pair │ ├── .gitignore │ └── AOJ_0585.test.cpp ├── convex_hull │ ├── .gitignore │ └── CGL_4_A.test.cpp ├── convex_hull_inclusion │ └── .gitignore ├── count_lattice_point │ ├── .gitignore │ └── yuki1999.test.cpp ├── farthest_pair │ └── .gitignore ├── geometry │ ├── .gitignore │ ├── CGL_1_C.test.cpp │ ├── CGL_2_A.test.cpp │ ├── CGL_2_B.test.cpp │ ├── CGL_3_A.test.cpp │ ├── CGL_3_B.test.cpp │ ├── CGL_3_C.test.cpp │ ├── CGL_7_A.test.cpp │ └── abc259_d.test.cpp ├── inclusion │ └── .gitignore ├── point │ └── .gitignore └── sort_points_by_argument │ ├── .gitignore │ └── sort_points_by_argument.test.cpp ├── io ├── input_stream │ └── .gitignore └── output_stream │ └── .gitignore ├── linear_algebra ├── array_matrix │ ├── .gitignore │ ├── abc258_ex.test.cpp │ ├── inverse_matrix.test.cpp │ ├── matrix_det.test.cpp │ └── matrix_det_arbitrary_mod.test.cpp ├── characteristic_polynomial │ ├── .gitignore │ └── characteristic_polynomial.test.cpp ├── circulant_matrix │ ├── .gitignore │ └── arc139_e.test.cpp ├── count_spanning_trees │ └── .gitignore ├── gaussian_elimination │ ├── .gitignore │ └── system_of_linear_equations.test.cpp ├── gaussian_elimination_f2 │ └── .gitignore ├── hafnian │ ├── .gitignore │ └── hafnian_of_matrix.test.cpp ├── hessenberg_reduction │ └── .gitignore ├── matrix │ ├── .gitignore │ ├── inverse_matrix.test.cpp │ ├── matrix_det.test.cpp │ ├── matrix_det_arbitrary_mod.test.cpp │ └── matrix_product.test.cpp ├── matrix_f2 │ └── .gitignore └── xor_base │ ├── .gitignore │ └── AOJ_3277.test.cpp ├── math ├── array_set_power_series │ ├── .gitignore │ ├── abc213_g.test.cpp │ ├── abc236_h.test.cpp │ ├── abc253_h.test.cpp │ ├── abc253_h_2.test.cpp │ └── arc105_f.test.cpp ├── bigint │ ├── .gitignore │ ├── NTL_2_A.test.cpp │ ├── NTL_2_B.test.cpp │ ├── NTL_2_D.test.cpp │ ├── NTL_2_E.test.cpp │ ├── NTL_2_F.test.cpp │ ├── addition_of_big_integers.test.cpp │ ├── many_aplusb_128bit.test.cpp │ └── multiplication_of_big_integers.test.cpp ├── binomial_coefficient_sum │ ├── .gitignore │ └── yuki2512.test.cpp ├── factorial │ ├── .gitignore │ └── binomial_coefficient_prime_mod.test.cpp ├── factorial_embeded │ └── .gitignore ├── factorial_large │ ├── .gitignore │ ├── dummy.test.cpp │ ├── factorial.test.cpp │ ├── many_factorials.test.cpp │ └── yuki502.cpp ├── inv_mods │ └── .gitignore ├── modint_extension │ └── .gitignore ├── pow_mods │ └── .gitignore ├── product_of_differences │ ├── .gitignore │ └── yuki1938.test.cpp ├── set_power_series │ ├── .gitignore │ ├── abc213_g.test.cpp │ ├── abc236_h.test.cpp │ ├── abc253_h.test.cpp │ ├── abc253_h_2.test.cpp │ ├── arc105_f.test.cpp │ ├── exp_of_set_power_series.test.cpp │ └── polynomial_composite_set_power_series.test.cpp ├── sum_i^d_r^i │ ├── .gitignore │ ├── sum_of_exponential_times_polynomial.test.cpp │ └── sum_of_exponential_times_polynomial_limit.test.cpp ├── unsigned_bigint │ └── .gitignore └── util │ ├── .gitignore │ └── abc240_g.test.cpp ├── number ├── barrett_reduction │ └── .gitignore ├── bezout_equation │ └── .gitignore ├── count_square_free │ ├── .gitignore │ └── counting_squarefrees.test.cpp ├── deterministic_miller_rabin │ ├── .gitignore │ └── primality_test.test.cpp ├── deterministic_miller_rabin_simd │ └── .gitignore ├── discrete_logarithm │ ├── .gitignore │ └── discrete_logarithm_mod.test.cpp ├── enumerate_quotient │ ├── .gitignore │ ├── divide_both.test.cpp │ └── enumerate_quotients.test.cpp ├── ext_gcd │ └── .gitignore ├── factorial_number │ └── .gitignore ├── factorized_form │ └── .gitignore ├── fast_discrete_logarithm │ └── .gitignore ├── fast_factorize │ ├── .gitignore │ └── factorize.test.cpp ├── find_denominators │ ├── .gitignore │ └── dummy.test.cpp ├── garner │ └── .gitignore ├── internal_eratosthenes │ └── .gitignore ├── kth_root_round │ ├── .gitignore │ └── kth_root_integer.test.cpp ├── linear_sieve │ └── .gitignore ├── min_of_mod_of_linear │ ├── .gitignore │ └── min_of_mod_of_linear.test.cpp ├── mobius_function │ └── .gitignore ├── mod_sqrt │ ├── .gitignore │ └── dummy.test.cpp ├── modint │ └── .gitignore ├── modint_2^61m1 │ └── .gitignore ├── montogomery │ └── .gitignore ├── order_Z_mZ │ └── .gitignore ├── primitive_root │ ├── .gitignore │ ├── dummy.test.cpp │ └── primitive_root.test.cpp ├── rational │ └── .gitignore ├── sieve_of_eratosthenes │ ├── .gitignore │ ├── enumerate_primes.test.cpp │ ├── flatten.test.cpp │ └── next_prime.test.cpp ├── sieve_of_eratosthenes_constexpr │ ├── .gitignore │ ├── flatten.test.cpp │ └── next_prime.test.cpp ├── stern_brocot_tree │ ├── .gitignore │ ├── abc273_h.test.cpp │ └── stern_brocot_tree.test.cpp ├── sum_of_mobius_function │ └── .gitignore ├── sum_of_totient_function │ ├── .gitignore │ ├── abc162_e.test.cpp │ └── sum_of_totient_function.test.cpp ├── tetration_mod │ ├── .gitignore │ └── tetration_mod.test.cpp └── util │ ├── .gitignore │ └── abc222_g.test.cpp ├── optimization ├── alien_dp │ ├── .gitignore │ ├── abc218_h_1.test.cpp │ ├── abc218_h_2.test.cpp │ ├── arc168_e_1.test.cpp │ └── arc168_e_2.test.cpp ├── k_project_selection_problem │ ├── .gitignore │ └── arc129_e.test.cpp └── project_selection_problem │ ├── .gitignore │ └── arc085_c.test.cpp ├── polynomial ├── array_fps_naive │ └── .gitignore ├── berlekamp_massey │ ├── .gitignore │ └── find_linear_recurrence.test.cpp ├── bostan_mori │ ├── .gitignore │ ├── kth_term_of_linearly_recurrent_sequence.test.cpp │ └── kth_term_of_linearly_recurrent_sequence_2.test.cpp ├── compose │ ├── .gitignore │ ├── composition_of_formal_power_series.test.cpp │ └── dummy.test.cpp ├── compose_exp │ ├── .gitignore │ └── arc154_f.test.cpp ├── compose_inv │ ├── .gitignore │ └── compositional_inverse_of_formal_power_series.test.cpp ├── convert_to_newton_basis │ ├── .gitignore │ └── conversion_from_monomial_basis_to_newton_basis.test.cpp ├── formal_power_series │ ├── .gitignore │ ├── division_of_polynomials.test.cpp │ ├── exp_of_formal_power_series_sparse.test.cpp │ ├── exp_of_fps.test.cpp │ ├── inv_of_formal_power_series_sparse.test.cpp │ ├── inv_of_fps.test.cpp │ ├── log_of_formal_power_series_sparse.test.cpp │ ├── log_of_fps.test.cpp │ ├── pow_of_formal_power_series_sparse.test.cpp │ ├── pow_of_fps.test.cpp │ ├── product_of_polynomial_sequence.test.cpp │ ├── sqrt_of_formal_power_series.test.cpp │ └── sqrt_of_formal_power_series_sparse.test.cpp ├── formal_power_series_relaxed │ ├── .gitignore │ ├── exp_of_formal_power_series.test.cpp │ ├── inv_of_formal_power_series.test.cpp │ ├── log_of_formal_power_series.test.cpp │ ├── pow_of_formal_power_series.test.cpp │ └── sqrt_of_formal_power_series.test.cpp ├── fps │ ├── .gitignore │ ├── division_of_polynomials.test.cpp │ ├── exp_of_formal_power_series_sparse.test.cpp │ ├── exp_of_fps.test.cpp │ ├── inv_of_formal_power_series_sparse.test.cpp │ ├── inv_of_fps.test.cpp │ ├── log_of_formal_power_series_sparse.test.cpp │ ├── log_of_fps.test.cpp │ ├── pow_of_formal_power_series_sparse.test.cpp │ ├── pow_of_fps.test.cpp │ ├── sqrt_of_formal_power_series.test.cpp │ └── sqrt_of_formal_power_series_sparse.test.cpp ├── fps_naive │ ├── .gitignore │ └── abc245_d.test.cpp ├── lagrange_interpolation │ ├── .gitignore │ ├── cumulative_sum.test.cpp │ ├── dummy.test.cpp │ └── dummy_2.test.cpp ├── multi_point_eval │ ├── .gitignore │ ├── multi_point_evaluation.test.cpp │ └── multi_point_evaluation_2.test.cpp ├── polynomial_gcd │ ├── .gitignore │ └── inv_of_polynomials.test.cpp ├── polynomial_interpolation │ ├── .gitignore │ ├── polynomial_interpolation.test.cpp │ └── polynomial_interpolation_2.test.cpp ├── polynomial_taylor_shift │ ├── .gitignore │ ├── polynomial_taylor_shift.test.cpp │ └── polynomial_taylor_shift_2.test.cpp ├── prod_f(r^k_x) │ ├── .gitignore │ └── yuki2097.test.cpp ├── rational_fps │ └── .gitignore ├── rook_polynomial │ ├── .gitignore │ ├── abc272_h.test.cpp │ └── dummy.test.cpp ├── shift_of_sampling_points │ ├── .gitignore │ └── shift_of_sampling_points_of_polynomial.test.cpp ├── subset_sum │ ├── .gitignore │ ├── p_subset_sum.test.cpp │ └── p_subset_sum_2.test.cpp └── vec_sparse_fps │ └── .gitignore ├── range_query ├── range_chmin_chmax_add_range_sum │ ├── .gitignore │ └── range_chmin_chmax_add_range_sum.test.cpp ├── range_set_range_composite │ ├── .gitignore │ └── range_set_range_composite.test.cpp ├── static range_count_distinct │ ├── .gitignore │ └── static_range_count_distinct.test.cpp ├── static_range_inversion_number_query │ ├── .gitignore │ └── static_range_inversions_query.test.cpp ├── static_range_mode_query │ ├── .gitignore │ └── static_range_mode_query.test.cpp └── static_range_xored_mex_query │ ├── .gitignore │ └── dummy.test.cpp ├── sequence ├── bell_number │ └── .gitignore ├── bernoulli_number │ ├── .gitignore │ ├── bernoulli_number.test.cpp │ └── bernoulli_number_2.test.cpp ├── binomial_coefficient │ ├── .gitignore │ └── binomial_coefficient.test.cpp ├── binomial_coefficient_small_prime_mod │ └── .gitignore ├── binomial_coefficient_small_r_offline │ └── .gitignore ├── binomial_coefficitnt_enumeration │ └── .gitignore ├── eulerian_number │ ├── .gitignore │ ├── yuki2005-2-2.test.cpp │ ├── yuki2005-2.test.cpp │ └── yuki2005.test.cpp ├── montmort_number │ ├── .gitignore │ └── montmort_number_mod.test.cpp ├── partition_number │ ├── .gitignore │ ├── partition_function.test.cpp │ └── partition_function_2.test.cpp ├── powers │ └── .gitignore ├── stirling_number1 │ ├── .gitignore │ ├── abc247_h.test.cpp │ ├── stirling_number1.test.cpp │ └── stirling_number1_2.test.cpp ├── stirling_number1_small_prime_mod │ ├── .gitignore │ └── stirling_number_of_the_first_kind_small_p_large_n.test.cpp ├── stirling_number2 │ ├── .gitignore │ ├── stirling_number2.test.cpp │ └── stirling_number2_2.test.cpp ├── stirling_number2_small_prime_mod │ ├── .gitignore │ └── stirling_number_of_the_second_kind_small_p_large_n.test.cpp └── sum_of_powers │ └── .gitignore ├── string ├── aho_corasick │ ├── .gitignore │ └── abc268_h.test.cpp ├── aho_corasick_array │ ├── .gitignore │ └── abc268_h.test.cpp ├── compare_substring │ ├── .gitignore │ ├── abc141_e.test.cpp │ ├── dummy.test.cpp │ ├── string_search.test.cpp │ └── substring.test.cpp ├── dynamic_rolling_hash │ └── .gitignore ├── manacher │ ├── .gitignore │ └── enumerate_palindromes.test.cpp ├── morris_pratt │ └── .gitignore ├── palindromic_tree │ ├── .gitignore │ ├── abc237_h.test.cpp │ └── yuki263.test.cpp ├── rolling_hash │ ├── .gitignore │ └── abc141_e.test.cpp ├── rolling_hash_field │ └── .gitignore ├── run_enumerate │ ├── .gitignore │ └── runenumerate.test.cpp ├── substring_set │ ├── .gitignore │ ├── arc097_a.test.cpp │ └── number_of_substrings.test.cpp ├── suffix_automaton │ ├── .gitignore │ ├── longest_common_substring.test.cpp │ └── yuki430.test.cpp ├── trie_array │ └── .gitignore └── trie_map │ └── .gitignore ├── template └── .gitignore ├── transform ├── chirp_z_transform │ └── .gitignore ├── divisor │ └── .gitignore ├── kronecker │ └── .gitignore ├── kronecker_power │ ├── .gitignore │ ├── agc044_c.test.cpp │ └── arc132_f.test.cpp ├── multiple │ ├── .gitignore │ └── divide_both.test.cpp ├── subset │ └── .gitignore ├── supset │ └── .gitignore └── walsh_hadamard │ └── .gitignore ├── tree ├── auxiliary_tree │ └── .gitignore ├── centroid_decomposition │ └── .gitignore ├── contour_sum │ └── .gitignore ├── euler_tour │ ├── .gitignore │ ├── lowest_common_ancestor.test.cpp │ ├── vertex_add_path_sum.test.cpp │ └── vertex_add_subtree_sum.test.cpp ├── find_centroid │ └── .gitignore ├── frequency_table_of_tree_distance │ ├── .gitignore │ └── frequency_table_of_tree_distance.test.cpp ├── get_path │ └── .gitignore ├── heavy_light_decomposition │ ├── .gitignore │ ├── do_use_segment_tree.test.cpp │ ├── jump_on_tree.test.cpp │ ├── la_based_lowest_common_ancestor.test.cpp │ ├── lowest_common_ancestor.test.cpp │ ├── vertex_add_path_composite.test.cpp │ ├── vertex_add_path_sum.test.cpp │ └── vertex_add_subtree_sum.test.cpp ├── level_ancestor │ ├── .gitignore │ ├── jump_on_tree.test.cpp │ └── lowest_common_ancestor.test.cpp ├── link_cut_tree │ ├── .gitignore │ └── lca.test.cpp ├── link_cut_tree_base │ └── .gitignore ├── link_cut_tree_path_foldable │ ├── .gitignore │ ├── dummy1.test.cpp │ ├── dynamic_tree_vertex_add_path_sum.test.cpp │ ├── dynamic_tree_vertex_set_path_composite.test.cpp │ └── lca.test.cpp ├── link_cut_tree_path_foldable_lazy │ ├── .gitignore │ ├── GRL_5_E.test.cpp │ ├── dummy1.test.cpp │ └── yuki399.test.cpp ├── lowest_common_anceestor │ ├── .gitignore │ └── lowest_common_anceestor.test.cpp ├── lowest_common_ancestor │ └── .gitignore ├── point_add_range_contour_sum │ ├── .gitignore │ └── vertex_add_range_contour_sum_on_tree.test.cpp ├── point_add_range_contour_sum_invertible │ ├── .gitignore │ └── vertex_add_range_contour_sum_on_tree.test.cpp ├── point_get_range_contour_add_invertible │ ├── .gitignore │ ├── vertex_get_range_contour_add_on_tree.test.cpp │ └── yuki1038.test.cpp ├── point_get_range_contour_operate │ ├── .gitignore │ ├── vertex_get_range_contour_add_on_tree.test.cpp │ └── yuki1038.test.cpp ├── point_set_range_contour_sum │ ├── .gitignore │ ├── dummy.test.cpp │ └── vertex_add_range_contour_sum_on_tree.test.cpp ├── range_contour_sum_invertible │ └── .gitignore ├── rerooting │ ├── .gitignore │ ├── abc160_f.test.cpp │ ├── abc222_f.test.cpp │ ├── edpc_v.test.cpp │ └── tree_path_composite_sum.test.cpp ├── rerooting_invertible │ ├── .gitignore │ └── abc160_f.test.cpp └── tree_isomorphism_classification │ ├── .gitignore │ └── rooted_tree_isomorphism_classification.test.cpp ├── type_traits ├── operator │ └── .gitignore └── type_traits │ └── .gitignore └── util ├── bit_utils └── .gitignore ├── container_utils └── .gitignore ├── coordinate_compressor ├── .gitignore └── dummy.test.cpp ├── cumulative_sum └── .gitignore ├── cumulative_sum_2d └── .gitignore ├── default_operator └── .gitignore ├── default_vector └── .gitignore ├── grid_utils └── .gitignore ├── hashes └── .gitignore ├── iter_util └── .gitignore ├── object_pool └── .gitignore ├── pair_ops └── .gitignore ├── permutation └── .gitignore ├── pointer_32bit └── .gitignore ├── rot90 └── .gitignore ├── run_length_encoder └── .gitignore ├── search └── .gitignore ├── step_sum ├── .gitignore └── dummy.test.cpp ├── step_view └── .gitignore ├── subset_iterator ├── .gitignore ├── dummy_all_setbit.test.cpp ├── dummy_all_subset.test.cpp └── dummy_all_subset_k.test.cpp ├── sum_count └── .gitignore ├── timer └── .gitignore ├── transpose └── .gitignore ├── tuple_ops └── .gitignore ├── update_proxy_object └── .gitignore ├── variant_utils └── .gitignore ├── vector_ops └── .gitignore └── zobrist_hash └── .gitignore /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/* 2 | /**/combined.cpp 3 | .verify-helper/_config.toml 4 | library/experimental 5 | test/src/experimental -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ac-library"] 2 | path = ac-library 3 | url = https://github.com/atcoder/ac-library 4 | -------------------------------------------------------------------------------- /.verify-helper/config.toml: -------------------------------------------------------------------------------- 1 | [[languages.cpp.environments]] 2 | CXX = "g++" 3 | CXXFLAGS = ["-I", "ac-library", "-std=gnu++17", "-Wall", "-O2"] 4 | -------------------------------------------------------------------------------- /.verify-helper/docs/_config.yml: -------------------------------------------------------------------------------- 1 | exclude: [scripts/, ac-library/] -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cp-library-cpp 2 | 3 | [![Actions Status](https://github.com/suisen-cp/cp-library-cpp/workflows/verify/badge.svg)](https://github.com/suisen-cp/cp-library-cpp/actions) [![GitHub Pages](https://img.shields.io/static/v1?label=GitHub+Pages&message=+&color=brightgreen&logo=github)](https://suisen-cp.github.io/cp-library-cpp/) 4 | 5 | C++ library for competitive programming. Some libraries require [AtCoder Library (ACL)](https://github.com/atcoder/ac-library). 6 | 7 | ## LICENSE 8 | 9 | [CC0](https://creativecommons.org/publicdomain/zero/1.0/legalcode) 10 | -------------------------------------------------------------------------------- /docs/algebra/field/nimber.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Nimber 3 | documentation_of: //library/algebra/field/nimber.hpp 4 | --- 5 | ## Nimber 6 | -------------------------------------------------------------------------------- /docs/algebra/monoid/affine.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Affine 3 | documentation_of: //library/algebra/monoid/affine.hpp 4 | --- 5 | ## Affine -------------------------------------------------------------------------------- /docs/algebra/monoid/affine_clamp.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Affine Clamp 3 | documentation_of: //library/algebra/monoid/affine_clamp.hpp 4 | --- 5 | ## Affine Clamp -------------------------------------------------------------------------------- /docs/algorithm/area_of_union_of_rectangles.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Area Of Union Of Rectangles 3 | documentation_of: //library/algorithm/area_of_union_of_rectangles.hpp 4 | --- 5 | ## Area Of Union Of Rectangles 6 | -------------------------------------------------------------------------------- /docs/algorithm/dynamic_convex_hull_offline.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 動的凸包 3 | documentation_of: //library/algorithm/dynamic_convex_hull_offline.hpp 4 | --- 5 | 6 | ## 動的凸包 7 | 8 | 点の追加・削除をしながら凸包を管理する。操作列に現れる点の $x$ 座標を予め与える必要がある (与えなくても出来るはずだけど、かなり面倒...) 9 | -------------------------------------------------------------------------------- /docs/algorithm/inversion_number.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Inversion Number 3 | documentation_of: //library/algorithm/inversion_number.hpp 4 | --- 5 | ## Inversion Number 6 | -------------------------------------------------------------------------------- /docs/algorithm/maximum_rectangle.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Maximum Rectangle 3 | documentation_of: //library/algorithm/maximum_rectangle.hpp 4 | --- 5 | ## Maximum Rectangle 6 | -------------------------------------------------------------------------------- /docs/algorithm/maximum_square.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Maximum Square 3 | documentation_of: //library/algorithm/maximum_square.hpp 4 | --- 5 | ## Maximum Square 6 | -------------------------------------------------------------------------------- /docs/algorithm/monotone_minima.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Monotone Minima 3 | documentation_of: //library/algorithm/monotone_minima.hpp 4 | --- 5 | ## Monotone Minima 6 | -------------------------------------------------------------------------------- /docs/algorithm/offline_dynamic_connectivity.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Offline Dynamic Connectivity 3 | documentation_of: //library/algorithm/offline_dynamic_connectivity.hpp 4 | --- 5 | ## Offline Dynamic Connectivity 6 | 7 | Dynamic Conectivity Problem をクエリ先読みにより $O(Q \log Q \log N)$ 時間で解く。時間軸を添字とした双対セグ木のノードに辺を乗せ、セグ木を dfs しながら Union Find を更新する。dfs の帰りがけで undo 操作をする必要があるので、Undo 可能 Union Find を用いる。 8 | 9 | 各辺は $O(\log Q)$ 個のノードに存在するので、Union Find の操作回数は $O(Q\log Q)$ 回である。Undo 可能 Union Find の各種操作の計算量は経路圧縮を行わないため $O(\log N)$ であるから、全体の計算量は $O(Q \log Q \log N)$ となる。 10 | -------------------------------------------------------------------------------- /docs/algorithm/offline_dynamic_connectivity_component_sum.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 連結成分の可換モノイド和取得クエリがある場合の Offline Dynamic Connectivity 3 | documentation_of: //library/algorithm/offline_dynamic_connectivity_component_sum.hpp 4 | --- 5 | ## 連結成分の可換モノイド和取得クエリがある場合の Offline Dynamic Connectivity 6 | 7 | Offline Dynamic Connectivity で用いる Undo 可能 Union Find に連結成分の和を持たせることで実現する。 8 | -------------------------------------------------------------------------------- /docs/algorithm/rmq_pm1.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 隣接要素の差が $\pm 1$ の場合の RMQ 3 | documentation_of: //library/algorithm/rmq_pm1.hpp 4 | --- 5 | ## 隣接要素の差が $\pm 1$ の場合の RMQ 6 | -------------------------------------------------------------------------------- /docs/algorithm/rmq_pm1_with_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 隣接要素の差が $\pm 1$ の場合の RMQ (添字の復元付き) 3 | documentation_of: //library/algorithm/rmq_pm1_with_index.hpp 4 | --- 5 | ## 隣接要素の差が $\pm 1$ の場合の RMQ (添字の復元付き) 6 | 7 | $$ LCA に用いる。 8 | -------------------------------------------------------------------------------- /docs/algorithm/two_sat.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Two Sat 3 | documentation_of: //library/algorithm/two_sat.hpp 4 | --- 5 | ## Two Sat 6 | 7 | `atcoder::two_sat` のラッパー。便利関数を幾つか定義している。 8 | -------------------------------------------------------------------------------- /docs/convolution/array_subset_convolution.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Array Subset Convolution 3 | documentation_of: //library/convolution/array_subset_convolution.hpp 4 | --- 5 | ## Array Subset Convolution -------------------------------------------------------------------------------- /docs/convolution/convolution_large.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Convolution (Large) 3 | documentation_of: //library/convolution/convolution_large.hpp 4 | --- 5 | ## Convolution (Large) 6 | 7 | $\mathrm{mod}\ p$ における $1$ の $2 ^ k$ 乗根が存在しない場合に、列を分割して畳み込む。 8 | -------------------------------------------------------------------------------- /docs/convolution/convolution_naive.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Naive Convolution 3 | documentation_of: //library/convolution/convolution_naive.hpp 4 | --- 5 | ## Naive Convolution 6 | 7 | 愚直な畳み込みの実装です。列の一方の次数が小さい場合は、こちらを用いる方が高速な場合があります。 8 | -------------------------------------------------------------------------------- /docs/convolution/min_plus_convolution.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Min Plus Convolution 3 | documentation_of: //library/convolution/min_plus_convolution.hpp 4 | --- 5 | ## Min Plus Convolution 6 | -------------------------------------------------------------------------------- /docs/convolution/multi_variate_convolution.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 多変数畳み込み (切り捨て) 3 | documentation_of: //library/convolution/multi_variate_convolution.hpp 4 | --- 5 | ## 多変数畳み込み (切り捨て) 6 | 7 | [Multivariate Convolution](https://judge.yosupo.jp/problem/multivariate_convolution) を解きます。 8 | 9 | ## 参考文献 10 | 11 | - [多変数畳み込み(切り捨て)のアルゴリズム](https://37zigen.com/truncated-multivariate-convolution/) 12 | -------------------------------------------------------------------------------- /docs/convolution/relaxed_convolution.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Relaxed Convolution 3 | documentation_of: //library/convolution/relaxed_convolution.hpp 4 | --- 5 | ## Relaxed Convolution 6 | 7 | [オンライン畳み込み](https://qiita.com/Kiri8128/items/1738d5403764a0e26b4c) に詳しい. 8 | -------------------------------------------------------------------------------- /docs/convolution/relaxed_convolution_ntt.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Relaxed Convolution Ntt 3 | documentation_of: //library/convolution/relaxed_convolution_ntt.hpp 4 | --- 5 | ## Relaxed Convolution Ntt 6 | -------------------------------------------------------------------------------- /docs/convolution/semi_relaxed_convolution.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Semi Relaxed Convolution 3 | documentation_of: //library/convolution/semi_relaxed_convolution.hpp 4 | --- 5 | ## Semi Relaxed Convolution 6 | 7 | [オンライン畳み込み](https://qiita.com/Kiri8128/items/1738d5403764a0e26b4c) に詳しい. 8 | -------------------------------------------------------------------------------- /docs/convolution/semi_relaxed_convolution_ntt.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Semi Relaxed Convolution Ntt 3 | documentation_of: //library/convolution/semi_relaxed_convolution_ntt.hpp 4 | --- 5 | ## Semi Relaxed Convolution Ntt 6 | -------------------------------------------------------------------------------- /docs/datastructure/ZDD.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ZDD 3 | documentation_of: //library/datastructure/ZDD.hpp 4 | --- 5 | ## ZDD 6 | 7 | ゼロサプレス型二分決定グラフ。BDD の派生として考案されたデータ構造であり、組合せ集合を圧縮して表現する。 8 | -------------------------------------------------------------------------------- /docs/datastructure/bbst/implicit_treap.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Implicit Treap 3 | documentation_of: //library/datastructure/bbst/implicit_treap.hpp 4 | --- 5 | ## Implicit Treap 6 | -------------------------------------------------------------------------------- /docs/datastructure/bbst/implicit_treap_base.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Implicit Treap Base 3 | documentation_of: //library/datastructure/bbst/implicit_treap_base.hpp 4 | --- 5 | ## Implicit Treap Base 6 | -------------------------------------------------------------------------------- /docs/datastructure/bbst/implicit_treap_dual_segtree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Implicit Treap Dual Segtree 3 | documentation_of: //library/datastructure/bbst/implicit_treap_dual_segtree.hpp 4 | --- 5 | ## Implicit Treap Dual Segtree 6 | -------------------------------------------------------------------------------- /docs/datastructure/bbst/implicit_treap_lazy_segtree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Implicit Treap Lazy Segtree 3 | documentation_of: //library/datastructure/bbst/implicit_treap_lazy_segtree.hpp 4 | --- 5 | ## Implicit Treap Lazy Segtree 6 | -------------------------------------------------------------------------------- /docs/datastructure/bbst/implicit_treap_segtree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Implicit Treap Segtree 3 | documentation_of: //library/datastructure/bbst/implicit_treap_segtree.hpp 4 | --- 5 | ## Implicit Treap Segtree 6 | -------------------------------------------------------------------------------- /docs/datastructure/bbst/persistent_red_black_lazy_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 区間作用・区間和取得が可能な永続赤黒木 3 | documentation_of: //library/datastructure/bbst/persistent_red_black_lazy_segment_tree.hpp 4 | --- 5 | ## 遅延評価機能付き永続赤黒木 -------------------------------------------------------------------------------- /docs/datastructure/bbst/persistent_red_black_reversible_lazy_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 反転・区間作用・区間和取得が可能な永続赤黒木 3 | documentation_of: //library/datastructure/bbst/persistent_red_black_reversible_lazy_segment_tree.hpp 4 | --- 5 | ## 反転可能な遅延評価機能付き永続赤黒木 -------------------------------------------------------------------------------- /docs/datastructure/bbst/persistent_red_black_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 区間和取得が可能な永続赤黒木 3 | documentation_of: //library/datastructure/bbst/persistent_red_black_segment_tree.hpp 4 | --- 5 | ## 区間和の取れる永続赤黒木 -------------------------------------------------------------------------------- /docs/datastructure/bbst/persistent_red_black_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 永続赤黒木 3 | documentation_of: //library/datastructure/bbst/persistent_red_black_tree.hpp 4 | --- 5 | ## 永続赤黒木 -------------------------------------------------------------------------------- /docs/datastructure/bbst/persistent_red_black_tree_base.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Persistent Red Black Tree Base 3 | documentation_of: //library/datastructure/bbst/persistent_red_black_tree_base.hpp 4 | --- 5 | ## Persistent Red Black Tree Base -------------------------------------------------------------------------------- /docs/datastructure/bbst/red_black_lazy_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 区間作用・区間和取得が可能な赤黒木 3 | documentation_of: //library/datastructure/bbst/red_black_lazy_segment_tree.hpp 4 | --- 5 | ## 区間作用・区間和取得が可能な赤黒木 -------------------------------------------------------------------------------- /docs/datastructure/bbst/red_black_reversible_lazy_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 反転・区間作用・区間和取得が可能な赤黒木 3 | documentation_of: //library/datastructure/bbst/red_black_reversible_lazy_segment_tree.hpp 4 | --- 5 | ## 反転・区間作用・区間和取得が可能な赤黒木 -------------------------------------------------------------------------------- /docs/datastructure/bbst/red_black_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 区間和取得が可能な赤黒木 3 | documentation_of: //library/datastructure/bbst/red_black_segment_tree.hpp 4 | --- 5 | ## 区間和取得が可能な赤黒木 -------------------------------------------------------------------------------- /docs/datastructure/bbst/red_black_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 赤黒木 3 | documentation_of: //library/datastructure/bbst/red_black_tree.hpp 4 | --- 5 | ## 赤黒木 -------------------------------------------------------------------------------- /docs/datastructure/bbst/red_black_tree_base.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Red Black Tree Base 3 | documentation_of: //library/datastructure/bbst/red_black_tree_base.hpp 4 | --- 5 | ## Red Black Tree Base -------------------------------------------------------------------------------- /docs/datastructure/bbst/reversible_implicit_treap.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Reversible Implicit Treap 3 | documentation_of: //library/datastructure/bbst/reversible_implicit_treap.hpp 4 | --- 5 | ## Reversible Implicit Treap 6 | -------------------------------------------------------------------------------- /docs/datastructure/bbst/reversible_implicit_treap_base.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Reversible Implicit Treap Base 3 | documentation_of: //library/datastructure/bbst/reversible_implicit_treap_base.hpp 4 | --- 5 | ## Reversible Implicit Treap Base 6 | -------------------------------------------------------------------------------- /docs/datastructure/bbst/reversible_implicit_treap_dual_segtree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Reversible Implicit Treap Dual Segtree 3 | documentation_of: //library/datastructure/bbst/reversible_implicit_treap_dual_segtree.hpp 4 | --- 5 | ## Reversible Implicit Treap Dual Segtree 6 | -------------------------------------------------------------------------------- /docs/datastructure/bbst/reversible_implicit_treap_lazy_segtree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Reversible Implicit Treap Lazy Segtree 3 | documentation_of: //library/datastructure/bbst/reversible_implicit_treap_lazy_segtree.hpp 4 | --- 5 | ## Reversible Implicit Treap Lazy Segtree 6 | -------------------------------------------------------------------------------- /docs/datastructure/bbst/reversible_implicit_treap_segtree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Reversible Implicit Treap Segtree 3 | documentation_of: //library/datastructure/bbst/reversible_implicit_treap_segtree.hpp 4 | --- 5 | ## Reversible Implicit Treap Segtree 6 | -------------------------------------------------------------------------------- /docs/datastructure/binary_trie.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Binary Trie 3 | documentation_of: //library/datastructure/binary_trie.hpp 4 | --- 5 | ## Binary Trie -------------------------------------------------------------------------------- /docs/datastructure/binary_trie_patricia.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Binary Trie Patricia 3 | documentation_of: //library/datastructure/binary_trie_patricia.hpp 4 | --- 5 | ## Binary Trie Patricia -------------------------------------------------------------------------------- /docs/datastructure/bit_vector.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Bit Vector 3 | documentation_of: //library/datastructure/bit_vector.hpp 4 | --- 5 | ## Bit Vector -------------------------------------------------------------------------------- /docs/datastructure/cartesian_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Cartesian Tree 3 | documentation_of: //library/datastructure/cartesian_tree.hpp 4 | --- 5 | ## Cartesian Tree -------------------------------------------------------------------------------- /docs/datastructure/compressed_wavelet_matrix.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Compressed Wavelet Matrix 3 | documentation_of: //library/datastructure/compressed_wavelet_matrix.hpp 4 | --- 5 | ## Compressed Wavelet Matrix -------------------------------------------------------------------------------- /docs/datastructure/convex_hull_trick.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Convex Hull Trick (傾きが単調とは限らない場合) 3 | documentation_of: //library/datastructure/convex_hull_trick.hpp 4 | --- 5 | ## Convex Hull Trick (傾きが単調とは限らない場合) 6 | -------------------------------------------------------------------------------- /docs/datastructure/double_ended_priority_queue.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Double Ended Priority Queue 3 | documentation_of: //library/datastructure/double_ended_priority_queue.hpp 4 | --- 5 | ## Double Ended Priority Queue -------------------------------------------------------------------------------- /docs/datastructure/dynamic_sequence.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Dynamic Sequence 3 | documentation_of: //library/datastructure/dynamic_sequence.hpp 4 | --- 5 | ## Dynamic Sequence -------------------------------------------------------------------------------- /docs/datastructure/fenwick_tree/compressed_fenwick_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 任意次元 Fenwick Tree 3 | documentation_of: //library/datastructure/fenwick_tree/compressed_fenwick_tree.hpp 4 | --- 5 | ## 任意次元 Fenwick Tree 6 | 7 | 空間 $O(q(\log q) ^ {d - 1})$、クエリ $O((\log q) ^ d)$ の $d$ 次元 Fenwick Tree。計算量は $d$ を定数とみなした場合である。クエリの定数倍として $2 ^ d$ が付くので注意 (prefix クエリの場合を除く)。 8 | -------------------------------------------------------------------------------- /docs/datastructure/fenwick_tree/compressed_fenwick_tree_prefix.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Compressed Fenwick Tree Prefix 3 | documentation_of: //library/datastructure/fenwick_tree/compressed_fenwick_tree_prefix.hpp 4 | --- 5 | ## Compressed Fenwick Tree Prefix -------------------------------------------------------------------------------- /docs/datastructure/fenwick_tree/fenwick_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Fenwick Tree 3 | documentation_of: //library/datastructure/fenwick_tree/fenwick_tree.hpp 4 | --- 5 | ## Fenwick Tree -------------------------------------------------------------------------------- /docs/datastructure/fenwick_tree/fenwick_tree_2d.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Fenwick Tree 2d 3 | documentation_of: //library/datastructure/fenwick_tree/fenwick_tree_2d.hpp 4 | --- 5 | ## Fenwick Tree 2d -------------------------------------------------------------------------------- /docs/datastructure/fenwick_tree/fenwick_tree_2d_sparse.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 2D Binary Indexed Tree (点群が疎な場合) 3 | documentation_of: //library/datastructure/fenwick_tree/fenwick_tree_2d_sparse.hpp 4 | --- 5 | ## 2D Binary Indexed Tree (点群が疎な場合) -------------------------------------------------------------------------------- /docs/datastructure/fenwick_tree/fenwick_tree_prefix.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Fenwick Tree Prefix 3 | documentation_of: //library/datastructure/fenwick_tree/fenwick_tree_prefix.hpp 4 | --- 5 | ## Fenwick Tree Prefix 6 | 7 | 一般のモノイド $(\oplus,M)$ が乗る代わりに,処理できるクエリは以下の 2 つに制限される. 8 | 9 | - $\mathrm{apply}(i,v)$: $A _ i \leftarrow A _ i \oplus v$ と更新する 10 | - $\mathrm{prefix\\_query}(r)$: $\displaystyle \bigoplus _ {i = 0} ^ {r - 1} A _ i$ を計算する 11 | -------------------------------------------------------------------------------- /docs/datastructure/fenwick_tree/fenwick_tree_set.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Fenwick Tree Set 3 | documentation_of: //library/datastructure/fenwick_tree/fenwick_tree_set.hpp 4 | --- 5 | ## Fenwick Tree Set 6 | -------------------------------------------------------------------------------- /docs/datastructure/fenwick_tree/offline_rectangle_add_point_get.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Offline Rectangle Add Point Get 3 | documentation_of: //library/datastructure/fenwick_tree/offline_rectangle_add_point_get.hpp 4 | --- 5 | ## Offline Rectangle Add Point Get 6 | -------------------------------------------------------------------------------- /docs/datastructure/fenwick_tree/persistent_fenwick_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Persistent Fenwick Tree 3 | documentation_of: //library/datastructure/fenwick_tree/persistent_fenwick_tree.hpp 4 | --- 5 | ## Persistent Fenwick Tree 6 | 7 | Fenwick Tree の値を二分木における in-order で配置すると,`add`, `sum` の操作が根から (葉とは限らない) ある節点までのパス上で完結する.即ち,Segment Tree 等と同様にして永続化することが出来る. 8 | 9 | 永続セグメント木よりも定数倍がよいか? 10 | 11 | 例. [Rectangle Sum](https://judge.yosupo.jp/problem/rectangle_sum) での速度比較 12 | 13 | - [永続 Fenwick Tree, 886ms](https://judge.yosupo.jp/submission/91009) 14 | - [永続 Segment Tree, 1322ms](https://judge.yosupo.jp/submission/91011) 15 | -------------------------------------------------------------------------------- /docs/datastructure/fenwick_tree/rectangle_add_rectangle_sum.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Rectangle Add Rectangle Sum 3 | documentation_of: //library/datastructure/fenwick_tree/rectangle_add_rectangle_sum.hpp 4 | --- 5 | ## Rectangle Add Rectangle Sum 6 | 7 | $Q$ 個の矩形加算・矩形和取得クエリを $\Theta(Q\log Q)$ space, $\Theta(Q (\log Q) ^ 2)$ time で処理します。ただし、クエリ先読みが可能であることを仮定します。 8 | -------------------------------------------------------------------------------- /docs/datastructure/fenwick_tree/static_rectangle_add_rectangle_sum.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Static Rectangle Add Rectangle Sum 3 | documentation_of: //library/datastructure/fenwick_tree/static_rectangle_add_rectangle_sum.hpp 4 | --- 5 | ## Static Rectangle Add Rectangle Sum 6 | 7 | $Q$ 個の矩形加算・矩形和取得クエリであって、取得クエリのあとに加算クエリが来ないような場合に $\Theta(Q)$ space, $\Theta(Q \log Q)$ time で処理します。ただし、クエリ先読みが可能であることを仮定します。 8 | 9 | -------------------------------------------------------------------------------- /docs/datastructure/heap/binary_heap.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Binary Heap 3 | documentation_of: //library/datastructure/heap/binary_heap.hpp 4 | --- 5 | ## Binary Heap -------------------------------------------------------------------------------- /docs/datastructure/heap/heap_tag.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Heap Tag 3 | documentation_of: //library/datastructure/heap/heap_tag.hpp 4 | --- 5 | ## Heap Tag -------------------------------------------------------------------------------- /docs/datastructure/heap/interval_heap.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Interval Heap 3 | documentation_of: //library/datastructure/heap/interval_heap.hpp 4 | --- 5 | ## Interval Heap -------------------------------------------------------------------------------- /docs/datastructure/lazy_eval_map.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Lazy Eval Map 3 | documentation_of: //library/datastructure/lazy_eval_map.hpp 4 | --- 5 | ## Lazy Eval Map -------------------------------------------------------------------------------- /docs/datastructure/monotonic_convex_hull_trick.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Convex Hull Trick (傾きが単調な場合) 3 | documentation_of: //library/datastructure/monotonic_convex_hull_trick.hpp 4 | --- 5 | ## Convex Hull Trick (傾きが単調な場合) 6 | -------------------------------------------------------------------------------- /docs/datastructure/persistent_array.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 永続配列 3 | documentation_of: //library/datastructure/persistent_array.hpp 4 | --- 5 | ## 永続配列 -------------------------------------------------------------------------------- /docs/datastructure/priority_queue.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Priority Queue 3 | documentation_of: //library/datastructure/priority_queue.hpp 4 | --- 5 | ## Priority Queue -------------------------------------------------------------------------------- /docs/datastructure/queue_aggregation.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Queue Aggregation 3 | documentation_of: //library/datastructure/queue_aggregation.hpp 4 | --- 5 | ## Queue Aggregation 6 | -------------------------------------------------------------------------------- /docs/datastructure/range_foldable_dynamic_sequence.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Range Foldable Dynamic Sequence 3 | documentation_of: //library/datastructure/range_foldable_dynamic_sequence.hpp 4 | --- 5 | ## Range Foldable Dynamic Sequence -------------------------------------------------------------------------------- /docs/datastructure/range_foldable_map.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Range Foldable Map 3 | documentation_of: //library/datastructure/range_foldable_map.hpp 4 | --- 5 | ## Range Foldable Map -------------------------------------------------------------------------------- /docs/datastructure/segment_tree/application/range_arithmetic_progression_add_range_sum.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Range Arithmetic Progression Add Range Sum 3 | documentation_of: //library/datastructure/segment_tree/application/range_arithmetic_progression_add_range_sum.hpp 4 | --- 5 | ## Range Arithmetic Progression Add Range Sum -------------------------------------------------------------------------------- /docs/datastructure/segment_tree/commutative_dual_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 双対セグメント木 (作用が可換な場合) 3 | documentation_of: //library/datastructure/segment_tree/commutative_dual_segment_tree.hpp 4 | --- 5 | ## 双対セグメント木 (作用が可換な場合) 6 | 7 | 作用の可換性を仮定した場合、作用を伝播させる必要がないため、伝播処理をサボることで定数倍改善を測ることができる。 8 | -------------------------------------------------------------------------------- /docs/datastructure/segment_tree/compressed_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 任意次元 Segment Tree 3 | documentation_of: //library/datastructure/segment_tree/compressed_segment_tree.hpp 4 | --- 5 | ## 任意次元 Segment Tree 6 | 7 | 空間 $O(q(\log q) ^ {d - 1})$、クエリ $O((\log q) ^ d)$ の $d$ 次元 Segment Tree。計算量は $d$ を定数とみなした場合である。クエリの定数倍として $2 ^ d$ が付くので注意 (prefix クエリの場合を除く)。 8 | -------------------------------------------------------------------------------- /docs/datastructure/segment_tree/dual_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 双対セグメント木 3 | documentation_of: //library/datastructure/segment_tree/dual_segment_tree.hpp 4 | --- 5 | ## 双対セグメント木 6 | -------------------------------------------------------------------------------- /docs/datastructure/segment_tree/lazy_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 遅延伝播セグメント木 3 | documentation_of: //library/datastructure/segment_tree/lazy_segment_tree.hpp 4 | --- 5 | ## 遅延伝播セグメント木 -------------------------------------------------------------------------------- /docs/datastructure/segment_tree/li_chao_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Li Chao Segment Tree 3 | documentation_of: //library/datastructure/segment_tree/li_chao_segment_tree.hpp 4 | --- 5 | ## Li Chao Segment Tree -------------------------------------------------------------------------------- /docs/datastructure/segment_tree/persistent_commutative_dual_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Persistent Commutative Dual Segment Tree 3 | documentation_of: //library/datastructure/segment_tree/persistent_commutative_dual_segment_tree.hpp 4 | --- 5 | ## Persistent Commutative Dual Segment Tree -------------------------------------------------------------------------------- /docs/datastructure/segment_tree/persistent_dual_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Persistent Dual Segment Tree 3 | documentation_of: //library/datastructure/segment_tree/persistent_dual_segment_tree.hpp 4 | --- 5 | ## Persistent Dual Segment Tree -------------------------------------------------------------------------------- /docs/datastructure/segment_tree/persistent_lazy_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 永続遅延伝播セグメント木 3 | documentation_of: //library/datastructure/segment_tree/persistent_lazy_segment_tree.hpp 4 | --- 5 | ## 永続遅延伝播セグメント木 -------------------------------------------------------------------------------- /docs/datastructure/segment_tree/persistent_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 永続セグメント木 3 | documentation_of: //library/datastructure/segment_tree/persistent_segment_tree.hpp 4 | --- 5 | ## 永続セグメント木 -------------------------------------------------------------------------------- /docs/datastructure/segment_tree/segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: セグメント木 3 | documentation_of: //library/datastructure/segment_tree/segment_tree.hpp 4 | --- 5 | ## セグメント木 -------------------------------------------------------------------------------- /docs/datastructure/segment_tree/segment_tree_2d.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 2D セグメント木 3 | documentation_of: //library/datastructure/segment_tree/segment_tree_2d.hpp 4 | --- 5 | ## 2D セグメント木 6 | 7 | $H\times W$ の領域に対して空間計算量が $\Theta(HW)$ となるので注意。 8 | -------------------------------------------------------------------------------- /docs/datastructure/segment_tree/segment_tree_2d_sparse.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 2D セグメント木 (点群が疎な場合) 3 | documentation_of: //library/datastructure/segment_tree/segment_tree_2d_sparse.hpp 4 | --- 5 | ## 2D セグメント木 (点群が疎な場合) -------------------------------------------------------------------------------- /docs/datastructure/segment_tree/segment_tree_beats.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Segment Tree Beats 3 | documentation_of: //library/datastructure/segment_tree/segment_tree_beats.hpp 4 | --- 5 | ## Segment Tree Beats 6 | 7 | [atcoder::lazy_segtree に1行書き足すだけの抽象化 Segment Tree Beats](https://rsm9.hatenablog.com/entry/2021/02/01/220408) を参照。 -------------------------------------------------------------------------------- /docs/datastructure/segment_tree/sortable_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Sortable Segment Tree 3 | documentation_of: //library/datastructure/segment_tree/sortable_segment_tree.hpp 4 | --- 5 | ## Sortable Segment Tree 6 | -------------------------------------------------------------------------------- /docs/datastructure/segment_tree/sparse_lazy_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 遅延伝播セグメント木 (添字集合が疎な場合) 3 | documentation_of: //library/datastructure/segment_tree/sparse_lazy_segment_tree.hpp 4 | --- 5 | ## 遅延伝播セグメント木 (添字集合が疎な場合) 6 | 7 | 予め添字集合が分かっている場合は座標圧縮により通常の遅延伝播セグメント木で対応できるが、そうでない場合は本ライブラリを用いる。 8 | -------------------------------------------------------------------------------- /docs/datastructure/segment_tree/sparse_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: セグメント木 (添字集合が疎な場合) 3 | documentation_of: //library/datastructure/segment_tree/sparse_segment_tree.hpp 4 | --- 5 | ## セグメント木 (添字集合が疎な場合) 6 | 7 | 予め添字集合が分かっている場合は座標圧縮により通常のセグメント木で対応できるが、そうでない場合は本ライブラリを用いる。 8 | -------------------------------------------------------------------------------- /docs/datastructure/segment_tree/trees/range_chmin_chmax_add_range_sum.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Range Chmin Chmax Add Range Sum 3 | documentation_of: //library/datastructure/segment_tree/trees/range_chmin_chmax_add_range_sum.hpp 4 | --- 5 | ## Range Chmin Chmax Add Range Sum 6 | 7 | [Range Chmin Chmax Add Range Sum](https://judge.yosupo.jp/problem/range_chmin_chmax_add_range_sum) を解くデータ構造。 8 | -------------------------------------------------------------------------------- /docs/datastructure/slope_trick.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Slope Trick 3 | documentation_of: //library/datastructure/slope_trick.hpp 4 | --- 5 | ## Slope Trick 6 | 7 | [slope trick (1) 解説編](https://maspypy.com/slope-trick-1-%E8%A7%A3%E8%AA%AC%E7%B7%A8) に詳しい。 8 | -------------------------------------------------------------------------------- /docs/datastructure/sparse_table.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Sparse Table 3 | documentation_of: //library/datastructure/sparse_table.hpp 4 | --- 5 | ## Sparse Table -------------------------------------------------------------------------------- /docs/datastructure/splay_tree_map.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Splay Tree Map 3 | documentation_of: //library/datastructure/splay_tree_map.hpp 4 | --- 5 | ## Splay Tree Map -------------------------------------------------------------------------------- /docs/datastructure/splay_tree_set.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Splay Tree Set 3 | documentation_of: //library/datastructure/splay_tree_set.hpp 4 | --- 5 | ## Splay Tree Set -------------------------------------------------------------------------------- /docs/datastructure/union_find/linked_union_find.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 連結成分を取得できる Union Find 3 | documentation_of: //library/datastructure/union_find/linked_union_find.hpp 4 | --- 5 | ## 連結成分を取得できる Union Find 6 | 7 | 名前が分かりません。[素集合の要素の列挙と併合 (単方向循環リスト)](https://noshi91.hatenablog.com/entry/2019/07/19/180606) これです。 8 | 9 | 頂点 $v$ が属する連結成分 $C$ を $O(\vert C\vert)$ で取得可能である。 10 | -------------------------------------------------------------------------------- /docs/datastructure/union_find/merge_history_forest.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: マージ過程を表す森 3 | documentation_of: //library/datastructure/union_find/merge_history_forest.hpp 4 | --- 5 | ## マージ過程を表す森 6 | -------------------------------------------------------------------------------- /docs/datastructure/union_find/persistent_union_find.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 永続 Union Find 3 | documentation_of: //library/datastructure/union_find/persistent_union_find.hpp 4 | --- 5 | ## 永続 Union Find -------------------------------------------------------------------------------- /docs/datastructure/union_find/undo_union_find.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: undo 可能 Union Find 3 | documentation_of: //library/datastructure/union_find/undo_union_find.hpp 4 | --- 5 | ## undo 可能 Union Find 6 | 7 | 経路圧縮を諦めることで undo 操作を可能にした Union Find。weighted union heuristic による集合の併合のみを行うので、各種操作の計算量は $O(\log N)$ である。 8 | -------------------------------------------------------------------------------- /docs/datastructure/union_find/undo_union_find_component_sum.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 連結成分の可換モノイド和を取得できる undo 可能 Union Find 3 | documentation_of: //library/datastructure/union_find/undo_union_find_component_sum.hpp 4 | --- 5 | ## 連結成分の可換モノイド和を取得できる undo 可能 Union Find 6 | 7 | 連結成分毎に可換モノイドの元を持つ Union Find に undo 機能を付けたもの。[Dynamic Graph Vertex Add Component Sum](https://judge.yosupo.jp/problem/dynamic_graph_vertex_add_component_sum) を offline で解く場合などで使用。 8 | 9 | 経路圧縮を諦めることで undo 操作を可能にしており、weighted union heuristic による集合の併合のみを行うので、各種操作の計算量は $O(\log N)$ である。 10 | -------------------------------------------------------------------------------- /docs/datastructure/union_find/union_find.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Union Find 3 | documentation_of: //library/datastructure/union_find/union_find.hpp 4 | --- 5 | ## Union Find 6 | -------------------------------------------------------------------------------- /docs/datastructure/union_find/union_find_component_sum.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 連結成分の可換モノイド和を取得できる Union Find 3 | documentation_of: //library/datastructure/union_find/union_find_component_sum.hpp 4 | --- 5 | ## 連結成分の可換モノイド和を取得できる Union Find 6 | -------------------------------------------------------------------------------- /docs/datastructure/union_find/union_find_lazy.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Union Find Lazy 3 | documentation_of: //library/datastructure/union_find/union_find_lazy.hpp 4 | --- 5 | ## Union Find Lazy 6 | -------------------------------------------------------------------------------- /docs/datastructure/union_find/weighted_union_find.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Weighted Union Find 3 | documentation_of: //library/datastructure/union_find/weighted_union_find.hpp 4 | --- 5 | ## Weighted Union Find 6 | 7 | [UnionFindTree に関する知見の諸々](https://noshi91.hatenablog.com/entry/2018/05/30/191943) で「ポテンシャル付きUnionFindTree」と呼ばれているもの。 8 | -------------------------------------------------------------------------------- /docs/datastructure/util/dynamic_bitset.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Dynamic Bitset 3 | documentation_of: //library/datastructure/util/dynamic_bitset.hpp 4 | --- 5 | ## Dynamic Bitset 6 | 7 | bit 長を動的に管理する bitset。あんまりテストできてなかったはず。 8 | -------------------------------------------------------------------------------- /docs/datastructure/util/priority_sum.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Priority Sum 3 | documentation_of: //library/datastructure/util/priority_sum.hpp 4 | --- 5 | ## Priority Sum 6 | 7 | 多重集合の上位 $k$ 個の和を、Priority Queue 2 本で管理するデータ構造。 8 | -------------------------------------------------------------------------------- /docs/datastructure/util/range_set.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Range Set 3 | documentation_of: //library/datastructure/util/range_set.hpp 4 | --- 5 | ## Range Set 6 | 7 | いわゆる「区間を管理する set」。[区間をsetで管理するやつでもうバグらせたくない](https://mugen1337.hatenablog.com/entry/2020/10/14/134022) などを参照。 8 | -------------------------------------------------------------------------------- /docs/datastructure/util/static_bitset.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Static Bitset 3 | documentation_of: //library/datastructure/util/static_bitset.hpp 4 | --- 5 | ## Static Bitset 6 | 7 | bit 長が固定の bitset。`std::bitset` にない機能を追加していく予定。 8 | -------------------------------------------------------------------------------- /docs/datastructure/wavelet_matrix.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Wavelet Matrix 3 | documentation_of: //library/datastructure/wavelet_matrix.hpp 4 | --- 5 | ## Wavelet Matrix -------------------------------------------------------------------------------- /docs/debug/suffix_automaton.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Suffix Automaton 3 | documentation_of: //library/debug/suffix_automaton.hpp 4 | --- 5 | ## Suffix Automaton -------------------------------------------------------------------------------- /docs/debug/tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tree 3 | documentation_of: //library/debug/tree.hpp 4 | --- 5 | ## Tree -------------------------------------------------------------------------------- /docs/debug/warning.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Warning 3 | documentation_of: //library/debug/warning.hpp 4 | --- 5 | ## Warning 6 | -------------------------------------------------------------------------------- /docs/dp/grid_connectivity.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Grid Connectivity 3 | documentation_of: //library/dp/grid_connectivity.hpp 4 | --- 5 | ## Grid Connectivity 6 | -------------------------------------------------------------------------------- /docs/dp/longest_increasing_subsequence.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Longest Increasing Subsequence 3 | documentation_of: //library/dp/longest_increasing_subsequence.hpp 4 | --- 5 | ## Longest Increasing Subsequence -------------------------------------------------------------------------------- /docs/dp/number_of_subsequences.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Number Of Subsequences 3 | documentation_of: //library/dp/number_of_subsequences.hpp 4 | --- 5 | ## Number Of Subsequences -------------------------------------------------------------------------------- /docs/experimental/bbst/persistent_red_black_lazy_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Persistent Red Black Lazy Segment Tree 3 | documentation_of: //library/experimental/bbst/persistent_red_black_lazy_segment_tree.hpp 4 | --- 5 | ## Persistent Red Black Lazy Segment Tree 6 | -------------------------------------------------------------------------------- /docs/experimental/bbst/persistent_red_black_reversible_lazy_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Persistent Red Black Reversible Lazy Segment Tree 3 | documentation_of: //library/experimental/bbst/persistent_red_black_reversible_lazy_segment_tree.hpp 4 | --- 5 | ## Persistent Red Black Reversible Lazy Segment Tree 6 | -------------------------------------------------------------------------------- /docs/experimental/bbst/persistent_red_black_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Persistent Red Black Segment Tree 3 | documentation_of: //library/experimental/bbst/persistent_red_black_segment_tree.hpp 4 | --- 5 | ## Persistent Red Black Segment Tree 6 | -------------------------------------------------------------------------------- /docs/experimental/bbst/persistent_red_black_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Persistent Red Black Tree 3 | documentation_of: //library/experimental/bbst/persistent_red_black_tree.hpp 4 | --- 5 | ## Persistent Red Black Tree 6 | -------------------------------------------------------------------------------- /docs/experimental/bbst/persistent_red_black_tree_base.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Persistent Red Black Tree Base 3 | documentation_of: //library/experimental/bbst/persistent_red_black_tree_base.hpp 4 | --- 5 | ## Persistent Red Black Tree Base 6 | -------------------------------------------------------------------------------- /docs/experimental/bbst/red_black_lazy_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Red Black Lazy Segment Tree 3 | documentation_of: //library/experimental/bbst/red_black_lazy_segment_tree.hpp 4 | --- 5 | ## Red Black Lazy Segment Tree 6 | -------------------------------------------------------------------------------- /docs/experimental/bbst/red_black_reversible_lazy_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Red Black Reversible Lazy Segment Tree 3 | documentation_of: //library/experimental/bbst/red_black_reversible_lazy_segment_tree.hpp 4 | --- 5 | ## Red Black Reversible Lazy Segment Tree 6 | -------------------------------------------------------------------------------- /docs/experimental/bbst/red_black_segment_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Red Black Segment Tree 3 | documentation_of: //library/experimental/bbst/red_black_segment_tree.hpp 4 | --- 5 | ## Red Black Segment Tree 6 | -------------------------------------------------------------------------------- /docs/experimental/bbst/red_black_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Red Black Tree 3 | documentation_of: //library/experimental/bbst/red_black_tree.hpp 4 | --- 5 | ## Red Black Tree 6 | -------------------------------------------------------------------------------- /docs/experimental/bbst/red_black_tree_base.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Red Black Tree Base 3 | documentation_of: //library/experimental/bbst/red_black_tree_base.hpp 4 | --- 5 | ## Red Black Tree Base 6 | -------------------------------------------------------------------------------- /docs/experimental/implicit_treap.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Implicit Treap 3 | documentation_of: //library/experimental/implicit_treap.hpp 4 | --- 5 | ## Implicit Treap 6 | -------------------------------------------------------------------------------- /docs/geom/closest_pair.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 最近点対 3 | documentation_of: //library/geom/closest_pair.hpp 4 | --- 5 | ## 最近点対 -------------------------------------------------------------------------------- /docs/geom/convex_hull.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 凸包 3 | documentation_of: //library/geom/convex_hull.hpp 4 | --- 5 | ## 凸包 -------------------------------------------------------------------------------- /docs/geom/geometry.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 幾何テンプレート 3 | documentation_of: //library/geom/geometry.hpp 4 | --- 5 | ## 幾何テンプレート 6 | 7 | 幾何ライブラリ詰め合わせ 8 | -------------------------------------------------------------------------------- /docs/geom/geometry3d.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 3次元幾何テンプレート 3 | documentation_of: //library/geom/geometry3d.hpp 4 | --- 5 | ## 3次元幾何テンプレート 6 | 7 | verify は出来てません。 8 | -------------------------------------------------------------------------------- /docs/geom/segment_intersections.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Segment Intersections 3 | documentation_of: //library/geom/segment_intersections.hpp 4 | --- 5 | ## Segment Intersections -------------------------------------------------------------------------------- /docs/graph/assignment_problem.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Assignment Problem 3 | documentation_of: //library/graph/assignment_problem.hpp 4 | --- 5 | ## Assignment Problem 6 | -------------------------------------------------------------------------------- /docs/graph/bfs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Bfs 3 | documentation_of: //library/graph/bfs.hpp 4 | --- 5 | ## Bfs -------------------------------------------------------------------------------- /docs/graph/bfs01.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 01 BFS 3 | documentation_of: //library/graph/bfs01.hpp 4 | --- 5 | ## 01 BFS -------------------------------------------------------------------------------- /docs/graph/bfs_complement.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Bfs Complement 3 | documentation_of: //library/graph/bfs_complement.hpp 4 | --- 5 | ## Bfs Complement 6 | -------------------------------------------------------------------------------- /docs/graph/biconnected_components.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 二重頂点連結成分分解 3 | documentation_of: //library/graph/biconnected_components.hpp 4 | --- 5 | ## 二重頂点連結成分分解 6 | 7 | 多重辺があったり、非連結でも動きます。 8 | -------------------------------------------------------------------------------- /docs/graph/bipartite_graph_recognition.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Bipartite Graph Recognition 3 | documentation_of: //library/graph/bipartite_graph_recognition.hpp 4 | --- 5 | ## Bipartite Graph Recognition -------------------------------------------------------------------------------- /docs/graph/bipartite_matching.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 二部マッチング 3 | documentation_of: //library/graph/bipartite_matching.hpp 4 | --- 5 | ## 二部マッチング 6 | 7 | 最小辺被覆、最小頂点被覆、最大独立集合を求めることもできる。 8 | -------------------------------------------------------------------------------- /docs/graph/block_cut_forest.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Block Cut Forest 3 | documentation_of: //library/graph/block_cut_forest.hpp 4 | --- 5 | ## Block Cut Forest -------------------------------------------------------------------------------- /docs/graph/chromatic_number.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Chromatic Number 3 | documentation_of: //library/graph/chromatic_number.hpp 4 | --- 5 | ## Chromatic Number 6 | -------------------------------------------------------------------------------- /docs/graph/csr_graph.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Graph (CSR Format) 3 | documentation_of: //library/graph/csr_graph.hpp 4 | --- 5 | ## Graph (CSR Format) 6 | -------------------------------------------------------------------------------- /docs/graph/cycle_detection.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Cycle Detection 3 | documentation_of: //library/graph/cycle_detection.hpp 4 | --- 5 | ## Cycle Detection -------------------------------------------------------------------------------- /docs/graph/dijkstra.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Dijkstra 3 | documentation_of: //library/graph/dijkstra.hpp 4 | --- 5 | ## Dijkstra -------------------------------------------------------------------------------- /docs/graph/directed_eulerian_graph.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Directed Eulerian Graph 3 | documentation_of: //library/graph/directed_eulerian_graph.hpp 4 | --- 5 | ## Directed Eulerian Graph -------------------------------------------------------------------------------- /docs/graph/dulmage_mendelsohn_decomposition.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Dulmage Mendelsohn Decomposition (DM 分解) 3 | documentation_of: //library/graph/dulmage_mendelsohn_decomposition.hpp 4 | --- 5 | ## Dulmage Mendelsohn Decomposition (DM 分解) -------------------------------------------------------------------------------- /docs/graph/edge_coloring_of_bipartite_graph.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Edge Coloring Of Bipartite Graph 3 | documentation_of: //library/graph/edge_coloring_of_bipartite_graph.hpp 4 | --- 5 | ## Edge Coloring Of Bipartite Graph 6 | -------------------------------------------------------------------------------- /docs/graph/enumerate_cliques.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Enumerate Cliques 3 | documentation_of: //library/graph/enumerate_cliques.hpp 4 | --- 5 | ## Enumerate Cliques -------------------------------------------------------------------------------- /docs/graph/enumerate_triangles.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 三角形列挙 3 | documentation_of: //library/graph/enumerate_triangles.hpp 4 | --- 5 | ## 三角形列挙 -------------------------------------------------------------------------------- /docs/graph/graph.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Graph 3 | documentation_of: //library/graph/graph.hpp 4 | --- 5 | ## Graph -------------------------------------------------------------------------------- /docs/graph/kruscal.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Kruscal 3 | documentation_of: //library/graph/kruscal.hpp 4 | --- 5 | ## Kruscal -------------------------------------------------------------------------------- /docs/graph/low_link.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Low Link 3 | documentation_of: //library/graph/low_link.hpp 4 | --- 5 | ## Low Link 6 | 7 | 橋や関節点を求めるのに用いる。 8 | -------------------------------------------------------------------------------- /docs/graph/manhattan_minimum_distances.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: マンハッタン距離で最も近い点への距離の列挙 3 | documentation_of: //library/graph/manhattan_minimum_distances.hpp 4 | --- 5 | ## マンハッタン距離で最も近い点への距離の列挙 6 | 7 | $N$ 個の点 $(x_i,y_i)$ が与えられるので,以下で定まる $d _ i$ を全ての $i$ に対して $O(N\log N)$ 時間で計算する. 8 | 9 | $$ 10 | d _ i = \min _ {j \neq i} |x _ i - x _ j| + |y _ i - y _ j| 11 | $$ 12 | -------------------------------------------------------------------------------- /docs/graph/manhattan_mst.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Manhattan Mst 3 | documentation_of: //library/graph/manhattan_mst.hpp 4 | --- 5 | ## Manhattan Mst 6 | 7 | $N$ 個の点 $(x_i,y_i)$ が与えられた場合に,点の間の距離をマンハッタン距離 $\vert x _ i - x _ j\vert + \vert y _ i - y _ j\vert$ としたの重み付き完全無向グラフの最小全域木を $O(N\log N)$ 時間で計算する. 8 | -------------------------------------------------------------------------------- /docs/graph/maximum_clique.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Maximum Clique (最大クリーク) 3 | documentation_of: //library/graph/maximum_clique.hpp 4 | --- 5 | ## Maximum Clique (最大クリーク) 6 | 7 | グラフ $G(V,E)$ の最大クリークは $G$ の補グラフにおける最大独立集合であることを用いて計算する. 8 | -------------------------------------------------------------------------------- /docs/graph/maximum_independent_set.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Maximum Independent Set (最大独立集合) 3 | documentation_of: //library/graph/maximum_independent_set.hpp 4 | --- 5 | ## Maximum Independent Set (最大独立集合) 6 | 7 | [最大独立集合問題のアルゴリズム](https://37zigen.com/maximum-independent-set-algorithm/) の mis2 の実装である. 8 | -------------------------------------------------------------------------------- /docs/graph/min_cost_flow.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Min Cost Flow 3 | documentation_of: //library/graph/min_cost_flow.hpp 4 | --- 5 | ## Min Cost Flow -------------------------------------------------------------------------------- /docs/graph/minimum_vertex_cover.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Minimum Vertex Cover (最小頂点被覆) 3 | documentation_of: //library/graph/minimum_vertex_cover.hpp 4 | --- 5 | ## Minimum Vertex Cover (最小頂点被覆) 6 | 7 | グラフ $G(V,E)$ の最小頂点被覆は,$G$ の最大独立集合の補集合であることを用いて計算する. 8 | -------------------------------------------------------------------------------- /docs/graph/minmax_floyd_warshall.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Minmax Floyd Warshall 3 | documentation_of: //library/graph/minmax_floyd_warshall.hpp 4 | --- 5 | ## Minmax Floyd Warshall 6 | -------------------------------------------------------------------------------- /docs/graph/project_selection.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Project Selection 3 | documentation_of: //library/graph/project_selection.hpp 4 | --- 5 | ## Project Selection -------------------------------------------------------------------------------- /docs/graph/remove_multiedges.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 多重辺除去 3 | documentation_of: //library/graph/remove_multiedges.hpp 4 | --- 5 | ## 多重辺除去 6 | 7 | $\Theta(V+E)$ で多重辺を除去する。 8 | -------------------------------------------------------------------------------- /docs/graph/scc_tournament.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Scc Tournament 3 | documentation_of: //library/graph/scc_tournament.hpp 4 | --- 5 | ## Scc Tournament 6 | -------------------------------------------------------------------------------- /docs/graph/segment_tree_graph.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Segment Tree Graph 3 | documentation_of: //library/graph/segment_tree_graph.hpp 4 | --- 5 | ## Segment Tree Graph -------------------------------------------------------------------------------- /docs/graph/single_source_shortest_path_dag.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Single Source Shortest Path (DAG) 3 | documentation_of: //library/graph/single_source_shortest_path_dag.hpp 4 | --- 5 | ## Single Source Shortest Path (DAG) 6 | 7 | 入力グラフが DAG の場合の単一始点最短路。動的計画法により $O(N + M)$ で解く。 8 | 9 | 辺のコストは負でもよい。 10 | -------------------------------------------------------------------------------- /docs/graph/topological_sort.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Topological Sort 3 | documentation_of: //library/graph/topological_sort.hpp 4 | --- 5 | ## Topological Sort -------------------------------------------------------------------------------- /docs/graph/tree_decomposition_tw2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tree Decomposition Tw2 3 | documentation_of: //library/graph/tree_decomposition_tw2.hpp 4 | --- 5 | ## Tree Decomposition Tw2 6 | -------------------------------------------------------------------------------- /docs/graph/tree_decomposition_tw2_dp.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tree Decomposition Tw2 Dp 3 | documentation_of: //library/graph/tree_decomposition_tw2_dp.hpp 4 | --- 5 | ## Tree Decomposition Tw2 Dp 6 | -------------------------------------------------------------------------------- /docs/graph/two_edge_connected_components.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 二重辺連結成分分解 3 | documentation_of: //library/graph/two_edge_connected_components.hpp 4 | --- 5 | ## 二重辺連結成分分解 6 | 7 | 多重辺があったり、非連結でも動きます。 8 | -------------------------------------------------------------------------------- /docs/graph/undirected_eulerian_graph.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Undirected Eulerian Graph 3 | documentation_of: //library/graph/undirected_eulerian_graph.hpp 4 | --- 5 | ## Undirected Eulerian Graph -------------------------------------------------------------------------------- /docs/icpc/parsing.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Parsing 3 | documentation_of: //library/icpc/parsing.hpp 4 | --- 5 | ## Parsing -------------------------------------------------------------------------------- /docs/integral_geom/closest_pair.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 最近点対 (整数座標) 3 | documentation_of: //library/integral_geom/closest_pair.hpp 4 | --- 5 | ## 最近点対 (整数座標) 6 | -------------------------------------------------------------------------------- /docs/integral_geom/convex_hull.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 凸包 (整数座標) 3 | documentation_of: //library/integral_geom/convex_hull.hpp 4 | --- 5 | ## 凸包 (整数座標) 6 | -------------------------------------------------------------------------------- /docs/integral_geom/convex_hull_inclusion.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Convex Hull Inclusion 3 | documentation_of: //library/integral_geom/convex_hull_inclusion.hpp 4 | --- 5 | ## Convex Hull Inclusion 6 | -------------------------------------------------------------------------------- /docs/integral_geom/count_lattice_point.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 格子点を頂点とする多角形の内部または辺上に存在する格子点の個数のカウント 3 | documentation_of: //library/integral_geom/count_lattice_point.hpp 4 | --- 5 | ## 格子点を頂点とする多角形の内部または辺上に存在する格子点の個数のカウント 6 | 7 | [ピックの定理](https://ja.wikipedia.org/wiki/%E3%83%94%E3%83%83%E3%82%AF%E3%81%AE%E5%AE%9A%E7%90%86) を使うとできる。 -------------------------------------------------------------------------------- /docs/integral_geom/farthest_pair.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Farthest Pair 3 | documentation_of: //library/integral_geom/farthest_pair.hpp 4 | --- 5 | ## Farthest Pair -------------------------------------------------------------------------------- /docs/integral_geom/geometry.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 幾何テンプレート (整数座標) 3 | documentation_of: //library/integral_geom/geometry.hpp 4 | --- 5 | ## 幾何テンプレート (整数座標) 6 | -------------------------------------------------------------------------------- /docs/integral_geom/inclusion.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Inclusion 3 | documentation_of: //library/integral_geom/inclusion.hpp 4 | --- 5 | ## Inclusion 6 | -------------------------------------------------------------------------------- /docs/integral_geom/point.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Point 3 | documentation_of: //library/integral_geom/point.hpp 4 | --- 5 | ## Point -------------------------------------------------------------------------------- /docs/integral_geom/sort_points_by_argument.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 偏角ソート (整数座標) 3 | documentation_of: //library/integral_geom/sort_points_by_argument.hpp 4 | --- 5 | ## 偏角ソート (整数座標) 6 | -------------------------------------------------------------------------------- /docs/linear_algebra/array_matrix.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Array Matrix 3 | documentation_of: //library/linear_algebra/array_matrix.hpp 4 | --- 5 | ## Array Matrix 6 | 7 | 行列のサイズがコンパイル時定数として書ける場合は、`std::array` を用いることで定数倍高速化を図ることが出来る (特に、行列のサイズが小さい場合)。 8 | -------------------------------------------------------------------------------- /docs/linear_algebra/count_spanning_trees.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 行列木定理による全域木の数え上げ 3 | documentation_of: //library/linear_algebra/count_spanning_trees.hpp 4 | --- 5 | ## 行列木定理による全域木の数え上げ 6 | -------------------------------------------------------------------------------- /docs/linear_algebra/gaussian_elimination.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Gaussian Elimination 3 | documentation_of: //library/linear_algebra/gaussian_elimination.hpp 4 | --- 5 | ## Gaussian Elimination -------------------------------------------------------------------------------- /docs/linear_algebra/gaussian_elimination_f2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Gaussian Elimination $\mathbb{F} _ 2$ 3 | documentation_of: //library/linear_algebra/gaussian_elimination_f2.hpp 4 | --- 5 | ## Gaussian Elimination $\mathbb{F} _ 2$ 6 | -------------------------------------------------------------------------------- /docs/linear_algebra/hafnian.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Hafnian (完全マッチングの数え上げ) 3 | documentation_of: //library/linear_algebra/hafnian.hpp 4 | --- 5 | ## Hafnian (完全マッチングの数え上げ) 6 | -------------------------------------------------------------------------------- /docs/linear_algebra/matrix.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Matrix 3 | documentation_of: //library/linear_algebra/matrix.hpp 4 | --- 5 | ## Matrix -------------------------------------------------------------------------------- /docs/linear_algebra/matrix_f2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Matrix $\mathbb{F} _ 2$ 3 | documentation_of: //library/linear_algebra/matrix_f2.hpp 4 | --- 5 | ## Matrix $\mathbb{F} _ 2$ 6 | 7 | $\mathbb{F} _ 2$ 上の行列に対する種々の演算は bitset による高速化が可能である。 8 | -------------------------------------------------------------------------------- /docs/linear_algebra/xor_base.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: XOR 基底 3 | documentation_of: //library/linear_algebra/xor_base.hpp 4 | --- 5 | ## XOR 基底 -------------------------------------------------------------------------------- /docs/math/array_set_power_series.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Array Set Power Series 3 | documentation_of: //library/math/array_set_power_series.hpp 4 | --- 5 | ## Array Set Power Series 6 | -------------------------------------------------------------------------------- /docs/math/array_sps.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Array Sps 3 | documentation_of: //library/math/array_set_power_series.hpp 4 | --- 5 | ## Array Sps -------------------------------------------------------------------------------- /docs/math/bigint.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 多倍長整数 3 | documentation_of: //library/math/bigint.hpp 4 | --- 5 | ## 多倍長整数 6 | 7 | -------------------------------------------------------------------------------- /docs/math/binomial_coefficient_sum.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Binomial Coefficient Sum 3 | documentation_of: //library/math/binomial_coefficient_sum.hpp 4 | --- 5 | ## Binomial Coefficient Sum 6 | -------------------------------------------------------------------------------- /docs/math/factorial.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 階乗テーブル 3 | documentation_of: //library/math/factorial.hpp 4 | --- 5 | ## 階乗テーブル -------------------------------------------------------------------------------- /docs/math/factorial_embeded.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Factorial Embeded 3 | documentation_of: //library/math/factorial_embeded.hpp 4 | --- 5 | ## Factorial Embeded 6 | -------------------------------------------------------------------------------- /docs/math/factorial_large.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Factorial Large 3 | documentation_of: //library/math/factorial_large.hpp 4 | --- 5 | ## Factorial Large 6 | -------------------------------------------------------------------------------- /docs/math/inv_mods.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 逆元テーブル 3 | documentation_of: //library/math/inv_mods.hpp 4 | --- 5 | ## 逆元テーブル -------------------------------------------------------------------------------- /docs/math/modint_extension.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Modint Extension 3 | documentation_of: //library/math/modint_extension.hpp 4 | --- 5 | ## Modint Extension -------------------------------------------------------------------------------- /docs/math/pow_mods.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 冪乗テーブル 3 | documentation_of: //library/math/pow_mods.hpp 4 | --- 5 | ## 冪乗テーブル -------------------------------------------------------------------------------- /docs/math/product_of_differences.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Product Of Differences 3 | documentation_of: //library/math/product_of_differences.hpp 4 | --- 5 | ## Product Of Differences -------------------------------------------------------------------------------- /docs/math/set_power_series.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Set Power Series 3 | documentation_of: //library/math/set_power_series.hpp 4 | --- 5 | ## Set Power Series 6 | -------------------------------------------------------------------------------- /docs/math/sps.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Set Power Series 3 | documentation_of: //library/math/set_power_series.hpp 4 | --- 5 | ## Set Power Series -------------------------------------------------------------------------------- /docs/math/unsigned_bigint.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Unsigned Bigint 3 | documentation_of: //library/math/unsigned_bigint.hpp 4 | --- 5 | ## Unsigned Bigint 6 | -------------------------------------------------------------------------------- /docs/math/util.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Util 3 | documentation_of: //library/math/util.hpp 4 | --- 5 | ## Util -------------------------------------------------------------------------------- /docs/number/anymod_binom.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 任意 mod での二項係数列挙 3 | documentation_of: //library/number/anymod_binom.hpp 4 | --- 5 | ## 任意 mod での二項係数列挙 6 | 7 | $$ 8 | \binom{n}{k} \bmod M = \dfrac{n!}{k!(n-k)!} \bmod M 9 | $$ 10 | 11 | を全ての $k=0,\ldots,n$ に対して $\Theta\left(\dfrac{N \log M}{\log \log M}\right)$ 時間で求める。$M$ は合成数でも $M \leq n$ でもよい。 -------------------------------------------------------------------------------- /docs/number/barrett_reduction.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Barrett Reduction 3 | documentation_of: //library/number/barrett_reduction.hpp 4 | --- 5 | ## Barrett Reduction 6 | -------------------------------------------------------------------------------- /docs/number/bezout_equation.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Bezout Equation 3 | documentation_of: //library/number/bezout_equation.hpp 4 | --- 5 | ## Bezout Equation 6 | -------------------------------------------------------------------------------- /docs/number/deterministic_miller_rabin.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Deterministic Miller Rabin 3 | documentation_of: //library/number/deterministic_miller_rabin.hpp 4 | --- 5 | ## Deterministic Miller Rabin -------------------------------------------------------------------------------- /docs/number/deterministic_miller_rabin_simd.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Deterministic Miller Rabin Simd 3 | documentation_of: //library/number/deterministic_miller_rabin_simd.hpp 4 | --- 5 | ## Deterministic Miller Rabin Simd 6 | -------------------------------------------------------------------------------- /docs/number/discrete_logarithm.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Discrete Logarithm 3 | documentation_of: //library/number/discrete_logarithm.hpp 4 | --- 5 | ## Discrete Logarithm -------------------------------------------------------------------------------- /docs/number/enumerate_quotient.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 商列挙 3 | documentation_of: //library/number/enumerate_quotient.hpp 4 | --- 5 | ## 商列挙 6 | -------------------------------------------------------------------------------- /docs/number/ext_gcd.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Ext Gcd 3 | documentation_of: //library/number/ext_gcd.hpp 4 | --- 5 | ## Ext Gcd -------------------------------------------------------------------------------- /docs/number/factorial_number.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Factorial Number 3 | documentation_of: //library/number/factorial_number.hpp 4 | --- 5 | ## Factorial Number 6 | -------------------------------------------------------------------------------- /docs/number/fast_discrete_logarithm.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Fast Discrete Logarithm 3 | documentation_of: //library/number/fast_discrete_logarithm.hpp 4 | --- 5 | ## Fast Discrete Logarithm 6 | -------------------------------------------------------------------------------- /docs/number/fast_factorize.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 高速素因数分解 3 | documentation_of: //library/number/fast_factorize.hpp 4 | --- 5 | ## 高速素因数分解 -------------------------------------------------------------------------------- /docs/number/find_denominators.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 分子と商から分母としてありうる範囲を計算 3 | documentation_of: //library/number/find_denominators.hpp 4 | --- 5 | ## 分子と商から分母としてありうる範囲を計算 6 | -------------------------------------------------------------------------------- /docs/number/index_calculus.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Index Calculus 3 | documentation_of: //library/number/index_calculus.hpp 4 | --- 5 | ## Index Calculus -------------------------------------------------------------------------------- /docs/number/internal_eratosthenes.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Internal Eratosthenes 3 | documentation_of: //library/number/internal_eratosthenes.hpp 4 | --- 5 | ## Internal Eratosthenes -------------------------------------------------------------------------------- /docs/number/kth_root_mod.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: $a ^ {\frac{1}{k}} \pmod{p}$ 3 | documentation_of: //library/number/kth_root_mod.hpp 4 | --- 5 | ## $a ^ {\frac{1}{k}} \pmod{p}$ -------------------------------------------------------------------------------- /docs/number/kth_root_round.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: $\lfloor a ^ {\frac{1}{k}}\rfloor, \lceil a ^ {\frac{1}{k}}\rceil$ 3 | documentation_of: //library/number/kth_root_round.hpp 4 | --- 5 | ## $\lfloor a ^ {\frac{1}{k}}\rfloor, \lceil a ^ {\frac{1}{k}}\rceil$ 6 | -------------------------------------------------------------------------------- /docs/number/linear_sieve.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 線形篩 3 | documentation_of: //library/number/linear_sieve.hpp 4 | --- 5 | ## 線形篩 -------------------------------------------------------------------------------- /docs/number/min_of_mod_of_linear.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Min Of Mod Of Linear 3 | documentation_of: //library/number/min_of_mod_of_linear.hpp 4 | --- 5 | ## Min Of Mod Of Linear 6 | -------------------------------------------------------------------------------- /docs/number/mobius_function.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Mobius Function 3 | documentation_of: //library/number/mobius_function.hpp 4 | --- 5 | ## Mobius Function -------------------------------------------------------------------------------- /docs/number/mod_sqrt.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Mod Sqrt 3 | documentation_of: //library/number/mod_sqrt.hpp 4 | --- 5 | ## Mod Sqrt 6 | -------------------------------------------------------------------------------- /docs/number/modint.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Modint 3 | documentation_of: //library/number/modint.hpp 4 | --- 5 | ## Modint 6 | -------------------------------------------------------------------------------- /docs/number/modint_2^61m1.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Modint 2^61m1 3 | documentation_of: //library/number/modint_2^61m1.hpp 4 | --- 5 | ## Modint 2^61m1 6 | -------------------------------------------------------------------------------- /docs/number/montogomery.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Montogomery 3 | documentation_of: //library/number/montogomery.hpp 4 | --- 5 | ## Montogomery 6 | -------------------------------------------------------------------------------- /docs/number/order_Z_mZ.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Order of $x \in (\mathbb{Z}/m\mathbb{Z}) ^ \ast$ 3 | documentation_of: //library/number/order_Z_mZ.hpp 4 | --- 5 | ## Order of $x \in (\mathbb{Z}/m\mathbb{Z}) ^ \ast$ 6 | -------------------------------------------------------------------------------- /docs/number/order_prime_mod.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Order Prime Mod 3 | documentation_of: //library/number/order_prime_mod.hpp 4 | --- 5 | ## Order Prime Mod -------------------------------------------------------------------------------- /docs/number/primitive_root.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Primitive Root 3 | documentation_of: //library/number/primitive_root.hpp 4 | --- 5 | ## Primitive Root 6 | 7 | $(\mathbb{Z}/m\mathbb{Z}) ^ \ast$ における位数 $\varphi(m)$ の元 $g$ を $1$ つ求める。そのような $g$ が存在するのは $\lambda(m) = \varphi(m)$ が成り立つ場合、即ち $m$ が $2, 4, p ^ q, 2p ^ q\;(p: \text{odd prime})$ のいずれかで表される場合である。 8 | -------------------------------------------------------------------------------- /docs/number/rational.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Rational 3 | documentation_of: //library/number/rational.hpp 4 | --- 5 | ## Rational -------------------------------------------------------------------------------- /docs/number/sieve_of_eratosthenes.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: エラトステネスの篩 3 | documentation_of: //library/number/sieve_of_eratosthenes.hpp 4 | --- 5 | ## エラトステネスの篩 -------------------------------------------------------------------------------- /docs/number/sieve_of_eratosthenes_constexpr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: エラトステネスの篩 (コンパイル時計算) 3 | documentation_of: //library/number/sieve_of_eratosthenes_constexpr.hpp 4 | --- 5 | ## エラトステネスの篩 (コンパイル時計算) 6 | 7 | コンパイル時に計算できるくらいの計算量なので、高速化は望めなさそう。 8 | -------------------------------------------------------------------------------- /docs/number/stern_brocot_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Stern Brocot Tree 3 | documentation_of: //library/number/stern_brocot_tree.hpp 4 | --- 5 | ## Stern Brocot Tree 6 | -------------------------------------------------------------------------------- /docs/number/sum_of_mobius_function.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Sum Of Mobius Function 3 | documentation_of: //library/number/sum_of_mobius_function.hpp 4 | --- 5 | ## Sum Of Mobius Function -------------------------------------------------------------------------------- /docs/number/sum_of_totient_function.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Prefix Sum of Totient Function 3 | documentation_of: //library/number/sum_of_totient_function.hpp 4 | --- 5 | ## Prefix Sum of Totient Function -------------------------------------------------------------------------------- /docs/number/util.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Util 3 | documentation_of: //library/number/util.hpp 4 | --- 5 | ## Util -------------------------------------------------------------------------------- /docs/optimization/alien_dp.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Alien Dp 3 | documentation_of: //library/optimization/alien_dp.hpp 4 | --- 5 | ## Alien Dp 6 | -------------------------------------------------------------------------------- /docs/optimization/k_project_selection_problem.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: K Project Selection Problem 3 | documentation_of: //library/optimization/k_project_selection_problem.hpp 4 | --- 5 | ## K Project Selection Problem 6 | -------------------------------------------------------------------------------- /docs/optimization/project_selection_problem.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Project Selection Problem 3 | documentation_of: //library/optimization/project_selection_problem.hpp 4 | --- 5 | ## Project Selection Problem 6 | -------------------------------------------------------------------------------- /docs/polynomial/array_fps_naive.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Array Fps Naive 3 | documentation_of: //library/polynomial/array_fps_naive.hpp 4 | --- 5 | ## Array Fps Naive -------------------------------------------------------------------------------- /docs/polynomial/berlekamp_massey.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Berlekamp Massey (線形回帰数列の係数計算) 3 | documentation_of: //library/polynomial/berlekamp_massey.hpp 4 | --- 5 | ## Berlekamp Massey (線形回帰数列の係数の計算) 6 | 7 | 体 $F$ 上の数列 $s=(s_0,s_1,\ldots,s_{n-1})$ に対して、 8 | 9 | $$s_i=\sum_{j=1}^L c_j\cdot s_{i-j}\quad (\forall i\geq L)$$ 10 | 11 | を満たす数列 $c=(c_1,\ldots,c_L)$ のうち長さ $L$ が最小のものを $\Theta(n ^ 2)$ 時間で計算する。 12 | 13 | ## Reference 14 | 15 | [1] J. Massey, "Shift-register synthesis and BCH decoding," in IEEE Transactions on Information Theory, vol. 15, no. 1, pp. 122-127, January 1969, doi: 10.1109/TIT.1969.1054260. 16 | -------------------------------------------------------------------------------- /docs/polynomial/bostan_mori.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Bostan Mori 3 | documentation_of: //library/polynomial/bostan_mori.hpp 4 | --- 5 | ## Bostan Mori -------------------------------------------------------------------------------- /docs/polynomial/compose_exp.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Compose Exp 3 | documentation_of: //library/polynomial/compose_exp.hpp 4 | --- 5 | ## Compose Exp 6 | -------------------------------------------------------------------------------- /docs/polynomial/formal_power_series.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Formal Power Series 3 | documentation_of: //library/polynomial/formal_power_series.hpp 4 | --- 5 | ## Formal Power Series -------------------------------------------------------------------------------- /docs/polynomial/fps.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 形式的冪級数 3 | documentation_of: //library/polynomial/fps.hpp 4 | --- 5 | ## 形式的冪級数 -------------------------------------------------------------------------------- /docs/polynomial/polynomial_gcd.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Polynomial Gcd 3 | documentation_of: //library/polynomial/polynomial_gcd.hpp 4 | --- 5 | ## Polynomial Gcd 6 | -------------------------------------------------------------------------------- /docs/polynomial/rational_fps.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Rational Fps 3 | documentation_of: //library/polynomial/rational_fps.hpp 4 | --- 5 | ## Rational Fps -------------------------------------------------------------------------------- /docs/polynomial/subset_sum.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Subset Sum 3 | documentation_of: //library/polynomial/subset_sum.hpp 4 | --- 5 | ## Subset Sum -------------------------------------------------------------------------------- /docs/polynomial/vec_sparse_fps.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Vec Sparse Fps 3 | documentation_of: //library/polynomial/vec_sparse_fps.hpp 4 | --- 5 | ## Vec Sparse Fps -------------------------------------------------------------------------------- /docs/range_query/range_chmin_chmax_add_range_sum.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Range Chmin Chmax Add Range Sum 3 | documentation_of: //library/range_query/range_chmin_chmax_add_range_sum.hpp 4 | --- 5 | ## Range Chmin Chmax Add Range Sum 6 | -------------------------------------------------------------------------------- /docs/range_query/range_set_range_composite.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Range Set Range Composite 3 | documentation_of: //library/range_query/range_set_range_composite.hpp 4 | --- 5 | ## Range Set Range Composite 6 | -------------------------------------------------------------------------------- /docs/range_query/static range_count_distinct.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Static range Count Distinct 3 | documentation_of: //library/range_query/static range_count_distinct.hpp 4 | --- 5 | ## Static range Count Distinct 6 | -------------------------------------------------------------------------------- /docs/range_query/static_range_inversion_number_query.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Static Range Inversion Number Query 3 | documentation_of: //library/range_query/static_range_inversion_number_query.hpp 4 | --- 5 | ## Static Range Inversion Number Query -------------------------------------------------------------------------------- /docs/range_query/static_range_mode_query.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Static Range Mode Query 3 | documentation_of: //library/range_query/static_range_mode_query.hpp 4 | --- 5 | ## Static Range Mode Query 6 | -------------------------------------------------------------------------------- /docs/range_query/static_range_xored_mex_query.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Static Range Xored Mex Query 3 | documentation_of: //library/range_query/static_range_xored_mex_query.hpp 4 | --- 5 | ## Static Range Xored Mex Query -------------------------------------------------------------------------------- /docs/sequence/bell_number.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Bell Number 3 | documentation_of: //library/sequence/bell_number.hpp 4 | --- 5 | ## Bell Number -------------------------------------------------------------------------------- /docs/sequence/binomial_coefficient.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Binomial Coefficient 3 | documentation_of: //library/sequence/binomial_coefficient.hpp 4 | --- 5 | ## Binomial Coefficient 6 | -------------------------------------------------------------------------------- /docs/sequence/binomial_coefficient_small_prime_mod.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Binomial Coefficient Small Prime Mod 3 | documentation_of: //library/sequence/binomial_coefficient_small_prime_mod.hpp 4 | --- 5 | ## Binomial Coefficient Small Prime Mod 6 | 7 | 以下に示す Lucas の定理を用いる。 8 | 9 | > $p$ が素数のとき、非負整数 $n, r$ に対して次が成り立つ: 10 | > $$\binom{n}{r} \equiv \prod _ {i = 0} ^ {k - 1} \binom{n _ i}{r _ i} \pmod{p}.$$ 11 | > ここで、$n$ を $p$ 進表記したときの $i$ 桁目を $n_i$ とした ($r$ についても同様)。 12 | 13 | 全ての $0\leq n\lt p,0\leq r\lt p$ に対する $\displaystyle \binom{n}{r} \bmod p$ を $O(p ^ 2)$ 時間だけ掛けて前計算しておくことで、クエリあたり $O(\log _ p n)$ で計算できる。 14 | -------------------------------------------------------------------------------- /docs/sequence/binomial_coefficient_small_r_offline.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Binomial Coefficient Small R Offline 3 | documentation_of: //library/sequence/binomial_coefficient_small_r_offline.hpp 4 | --- 5 | ## Binomial Coefficient Small R Offline 6 | -------------------------------------------------------------------------------- /docs/sequence/binomial_coefficitnt_enumeration.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Binomial Coefficitnt Enumeration 3 | documentation_of: //library/sequence/binomial_coefficitnt_enumeration.hpp 4 | --- 5 | ## Binomial Coefficitnt Enumeration 6 | -------------------------------------------------------------------------------- /docs/sequence/eulerian_number.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Eulerian Number 3 | documentation_of: //library/sequence/eulerian_number.hpp 4 | --- 5 | ## Eulerian Number -------------------------------------------------------------------------------- /docs/sequence/montmort_number.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Montmort Number 3 | documentation_of: //library/sequence/montmort_number.hpp 4 | --- 5 | ## Montmort Number -------------------------------------------------------------------------------- /docs/sequence/powers.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Powers 3 | documentation_of: //library/sequence/powers.hpp 4 | --- 5 | ## Powers -------------------------------------------------------------------------------- /docs/sequence/stirling_number2_small_prime_mod.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Stirling Number2 Small Prime Mod 3 | documentation_of: //library/sequence/stirling_number2_small_prime_mod.hpp 4 | --- 5 | ## Stirling Number2 Small Prime Mod 6 | -------------------------------------------------------------------------------- /docs/string/aho_corasick.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Aho Corasick 3 | documentation_of: //library/string/aho_corasick.hpp 4 | --- 5 | ## Aho Corasick -------------------------------------------------------------------------------- /docs/string/aho_corasick_array.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Aho Corasick Array 3 | documentation_of: //library/string/aho_corasick_array.hpp 4 | --- 5 | ## Aho Corasick Array -------------------------------------------------------------------------------- /docs/string/compare_substring.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Compare Substring 3 | documentation_of: //library/string/compare_substring.hpp 4 | --- 5 | ## Compare Substring -------------------------------------------------------------------------------- /docs/string/dynamic_rolling_hash.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Dynamic Rolling Hash 3 | documentation_of: //library/string/dynamic_rolling_hash.hpp 4 | --- 5 | ## Dynamic Rolling Hash 6 | -------------------------------------------------------------------------------- /docs/string/manacher.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Manacher 3 | documentation_of: //library/string/manacher.hpp 4 | --- 5 | ## Manacher -------------------------------------------------------------------------------- /docs/string/morris_pratt.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Morris Pratt 3 | documentation_of: //library/string/morris_pratt.hpp 4 | --- 5 | ## Morris Pratt -------------------------------------------------------------------------------- /docs/string/rolling_hash.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Rolling Hash 3 | documentation_of: //library/string/rolling_hash.hpp 4 | --- 5 | ## Rolling Hash -------------------------------------------------------------------------------- /docs/string/rolling_hash_field.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Rolling Hash (一般の体) 3 | documentation_of: //library/string/rolling_hash_field.hpp 4 | --- 5 | ## Rolling Hash (一般の体) 6 | -------------------------------------------------------------------------------- /docs/string/run_enumerate.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Run Enumerate 3 | documentation_of: //library/string/run_enumerate.hpp 4 | --- 5 | ## Run Enumerate 6 | -------------------------------------------------------------------------------- /docs/string/substring_set.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Substring Set 3 | documentation_of: //library/string/substring_set.hpp 4 | --- 5 | ## Substring Set -------------------------------------------------------------------------------- /docs/string/suffix_automaton.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Suffix Automaton 3 | documentation_of: //library/string/suffix_automaton.hpp 4 | --- 5 | ## Suffix Automaton -------------------------------------------------------------------------------- /docs/string/trie_array.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Trie Array 3 | documentation_of: //library/string/trie_array.hpp 4 | --- 5 | ## Trie Array -------------------------------------------------------------------------------- /docs/string/trie_map.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Trie Map 3 | documentation_of: //library/string/trie_map.hpp 4 | --- 5 | ## Trie Map -------------------------------------------------------------------------------- /docs/template.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Template 3 | documentation_of: //library/template.hpp 4 | --- 5 | ## Template -------------------------------------------------------------------------------- /docs/transform/kronecker.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Kronecker 3 | documentation_of: //library/transform/kronecker.hpp 4 | --- 5 | ## Kronecker 6 | -------------------------------------------------------------------------------- /docs/tree/auxiliary_tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 指定された頂点たちの最小共通祖先関係を保って木を圧縮してできる補助的な木 3 | documentation_of: //library/tree/auxiliary_tree.hpp 4 | --- 5 | ## 指定された頂点たちの最小共通祖先関係を保って木を圧縮してできる補助的な木 6 | 7 | 名称は [ア辞典](https://web.archive.org/web/20211022091628/https://dic.kimiyuki.net/auxiliary-tree) から拝借しました。 8 | -------------------------------------------------------------------------------- /docs/tree/centroid_decomposition.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 重心分解 3 | documentation_of: //library/tree/centroid_decomposition.hpp 4 | --- 5 | ## 重心分解 6 | 7 | -------------------------------------------------------------------------------- /docs/tree/contour_sum.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Contour Sum 3 | documentation_of: //library/tree/contour_sum.hpp 4 | --- 5 | ## Contour Sum -------------------------------------------------------------------------------- /docs/tree/euler_tour.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Euler Tour 3 | documentation_of: //library/tree/euler_tour.hpp 4 | --- 5 | ## Euler Tour -------------------------------------------------------------------------------- /docs/tree/find_centroid.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Find Centroid 3 | documentation_of: //library/tree/find_centroid.hpp 4 | --- 5 | ## Find Centroid 6 | 7 | 木の重心を $O(n)$ 時間で列挙する。 8 | -------------------------------------------------------------------------------- /docs/tree/frequency_table_of_tree_distance.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Frequency Table Of Tree Distance 3 | documentation_of: //library/tree/frequency_table_of_tree_distance.hpp 4 | --- 5 | ## Frequency Table Of Tree Distance 6 | -------------------------------------------------------------------------------- /docs/tree/get_path.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get Path 3 | documentation_of: //library/tree/get_path.hpp 4 | --- 5 | ## Get Path 6 | -------------------------------------------------------------------------------- /docs/tree/link_cut_tree_base.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Link Cut Tree Base 3 | documentation_of: //library/tree/link_cut_tree_base.hpp 4 | --- 5 | ## Link Cut Tree Base -------------------------------------------------------------------------------- /docs/tree/link_cut_tree_path_foldable_lazy.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: パス和取得・パス作用ができる Link Cut Tree 3 | documentation_of: //library/tree/link_cut_tree_path_foldable_lazy.hpp 4 | --- 5 | ## パス和取得・パス作用ができる Link Cut Tree -------------------------------------------------------------------------------- /docs/tree/lowest_common_ancestor.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Lowest Common Ancestor 3 | documentation_of: //library/tree/lowest_common_ancestor.hpp 4 | --- 5 | ## Lowest Common Ancestor -------------------------------------------------------------------------------- /docs/tree/rerooting.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Rerooting (全方位木 DP) 3 | documentation_of: //library/tree/rerooting.hpp 4 | --- 5 | ## Rerooting (全方位木 DP) -------------------------------------------------------------------------------- /docs/tree/rerooting_invertible.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Rerooting Invertible 3 | documentation_of: //library/tree/rerooting_invertible.hpp 4 | --- 5 | ## Rerooting Invertible 6 | -------------------------------------------------------------------------------- /docs/tree/rooted_tree_isomorphism_classification.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Rooted Tree Isomorphism Classification 3 | documentation_of: //library/tree/rooted_tree_isomorphism_classification.hpp 4 | --- 5 | ## Rooted Tree Isomorphism Classification -------------------------------------------------------------------------------- /docs/tree/tree_isomorphism_classification.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tree Isomorphism Classification 3 | documentation_of: //library/tree/tree_isomorphism_classification.hpp 4 | --- 5 | ## Tree Isomorphism Classification 6 | -------------------------------------------------------------------------------- /docs/type_traits/operator.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Operator 3 | documentation_of: //library/type_traits/operator.hpp 4 | --- 5 | ## Operator 6 | -------------------------------------------------------------------------------- /docs/type_traits/type_traits.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Type Traits 3 | documentation_of: //library/type_traits/type_traits.hpp 4 | --- 5 | ## Type Traits -------------------------------------------------------------------------------- /docs/util/bit_utils.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Bit Utils 3 | documentation_of: //library/util/bit_utils.hpp 4 | --- 5 | ## Bit Utils -------------------------------------------------------------------------------- /docs/util/container_utils.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Container Utils 3 | documentation_of: //library/util/container_utils.hpp 4 | --- 5 | ## Container Utils -------------------------------------------------------------------------------- /docs/util/coordinate_compressor.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 座標圧縮 3 | documentation_of: //library/util/coordinate_compressor.hpp 4 | --- 5 | ## 座標圧縮 -------------------------------------------------------------------------------- /docs/util/cumulative_sum.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 累積和 3 | documentation_of: //library/util/cumulative_sum.hpp 4 | --- 5 | ## 累積和 -------------------------------------------------------------------------------- /docs/util/cumulative_sum_2d.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 2D 累積和 3 | documentation_of: //library/util/cumulative_sum_2d.hpp 4 | --- 5 | ## 2D 累積和 -------------------------------------------------------------------------------- /docs/util/default_operator.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Default Operator 3 | documentation_of: //library/util/default_operator.hpp 4 | --- 5 | ## Default Operator -------------------------------------------------------------------------------- /docs/util/default_vector.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Default Vector 3 | documentation_of: //library/util/default_vector.hpp 4 | --- 5 | ## Default Vector -------------------------------------------------------------------------------- /docs/util/grid_utils.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Grid Utils 3 | documentation_of: //library/util/grid_utils.hpp 4 | --- 5 | ## Grid Utils -------------------------------------------------------------------------------- /docs/util/hashes.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Hashes 3 | documentation_of: //library/util/hashes.hpp 4 | --- 5 | ## Hashes 6 | 7 | `std::pair`, `std::tuple`, `std::array` の hash を定義し、`std::unordered_map` の key として使えるようにする。 8 | -------------------------------------------------------------------------------- /docs/util/iter_util.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Iter Util 3 | documentation_of: //library/util/iter_util.hpp 4 | --- 5 | ## Iter Util -------------------------------------------------------------------------------- /docs/util/object_pool.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Object Pool 3 | documentation_of: //library/util/object_pool.hpp 4 | --- 5 | ## Object Pool -------------------------------------------------------------------------------- /docs/util/pair_ops.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Pair Ops 3 | documentation_of: //library/util/pair_ops.hpp 4 | --- 5 | ## Pair Ops -------------------------------------------------------------------------------- /docs/util/permutation.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Permutation 3 | documentation_of: //library/util/permutation.hpp 4 | --- 5 | ## Permutation -------------------------------------------------------------------------------- /docs/util/pointer_32bit.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Pointer 32bit 3 | documentation_of: //library/util/pointer_32bit.hpp 4 | --- 5 | ## Pointer 32bit 6 | -------------------------------------------------------------------------------- /docs/util/rot90.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Rot90 3 | documentation_of: //library/util/rot90.hpp 4 | --- 5 | ## Rot90 -------------------------------------------------------------------------------- /docs/util/run_length_encoder.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Run Length Encoder (ランレンクス圧縮) 3 | documentation_of: //library/util/run_length_encoder.hpp 4 | --- 5 | ## Run Length Encoder -------------------------------------------------------------------------------- /docs/util/step_sum.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Step Sum 3 | documentation_of: //library/util/step_sum.hpp 4 | --- 5 | ## Step Sum 6 | -------------------------------------------------------------------------------- /docs/util/step_view.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Step View 3 | documentation_of: //library/util/step_view.hpp 4 | --- 5 | ## Step View 6 | -------------------------------------------------------------------------------- /docs/util/sum_count.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Sum Count 3 | documentation_of: //library/util/sum_count.hpp 4 | --- 5 | ## Sum Count 6 | -------------------------------------------------------------------------------- /docs/util/timer.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Timer 3 | documentation_of: //library/util/timer.hpp 4 | --- 5 | ## Timer -------------------------------------------------------------------------------- /docs/util/transpose.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Transpose 3 | documentation_of: //library/util/transpose.hpp 4 | --- 5 | ## Transpose -------------------------------------------------------------------------------- /docs/util/tuple_hash.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tuple Hash 3 | documentation_of: //library/util/tuple_hash.hpp 4 | --- 5 | ## Tuple Hash -------------------------------------------------------------------------------- /docs/util/tuple_ops.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tuple Ops 3 | documentation_of: //library/util/tuple_ops.hpp 4 | --- 5 | ## Tuple Ops -------------------------------------------------------------------------------- /docs/util/update_proxy_object.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Update Proxy Object 3 | documentation_of: //library/util/update_proxy_object.hpp 4 | --- 5 | ## Update Proxy Object -------------------------------------------------------------------------------- /docs/util/variant_utils.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Variant Utils 3 | documentation_of: //library/util/variant_utils.hpp 4 | --- 5 | ## Variant Utils -------------------------------------------------------------------------------- /docs/util/vector_ops.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Vector Ops 3 | documentation_of: //library/util/vector_ops.hpp 4 | --- 5 | ## Vector Ops -------------------------------------------------------------------------------- /docs/util/vector_pool.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Vector Pool 3 | documentation_of: //library/util/vector_pool.hpp 4 | --- 5 | ## Vector Pool -------------------------------------------------------------------------------- /docs/util/zobrist_hash.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Zobrist Hash 3 | documentation_of: //library/util/zobrist_hash.hpp 4 | --- 5 | ## Zobrist Hash -------------------------------------------------------------------------------- /library/datastructure/bbst/persistent_red_black_segment_tree.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SUISEN_SUISEN_PERSISTENT_RED_BLACK_SEGMENT_TREE 2 | #define SUISEN_SUISEN_PERSISTENT_RED_BLACK_SEGMENT_TREE 3 | 4 | #include "library/datastructure/bbst/persistent_red_black_tree_base.hpp" 5 | #include "library/datastructure/bbst/red_black_segment_tree.hpp" 6 | 7 | namespace suisen::bbst::segtree { 8 | template 9 | using PersistentRedBlackTreeNode = RedBlackTreeNode; 10 | } 11 | 12 | #endif // SUISEN_SUISEN_PERSISTENT_RED_BLACK_SEGMENT_TREE 13 | -------------------------------------------------------------------------------- /library/datastructure/bbst/persistent_red_black_tree.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SUISEN_PERSISTENT_RED_BLACK_TREE 2 | #define SUISEN_PERSISTENT_RED_BLACK_TREE 3 | 4 | #include "library/datastructure/bbst/persistent_red_black_tree_base.hpp" 5 | #include "library/datastructure/bbst/red_black_tree.hpp" 6 | 7 | namespace suisen::bbst { 8 | template 9 | using PersistentRedBlackTreeNode = RedBlackTreeNode; 10 | } 11 | 12 | #endif // SUISEN_PERSISTENT_RED_BLACK_TREE 13 | -------------------------------------------------------------------------------- /library/datastructure/priority_queue.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SUISEN_PRIORITY_QUEUE 2 | #define SUISEN_PRIORITY_QUEUE 3 | 4 | #include "library/datastructure/heap/binary_heap.hpp" 5 | 6 | namespace suisen { 7 | template > 8 | using MinPriorityQueue = suisen::BinaryHeap; 9 | template 10 | using MaxPriorityQueue = suisen::BinaryHeap>; 11 | } // namespace suisen 12 | 13 | 14 | #endif // SUISEN_PRIORITY_QUEUE 15 | -------------------------------------------------------------------------------- /library/datastructure/segment_tree/segment_tree_beats.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SUISEN_SEGMENT_TREE_BEATS 2 | #define SUISEN_SEGMENT_TREE_BEATS 3 | 4 | #include "library/datastructure/segment_tree/lazy_segment_tree.hpp" 5 | 6 | namespace suisen { 7 | template 8 | using SegmentTreeBeats = LazySegmentTree; 9 | } // namespace suisen 10 | 11 | #endif // SUISEN_SEGMENT_TREE_BEATS 12 | -------------------------------------------------------------------------------- /library/debug/warning.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SUISEN_WARNING 2 | #define SUISEN_WARNING 3 | 4 | #include 5 | 6 | namespace suisen { 7 | struct warning { 8 | warning(const std::string &msg) { 9 | std::cerr << "\033[33m[WARNING] " << msg << "\033[0m" << std::endl; 10 | } 11 | }; 12 | } // namespace suisen 13 | 14 | #endif // SUISEN_WARNING 15 | -------------------------------------------------------------------------------- /library/integral_geom/inclusion.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SUISEN_INT_GEOM_INCLUSION 2 | #define SUISEN_INT_GEOM_INCLUSION 3 | 4 | namespace suisen::integral_geometry { 5 | enum class Inclusion { OUT, ON, IN }; 6 | } 7 | 8 | #endif // SUISEN_INT_GEOM_INCLUSION 9 | -------------------------------------------------------------------------------- /library/number/primitive_root.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SUISEN_PRIMITIVE_ROOT 2 | #define SUISEN_PRIMITIVE_ROOT 3 | 4 | #include "library/number/order_Z_mZ.hpp" 5 | 6 | namespace suisen { 7 | template , std::nullptr_t> = nullptr> 8 | T primitive_root(T p) { 9 | return OrderMod{p}.primitive_root(); 10 | } 11 | } // namespace suisen 12 | 13 | #endif // SUISEN_PRIMITIVE_ROOT 14 | -------------------------------------------------------------------------------- /library/sequence/montmort_number.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SUISEN_MONTMORT_NUMBER 2 | #define SUISEN_MONTMORT_NUMBER 3 | 4 | #include 5 | 6 | namespace suisen { 7 | template 8 | std::vector montmort_number(int n) { 9 | std::vector res{ 1, 0 }; 10 | for (int i = 2; i <= n; ++i) res.push_back((i - 1) * (res[i - 1] + res[i - 2])); 11 | res.resize(n + 1); 12 | return res; 13 | } 14 | } // namespace suisen 15 | 16 | #endif // SUISEN_MONTMORT_NUMBER 17 | -------------------------------------------------------------------------------- /test/src/algebra/field/nimber/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/algebra/field/nimber/nim_product_64.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/nim_product_64" 2 | 3 | #include 4 | 5 | #include "library/algebra/field/nimber.hpp" 6 | 7 | int main() { 8 | using suisen::nimber64_t; 9 | 10 | std::ios::sync_with_stdio(false); 11 | std::cin.tie(nullptr); 12 | 13 | int t; 14 | std::cin >> t; 15 | while (t --> 0) { 16 | nimber64_t x, y; 17 | std::cin >> x >> y; 18 | std::cout << nimber64_t(x) * y << '\n'; 19 | } 20 | 21 | return 0; 22 | } -------------------------------------------------------------------------------- /test/src/algebra/monoid/affine/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/algebra/monoid/affine_clamp/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/algorithm/area_of_union_of_rectangles/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/algorithm/dynamic_convex_hull_offline/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/algorithm/horn_sat/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/algorithm/inversion_number/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/algorithm/maximum_rectangle/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/algorithm/maximum_square/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/algorithm/mo/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/algorithm/monotone_minima/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/algorithm/offline_dynamic_connectivity/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/algorithm/offline_dynamic_connectivity_component_sum/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/algorithm/rmq_pm1/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/algorithm/rmq_pm1_with_index/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/algorithm/two_sat/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/and_convolution/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/arbitrary_mod_convolution/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/array_subset_convolution/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/convolution/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/convolution_2_64/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/convolution_large/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/convolution_naive/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/dirichlet_convolution/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/gcd_convolution/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/lcm_convolution/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/min_plus_convolution/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/multi_variate_convolution/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/multi_variate_convolution_circular/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/multiplicative_convolution_mod_2^n/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/or_convolution/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/polynomial_eval/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/polynomial_eval_multipoint_eval/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/relaxed_convolution/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/relaxed_convolution_ntt/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/semi_relaxed_convolution/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/semi_relaxed_convolution_ntt/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/subset_convolution/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/convolution/xor_convolution/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/ZDD/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bbst/implicit_treap/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bbst/implicit_treap_base/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bbst/implicit_treap_segtree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bbst/persistent_red_black_lazy_segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bbst/persistent_red_black_reversible_lazy_segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bbst/persistent_red_black_segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bbst/persistent_red_black_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bbst/persistent_red_black_tree_base/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bbst/red_black_lazy_segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bbst/red_black_reversible_lazy_segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bbst/red_black_segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bbst/red_black_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bbst/red_black_tree_base/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bbst/reversible_implicit_treap/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bbst/reversible_implicit_treap_base/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bbst/reversible_implicit_treap_dual_segtree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bbst/reversible_implicit_treap_lazy_segtree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bbst/reversible_implicit_treap_segtree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/binary_trie/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/binary_trie_patricia/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/bit_vector/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/cartesian_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/compressed_wavelet_matrix/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/convex_hull_trick/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/deque_aggregation/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/double_ended_priority_queue/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/dynamic_sequence/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/fenwick_tree/compressed_fenwick_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/fenwick_tree/compressed_fenwick_tree_prefix/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/fenwick_tree/fenwick_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/fenwick_tree/fenwick_tree_2d/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/fenwick_tree/fenwick_tree_2d_sparse/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/fenwick_tree/fenwick_tree_prefix/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/fenwick_tree/fenwick_tree_set/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/fenwick_tree/offline_rectangle_add_point_get/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/fenwick_tree/persistent_fenwick_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/fenwick_tree/rectangle_add_rectangle_sum/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/fenwick_tree/static_rectangle_add_rectangle_sum/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/heap/binary_heap/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/heap/heap_tag/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/heap/interval_heap/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/internal_splay_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/lazy_eval_dynamic_sequence/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/lazy_eval_map/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/monotonic_convex_hull_trick/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/permutation_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/persistent_array/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/priority_queue/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/queue_aggregation/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/range_foldable_dynamic_sequence/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/range_foldable_map/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/segment_tree/commutative_dual_segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/segment_tree/compressed_segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/segment_tree/dual_segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/segment_tree/lazy_segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/segment_tree/li_chao_segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/segment_tree/persistent_commutative_dual_segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/segment_tree/persistent_dual_segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/segment_tree/persistent_lazy_segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/segment_tree/persistent_segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/segment_tree/segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/segment_tree/segment_tree_2d/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/segment_tree/segment_tree_2d_sparse/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/segment_tree/segment_tree_beats/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/segment_tree/sortable_segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/segment_tree/sparse_lazy_segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/segment_tree/sparse_segment_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/sliding_window_minimum/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/slope_trick/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/sparse_table/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/splay_tree_map/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/splay_tree_set/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/union_find/linked_union_find/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/union_find/merge_history_forest/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/union_find/persistent_union_find/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/union_find/undo_union_find/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/union_find/undo_union_find_component_sum/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/union_find/union_find/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/union_find/union_find_component_sum/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/union_find/union_find_lazy/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/union_find/weighted_union_find/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/util/dynamic_bitset/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/util/priority_sum/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/util/range_set/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/util/static_bitset/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/datastructure/wavelet_matrix/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/debug/suffix_automaton/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/debug/tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/debug/warning/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/dp/grid_connectivity/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/dp/longest_increasing_subsequence/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/dp/number_of_subsequences/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/dp/number_of_subsequences/number_of_subsequences.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/number_of_subsequences" 2 | 3 | #include 4 | #include 5 | 6 | #include "library/dp/number_of_subsequences.hpp" 7 | 8 | int main() { 9 | std::ios::sync_with_stdio(false); 10 | std::cin.tie(nullptr); 11 | 12 | int n; 13 | std::cin >> n; 14 | 15 | std::vector a(n); 16 | for (auto &e : a) std::cin >> e; 17 | 18 | std::cout << suisen::number_of_nonempty_subsequences(a).val() << '\n'; 19 | 20 | return 0; 21 | } -------------------------------------------------------------------------------- /test/src/geom/closest_pair/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/geom/convex_hull/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/geom/geometry/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/geom/geometry3d/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/geom/segment_intersections/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/assignment_problem/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/bfs/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/bfs01/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/bfs_complement/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/biconnected_components/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/bipartite_graph_recognition/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/bipartite_matching/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/block_cut_forest/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/chromatic_number/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/csr_graph/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/cycle_detection/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/dijkstra/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/directed_eulerian_graph/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/dulmage_mendelsohn_decomposition/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/edge_coloring_of_bipartite_graph/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/enumerate_cliques/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/enumerate_triangles/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/functional_graph/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/graph/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/kruscal/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/low_link/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/manhattan_minimum_distances/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/manhattan_mst/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/maximum_clique/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/maximum_independent_set/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/min_cost_flow/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/minimum_vertex_cover/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/minmax_floyd_warshall/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/remove_multiedges/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/scc_tournament/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/segment_tree_graph/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/single_source_shortest_path_dag/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/topological_sort/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/tree_decomposition_tw2/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/tree_decomposition_tw2_dp/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/two_edge_connected_components/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/graph/undirected_eulerian_graph/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/icpc/parsing/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/integral_geom/closest_pair/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/integral_geom/convex_hull/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/integral_geom/convex_hull_inclusion/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/integral_geom/count_lattice_point/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/integral_geom/farthest_pair/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/integral_geom/geometry/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/integral_geom/inclusion/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/integral_geom/point/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/integral_geom/sort_points_by_argument/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/io/input_stream/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/io/output_stream/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/linear_algebra/array_matrix/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/linear_algebra/characteristic_polynomial/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/linear_algebra/circulant_matrix/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/linear_algebra/count_spanning_trees/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/linear_algebra/gaussian_elimination/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/linear_algebra/gaussian_elimination_f2/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/linear_algebra/hafnian/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/linear_algebra/hafnian/hafnian_of_matrix.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/hafnian_of_matrix" 2 | 3 | #include 4 | 5 | #include 6 | 7 | #include "library/linear_algebra/hafnian.hpp" 8 | 9 | using mint = atcoder::modint998244353; 10 | 11 | int main() { 12 | int n; 13 | std::cin >> n; 14 | std::vector mat(n, std::vector(n)); 15 | for (auto &row : mat) for (auto &elm : row) std::cin >> elm; 16 | std::cout << suisen::hafnian(mat).val() << std::endl; 17 | } -------------------------------------------------------------------------------- /test/src/linear_algebra/hessenberg_reduction/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/linear_algebra/matrix/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/linear_algebra/matrix_f2/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/linear_algebra/xor_base/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/math/array_set_power_series/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/math/bigint/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/math/bigint/NTL_2_A.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://onlinejudge.u-aizu.ac.jp/courses/library/6/NTL/all/NTL_2_A" 2 | 3 | #include 4 | 5 | #include "library/math/bigint.hpp" 6 | using suisen::bigint; 7 | 8 | int main() { 9 | std::ios::sync_with_stdio(false); 10 | std::cin.tie(nullptr); 11 | 12 | bigint a, b; 13 | std::cin >> a >> b; 14 | std::cout << a + b << std::endl; 15 | return 0; 16 | } -------------------------------------------------------------------------------- /test/src/math/bigint/NTL_2_B.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://onlinejudge.u-aizu.ac.jp/courses/library/6/NTL/all/NTL_2_B" 2 | 3 | #include 4 | 5 | #include "library/math/bigint.hpp" 6 | using suisen::bigint; 7 | 8 | int main() { 9 | std::ios::sync_with_stdio(false); 10 | std::cin.tie(nullptr); 11 | 12 | bigint a, b; 13 | std::cin >> a >> b; 14 | std::cout << a - b << std::endl; 15 | return 0; 16 | } -------------------------------------------------------------------------------- /test/src/math/bigint/NTL_2_D.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://onlinejudge.u-aizu.ac.jp/courses/library/6/NTL/all/NTL_2_D" 2 | 3 | #include 4 | 5 | #include "library/math/bigint.hpp" 6 | using suisen::bigint; 7 | 8 | int main() { 9 | std::ios::sync_with_stdio(false); 10 | std::cin.tie(nullptr); 11 | 12 | bigint a, b; 13 | std::cin >> a >> b; 14 | std::cout << a / b << std::endl; 15 | return 0; 16 | } -------------------------------------------------------------------------------- /test/src/math/bigint/NTL_2_E.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://onlinejudge.u-aizu.ac.jp/courses/library/6/NTL/all/NTL_2_E" 2 | 3 | #include 4 | 5 | #include "library/math/bigint.hpp" 6 | using suisen::bigint; 7 | 8 | int main() { 9 | std::ios::sync_with_stdio(false); 10 | std::cin.tie(nullptr); 11 | 12 | bigint a, b; 13 | std::cin >> a >> b; 14 | std::cout << a % b << std::endl; 15 | return 0; 16 | } -------------------------------------------------------------------------------- /test/src/math/bigint/NTL_2_F.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://onlinejudge.u-aizu.ac.jp/courses/library/6/NTL/all/NTL_2_F" 2 | 3 | #include 4 | #include 5 | 6 | #include "library/math/bigint.hpp" 7 | using suisen::bigint; 8 | 9 | int main() { 10 | std::ios::sync_with_stdio(false); 11 | std::cin.tie(nullptr); 12 | 13 | bigint a, b; 14 | std::cin >> a >> b; 15 | std::cout << a * b << std::endl; 16 | return 0; 17 | } -------------------------------------------------------------------------------- /test/src/math/bigint/addition_of_big_integers.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/addition_of_big_integers" 2 | 3 | #include 4 | 5 | #include "library/math/bigint.hpp" 6 | 7 | int main() { 8 | std::ios::sync_with_stdio(false); 9 | std::cin.tie(nullptr); 10 | 11 | int t; 12 | std::cin >> t; 13 | while (t --> 0) { 14 | using suisen::bigint; 15 | 16 | bigint a, b; 17 | std::cin >> a >> b; 18 | std::cout << a + b << '\n'; 19 | } 20 | } -------------------------------------------------------------------------------- /test/src/math/bigint/many_aplusb_128bit.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/many_aplusb_128bit" 2 | 3 | #include 4 | 5 | #include "library/math/bigint.hpp" 6 | 7 | int main() { 8 | std::ios::sync_with_stdio(false); 9 | std::cin.tie(nullptr); 10 | 11 | int t; 12 | std::cin >> t; 13 | while (t --> 0) { 14 | using suisen::bigint; 15 | 16 | bigint a, b; 17 | std::cin >> a >> b; 18 | std::cout << a + b << '\n'; 19 | } 20 | } -------------------------------------------------------------------------------- /test/src/math/bigint/multiplication_of_big_integers.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/multiplication_of_big_integers" 2 | 3 | #include 4 | 5 | #include "library/math/bigint.hpp" 6 | 7 | int main() { 8 | std::ios::sync_with_stdio(false); 9 | std::cin.tie(nullptr); 10 | 11 | int t; 12 | std::cin >> t; 13 | while (t --> 0) { 14 | using suisen::bigint; 15 | 16 | bigint a, b; 17 | std::cin >> a >> b; 18 | std::cout << a * b << '\n'; 19 | } 20 | } -------------------------------------------------------------------------------- /test/src/math/binomial_coefficient_sum/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/math/factorial/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/math/factorial_embeded/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/math/factorial_large/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/math/factorial_large/factorial.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/factorial" 2 | 3 | #include 4 | 5 | #include 6 | 7 | using mint = atcoder::modint998244353; 8 | 9 | #include "library/math/factorial_large.hpp" 10 | 11 | int main() { 12 | suisen::factorial_large fac; 13 | 14 | int t; 15 | std::cin >> t; 16 | 17 | while (t--) { 18 | int n; 19 | std::cin >> n; 20 | std::cout << fac.fac(n).val() << '\n'; 21 | } 22 | } -------------------------------------------------------------------------------- /test/src/math/factorial_large/many_factorials.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/factorial" 2 | 3 | #include 4 | 5 | #include 6 | 7 | using mint = atcoder::modint998244353; 8 | 9 | #include "library/math/factorial_large.hpp" 10 | 11 | int main() { 12 | suisen::factorial_large fac; 13 | 14 | int t; 15 | std::cin >> t; 16 | 17 | while (t--) { 18 | int n; 19 | std::cin >> n; 20 | std::cout << fac.fac(n).val() << '\n'; 21 | } 22 | } -------------------------------------------------------------------------------- /test/src/math/factorial_large/yuki502.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://yukicoder.me/problems/no/502" 2 | 3 | #include 4 | 5 | #include 6 | 7 | using mint = atcoder::modint1000000007; 8 | 9 | #include "library/math/factorial_large.hpp" 10 | 11 | int main() { 12 | long long n; 13 | std::cin >> n; 14 | std::cout << suisen::factorial_large{}.fac(n).val() << '\n'; 15 | } -------------------------------------------------------------------------------- /test/src/math/inv_mods/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/math/modint_extension/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/math/pow_mods/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/math/product_of_differences/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/math/set_power_series/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/math/sum_i^d_r^i/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/math/sum_i^d_r^i/sum_of_exponential_times_polynomial.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/sum_of_exponential_times_polynomial" 2 | 3 | #include 4 | #include 5 | 6 | #include "library/math/sum_i^d_r^i.hpp" 7 | 8 | int main() { 9 | using mint = atcoder::modint998244353; 10 | int r, d; 11 | long long n; 12 | std::cin >> r >> d >> n; 13 | std::cout << suisen::sum_i_i_pow_d_r_pow_i(d, r).sum(n).val() << std::endl; 14 | return 0; 15 | } -------------------------------------------------------------------------------- /test/src/math/sum_i^d_r^i/sum_of_exponential_times_polynomial_limit.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/sum_of_exponential_times_polynomial_limit" 2 | 3 | #include 4 | #include 5 | 6 | #include "library/math/sum_i^d_r^i.hpp" 7 | 8 | int main() { 9 | using mint = atcoder::modint998244353; 10 | int r, d; 11 | std::cin >> r >> d; 12 | std::cout << suisen::sum_i_i_pow_d_r_pow_i(d, r).sum().val() << std::endl; 13 | return 0; 14 | } -------------------------------------------------------------------------------- /test/src/math/unsigned_bigint/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/math/util/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/barrett_reduction/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/bezout_equation/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/count_square_free/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/count_square_free/counting_squarefrees.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/counting_squarefrees" 2 | 3 | #include "library/number/count_square_free.hpp" 4 | 5 | #include 6 | 7 | int main() { 8 | long long n; 9 | std::cin >> n; 10 | std::cout << suisen::count_square_free(n) << std::endl; 11 | } -------------------------------------------------------------------------------- /test/src/number/deterministic_miller_rabin/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/deterministic_miller_rabin_simd/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/discrete_logarithm/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/enumerate_quotient/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/ext_gcd/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/factorial_number/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/factorized_form/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/fast_discrete_logarithm/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/fast_factorize/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/find_denominators/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/garner/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/internal_eratosthenes/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/kth_root_round/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/kth_root_round/kth_root_integer.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/kth_root_integer" 2 | 3 | #include 4 | 5 | #include "library/number/kth_root_round.hpp" 6 | 7 | int main() { 8 | std::ios::sync_with_stdio(false); 9 | std::cin.tie(nullptr); 10 | 11 | int t; 12 | std::cin >> t; 13 | while (t --> 0) { 14 | uint64_t a; 15 | int k; 16 | std::cin >> a >> k; 17 | std::cout << suisen::floor_kth_root(a, k) << '\n'; 18 | } 19 | return 0; 20 | } -------------------------------------------------------------------------------- /test/src/number/linear_sieve/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/min_of_mod_of_linear/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/min_of_mod_of_linear/min_of_mod_of_linear.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/min_of_mod_of_linear" 2 | 3 | #include 4 | 5 | #include "library/number/min_of_mod_of_linear.hpp" 6 | 7 | int main() { 8 | std::ios::sync_with_stdio(false); 9 | std::cin.tie(nullptr); 10 | 11 | int t; 12 | std::cin >> t; 13 | 14 | for (int test_case_id = 0; test_case_id < t; ++test_case_id) { 15 | int n, m, a, b; 16 | std::cin >> n >> m >> a >> b; 17 | 18 | std::cout << suisen::min_of_mod_of_linear(n, m, a, b) << std::endl; 19 | } 20 | } -------------------------------------------------------------------------------- /test/src/number/mobius_function/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/mod_sqrt/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/modint/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/modint_2^61m1/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/montogomery/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/order_Z_mZ/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/primitive_root/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/primitive_root/primitive_root.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/primitive_root" 2 | 3 | #include 4 | 5 | #include "library/number/primitive_root.hpp" 6 | 7 | int main() { 8 | std::ios::sync_with_stdio(false); 9 | std::cin.tie(nullptr); 10 | 11 | int q; 12 | std::cin >> q; 13 | 14 | while (q --> 0) { 15 | long long p; 16 | std::cin >> p; 17 | std::cout << suisen::primitive_root(p) << '\n'; 18 | } 19 | 20 | return 0; 21 | } -------------------------------------------------------------------------------- /test/src/number/rational/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/sieve_of_eratosthenes/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/sieve_of_eratosthenes/next_prime.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://atcoder.jp/contests/abc149/tasks/abc149_c" 2 | 3 | #include 4 | 5 | #include "library/number/sieve_of_eratosthenes.hpp" 6 | 7 | suisen::SimpleSieve<200000> sieve; 8 | 9 | int main() { 10 | int x; 11 | std::cin >> x; 12 | for (;; ++x) { 13 | if (sieve.is_prime(x)) { 14 | std::cout << x << std::endl; 15 | return 0; 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /test/src/number/sieve_of_eratosthenes_constexpr/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/sieve_of_eratosthenes_constexpr/next_prime.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://atcoder.jp/contests/abc149/tasks/abc149_c" 2 | 3 | #include 4 | 5 | #include "library/number/sieve_of_eratosthenes_constexpr.hpp" 6 | 7 | constexpr suisen::SimpleSieveConstexpr sieve; 8 | 9 | int main() { 10 | int x; 11 | std::cin >> x; 12 | for (;; ++x) { 13 | if (sieve.is_prime(x)) { 14 | std::cout << x << std::endl; 15 | return 0; 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /test/src/number/stern_brocot_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/sum_of_mobius_function/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/sum_of_totient_function/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/sum_of_totient_function/sum_of_totient_function.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/sum_of_totient_function" 2 | 3 | #include 4 | #include 5 | 6 | using mint = atcoder::modint998244353; 7 | 8 | #include "library/number/sum_of_totient_function.hpp" 9 | 10 | int main() { 11 | uint64_t n; 12 | std::cin >> n; 13 | suisen::SumOfTotientFunction sum(n); 14 | std::cout << sum().val() << std::endl; 15 | return 0; 16 | } -------------------------------------------------------------------------------- /test/src/number/tetration_mod/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/number/tetration_mod/tetration_mod.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/tetration_mod" 2 | 3 | #include 4 | 5 | #include "library/number/tetration_mod.hpp" 6 | 7 | int main() { 8 | std::ios::sync_with_stdio(false); 9 | std::cin.tie(nullptr); 10 | 11 | int t; 12 | std::cin >> t; 13 | 14 | for (int i = 0; i < t; ++i) { 15 | int a, b, m; 16 | std::cin >> a >> b >> m; 17 | std::cout << suisen::tetration_mod(a, b, m) << '\n'; 18 | } 19 | 20 | return 0; 21 | } -------------------------------------------------------------------------------- /test/src/number/util/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/optimization/alien_dp/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/optimization/k_project_selection_problem/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/optimization/project_selection_problem/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/array_fps_naive/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/berlekamp_massey/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/bostan_mori/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/compose/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/compose_exp/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/compose_inv/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/convert_to_newton_basis/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/formal_power_series/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/formal_power_series_relaxed/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/fps/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/fps_naive/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/lagrange_interpolation/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/multi_point_eval/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/polynomial_gcd/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/polynomial_interpolation/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/polynomial_taylor_shift/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/prod_f(r^k_x)/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/rational_fps/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/rook_polynomial/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/shift_of_sampling_points/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/subset_sum/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/polynomial/vec_sparse_fps/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/range_query/range_chmin_chmax_add_range_sum/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/range_query/range_set_range_composite/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/range_query/static range_count_distinct/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/range_query/static_range_inversion_number_query/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/range_query/static_range_mode_query/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/range_query/static_range_xored_mex_query/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/sequence/bell_number/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/sequence/bernoulli_number/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/sequence/binomial_coefficient/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/sequence/binomial_coefficient_small_prime_mod/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/sequence/binomial_coefficient_small_r_offline/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/sequence/binomial_coefficitnt_enumeration/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/sequence/eulerian_number/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/sequence/montmort_number/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/sequence/montmort_number/montmort_number_mod.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/montmort_number_mod" 2 | 3 | #include 4 | #include 5 | using mint = atcoder::modint; 6 | 7 | #include "library/sequence/montmort_number.hpp" 8 | using suisen::montmort_number; 9 | 10 | int main() { 11 | int n, m; 12 | std::cin >> n >> m; 13 | mint::set_mod(m); 14 | std::vector res = montmort_number(n); 15 | for (int i = 1; i <= n; ++i) { 16 | std::cout << res[i].val() << " \n"[i == n]; 17 | } 18 | return 0; 19 | } -------------------------------------------------------------------------------- /test/src/sequence/partition_number/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/sequence/powers/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/sequence/stirling_number1/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/sequence/stirling_number1_small_prime_mod/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/sequence/stirling_number2/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/sequence/stirling_number2_small_prime_mod/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/sequence/sum_of_powers/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/string/aho_corasick/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/string/aho_corasick_array/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/string/compare_substring/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/string/dynamic_rolling_hash/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/string/manacher/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/string/manacher/enumerate_palindromes.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/enumerate_palindromes" 2 | 3 | #include 4 | #include "library/string/manacher.hpp" 5 | 6 | int main() { 7 | std::string s; 8 | std::cin >> s; 9 | suisen::Manacher manacher(s, '$'); 10 | for (int i = 1; i < 2 * int(s.size()); ++i) std::cout << manacher[i] << '\n'; 11 | return 0; 12 | } -------------------------------------------------------------------------------- /test/src/string/morris_pratt/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/string/palindromic_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/string/rolling_hash/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/string/rolling_hash_field/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/string/run_enumerate/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/string/substring_set/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/string/substring_set/arc097_a.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://atcoder.jp/contests/arc097/tasks/arc097_c" 2 | 3 | #include 4 | 5 | #include "library/string/substring_set.hpp" 6 | using suisen::SubstringSet; 7 | 8 | int main() { 9 | std::string s; 10 | int k; 11 | std::cin >> s >> k; 12 | std::cout << SubstringSet(s)[k] << std::endl; 13 | return 0; 14 | } -------------------------------------------------------------------------------- /test/src/string/substring_set/number_of_substrings.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/number_of_substrings" 2 | 3 | #include 4 | 5 | #include "library/string/substring_set.hpp" 6 | using suisen::SubstringSet; 7 | 8 | int main() { 9 | std::string s; 10 | std::cin >> s; 11 | std::cout << SubstringSet(s).size() - 1 << std::endl; 12 | return 0; 13 | } -------------------------------------------------------------------------------- /test/src/string/suffix_automaton/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/string/suffix_automaton/longest_common_substring.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://judge.yosupo.jp/problem/longest_common_substring" 2 | 3 | #include "library/string/suffix_automaton.hpp" 4 | 5 | #include 6 | 7 | int main() { 8 | std::ios::sync_with_stdio(false); 9 | std::cin.tie(nullptr); 10 | 11 | std::string s, t; 12 | std::cin >> s >> t; 13 | auto [i, j, l] = suisen::SuffixAutomaton{s}.longest_common_substring(t); 14 | std::cout << i << ' ' << i + l << ' ' << j << ' ' << j + l << std::endl; 15 | } -------------------------------------------------------------------------------- /test/src/string/suffix_automaton/yuki430.test.cpp: -------------------------------------------------------------------------------- 1 | #define PROBLEM "https://yukicoder.me/problems/no/430" 2 | 3 | #include 4 | 5 | #include "library/string/suffix_automaton.hpp" 6 | using suisen::SuffixAutomaton; 7 | 8 | int main() { 9 | std::string s; 10 | std::cin >> s; 11 | SuffixAutomaton sa(s); 12 | auto counter = sa.substring_counter(); 13 | int m; 14 | std::cin >> m; 15 | long long ans = 0; 16 | while (m --> 0) { 17 | std::string c; 18 | std::cin >> c; 19 | ans += counter.count(c); 20 | } 21 | std::cout << ans << '\n'; 22 | return 0; 23 | } -------------------------------------------------------------------------------- /test/src/string/trie_array/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/string/trie_map/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/template/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/transform/chirp_z_transform/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/transform/divisor/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/transform/kronecker/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/transform/kronecker_power/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/transform/multiple/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/transform/subset/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/transform/supset/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/transform/walsh_hadamard/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/auxiliary_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/centroid_decomposition/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/contour_sum/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/euler_tour/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/find_centroid/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/frequency_table_of_tree_distance/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/get_path/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/heavy_light_decomposition/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/level_ancestor/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/link_cut_tree/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/link_cut_tree_base/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/link_cut_tree_path_foldable/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/link_cut_tree_path_foldable_lazy/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/lowest_common_anceestor/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/lowest_common_ancestor/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/point_add_range_contour_sum/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/point_add_range_contour_sum_invertible/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/point_get_range_contour_add_invertible/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/point_get_range_contour_operate/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/point_set_range_contour_sum/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/range_contour_sum_invertible/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/rerooting/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/rerooting_invertible/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/tree/tree_isomorphism_classification/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/type_traits/operator/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/type_traits/type_traits/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/bit_utils/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/container_utils/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/coordinate_compressor/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/cumulative_sum/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/cumulative_sum_2d/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/default_operator/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/default_vector/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/grid_utils/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/hashes/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/iter_util/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/object_pool/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/pair_ops/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/permutation/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/pointer_32bit/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/rot90/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/run_length_encoder/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/search/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/step_sum/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/step_view/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/subset_iterator/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/sum_count/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/timer/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/transpose/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/tuple_ops/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/update_proxy_object/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/variant_utils/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/vector_ops/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | -------------------------------------------------------------------------------- /test/src/util/zobrist_hash/.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.gitignore 3 | !*.cpp 4 | combined.cpp 5 | !*.md 6 | --------------------------------------------------------------------------------