Skip to content

ICPC Book

竞赛算法速查 · 找到模板,查看约定,抄写实现。

Data Structure 59

Range-query structures and union-find variants.

point_add_range_sum · point_set_range_freq · range_add_point_get

Graph 64

Tree techniques, graph decompositions, matching, and path algorithms.

heavy_light_decomposition · lowest_common_ancestor · dsu_on_tree

String 15

Pattern matching, hashing, automata, and string factorization.

rolling_hash · manacher · minimal_string

Math 81

Modular arithmetic, number theory, combinatorics, and convolution.

binomial · combinatorial_sequences · extended_gcd

Geometry 11

Geometric primitives and operations for planar algorithms.

geometry_base · circle_geometry · closest_pair

DP 3

Reusable dynamic-programming routines and common sequence problems.

knapsack · longest_increasing_subsequence · longest_common_subsequence

Optimization 8

Techniques for accelerating searches, transitions, and convolutions.

max_plus_convolution · convex_hull_trick · smawk

Utility 6

Common includes, debugging helpers, and random-number utilities.

debug · head · io