New #
- Aho Corasick (Problem Link)
- Deque (Problem Link)
- Dirichlet Convolution and Prefix Sums (Problem Link)
- Incremental Minimum Spanning Forest (Problem Link)
- Majority Voting (Problem Link)
- Minimum Enclosing Circle (Problem Link)
- Minimum Steiner Tree (Problem Link)
- Pfaffian of Matrix (Problem Link)
- Range Add Range Min (Problem Link)
- Static Range Sum with Upper Bound (Problem Link)
- Sum of Multiplicative Function (Problem Link)
Sample #
Data Structure #
- Associative Array (Problem Link)
- Predecessor Problem (Problem Link)
- Ordered Set (Problem Link)
- Double-Ended Priority Queue (Problem Link)
- Unionfind (Problem Link)
- Unionfind with Potential (Problem Link)
- Unionfind with Potential (Non-Commutative Group) (Problem Link)
- Range Parallel Unionfind (Problem Link)
- Static Range Sum (Problem Link)
- Static RMQ (Problem Link)
- Point Add Range Sum (Problem Link)
- Point Set Range Composite (Problem Link)
- Point Set Range Composite (Large Array) (Problem Link)
- Range Affine Point Get (Problem Link)
- Range Affine Range Sum (Problem Link)
- Range Affine Range Sum (Large Array) (Problem Link)
- Persistent Range Affine Range Sum (Problem Link)
- Range Set Range Composite (Problem Link)
- Range Chmin Chmax Add Range Sum (Problem Link)
- Range Kth Smallest (Problem Link)
- Point Set Range Sort Range Composite (Problem Link)
- Range Reverse Range Sum (Problem Link)
- Dynamic Sequence Range Affine Range Sum (Problem Link)
- Range Linear Add Range Min (Problem Link)
- Set Xor-Min (Problem Link)
- Line Add Get Min (Problem Link)
- Segment Add Get Min (Problem Link)
- Queue Operate All Composite (Problem Link)
- Deque Operate All Composite (Problem Link)
- Static Range Frequency (Problem Link)
- Static Range Count Distinct (Problem Link)
- Static Range Mode Query (Problem Link)
- Static Range LIS Query (Problem Link)
- Static Range Inversions Query (Problem Link)
- Point Set Range Frequency (Problem Link)
- Rectangle Sum (Problem Link)
- Point Add Rectangle Sum (Problem Link)
- Rectangle Add Point Get (Problem Link)
- Static Rectangle Add Rectangle Sum (Problem Link)
- Dynamic Point Rectangle Affine Rectangle Sum (Problem Link)
- Area of Union of Rectangles (Problem Link)
- Persistent Queue (Problem Link)
- Persistent Unionfind (Problem Link)
Graph #
- Cycle Detection (Directed) (Problem Link)
- Cycle Detection (Undirected) (Problem Link)
- Shortest Path (Problem Link)
- Strongly Connected Components (Problem Link)
- Strongly Connected Components (Incremental) (Problem Link)
- K-Shortest Walk (Problem Link)
- Two-Edge-Connected Components (Problem Link)
- Three-Edge-Connected Components (Problem Link)
- Biconnected Components (Problem Link)
- Connected Components of Complement Graph (Problem Link)
- Eulerian Trail (Directed) (Problem Link)
- Eulerian Trail (Undirected) (Problem Link)
- st-Numbering (Problem Link)
- Minimum Cost b-flow (Problem Link)
- Matching on Bipartite Graph (Problem Link)
- Matching on General Graph (Problem Link)
- General Weighted Matching (Problem Link)
- Edge Coloring of Bipartite Graph (Problem Link)
- Assignment Problem (Problem Link)
- Minimum Spanning Tree (Problem Link)
- Directed MST (Problem Link)
- Minimum Diameter Spanning Tree (Problem Link)
- Dominator Tree (Problem Link)
- Maximum Independent Set (Problem Link)
- Chromatic Number (Problem Link)
- Chromatic Polynomial (Problem Link)
- Enumerate Triangles (Problem Link)
- Enumerate Cliques (Problem Link)
- Counting $C _ 4$'s (Problem Link)
- Tree Decomposition (Width 2) (Problem Link)
- Global Minimum Cut of Dynamic Star Augmented Graph (Problem Link)
- Chordal Graph Recognition (Problem Link)
- Dynamic Graph Vertex Add Component Sum (Problem Link)
- Counting Eulerian Circuits (Problem Link)
- Counting Spanning Trees (Undirected) (Problem Link)
- Counting Spanning Trees (Directed) (Problem Link)
Tree #
- Tree Diameter (Problem Link)
- Lowest Common Ancestor (Problem Link)
- Jump on Tree (Problem Link)
- Frequency Table of Tree Distance (Problem Link)
- Rooted Tree Isomorphism Classification (Problem Link)
- Tree Path Composite Sum (Problem Link)
- Vertex Add Path Sum (Problem Link)
- Vertex Set Path Composite (Problem Link)
- Vertex Add Subtree Sum (Problem Link)
- Vertex Add Range Contour Sum on Tree (Problem Link)
- Vertex Get Range Contour Add on Tree (Problem Link)
- Point Set Tree Path Composite Sum (Fixed Root) (Problem Link)
- Point Set Tree Path Composite Sum (Problem Link)
- Dynamic Tree Vertex Add Path Sum (Problem Link)
- Dynamic Tree Vertex Set Path Composite (Problem Link)
- Dynamic Tree Vertex Add Subtree Sum (Problem Link)
- Dynamic Tree Subtree Add Subtree Sum (Problem Link)
- Cartesian Tree (Problem Link)
- Common Interval Decomposition Tree (Problem Link)
- Rooted Tree Topological Order with Minimum Inversions (Problem Link)
Convolution #
- Convolution (Problem Link)
- Convolution (Mod 1,000,000,007) (Problem Link)
- Convolution (Mod 2^64) (Problem Link)
- Convolution (Large) (Problem Link)
- Bitwise And Convolution (Problem Link)
- Bitwise Xor Convolution (Problem Link)
- Gcd Convolution (Problem Link)
- Lcm Convolution (Problem Link)
- Multidimensional Convolution (Truncated) (Problem Link)
- Multidimensional Convolution (Circular) (Problem Link)
- Convolution on the Multiplicative Monoid of $\mathbb{Z} / P\mathbb{Z}$ (Problem Link)
- Convolution on the Multiplicative Monoid of $\mathbb{Z} / 2^N\mathbb{Z}$ (Problem Link)
- Min Plus Convolution (Convex and Arbitrary) (Problem Link)
- Min Plus Convolution (Convex and Convex) (Problem Link)
- Min Plus Convolution (Concave and Arbitrary) (Problem Link)
Number Theory #
- Enumerate Quotients (Problem Link)
- Primality Test (Problem Link)
- Counting Primes (Problem Link)
- Enumerate Primes (Problem Link)
- Factorize (Problem Link)
- Primitive Root (Problem Link)
- Sum of Floor of Linear (Problem Link)
- Min of Mod of Linear (Problem Link)
- Rational Approximation (Problem Link)
- Stern–Brocot Tree (Problem Link)
- Counting Square-free Integers (Problem Link)
- Sum of Totient Function (Problem Link)
- Sum of Multiplicative Function(Large) (Problem Link)
- Bernoulli Number (Problem Link)
- Sqrt Mod (Problem Link)
- Kth Root (Mod) (Problem Link)
- Kth Root (Integer) (Problem Link)
- Discrete Logarithm (Problem Link)
- Tetration Mod (Problem Link)
- Gcd of Gaussian Integers (Problem Link)
- Represent A Number As Two Square Sum (Problem Link)
- Nim Product ($\mathbb{F}_{2^{64}}$) (Problem Link)
Polynomial #
- Inv of Formal Power Series (Problem Link)
- Exp of Formal Power Series (Problem Link)
- Log of Formal Power Series (Problem Link)
- Pow of Formal Power Series (Problem Link)
- Sqrt of Formal Power Series (Problem Link)
- Composition of Formal Power Series (Problem Link)
- Compositional Inverse of Formal Power Series (Problem Link)
- Inv of Formal Power Series (Sparse) (Problem Link)
- Exp of Formal Power Series (Sparse) (Problem Link)
- Log of Formal Power Series (Sparse) (Problem Link)
- Pow of Formal Power Series (Sparse) (Problem Link)
- Sqrt of Formal Power Series (Sparse) (Problem Link)
- Product of Polynomial Sequence (Problem Link)
- Multipoint Evaluation (Problem Link)
- Multipoint Evaluation (Geometric Sequence) (Problem Link)
- Polynomial Interpolation (Problem Link)
- Polynomial Interpolation (Geometric Sequence) (Problem Link)
- Polynomial Taylor Shift (Problem Link)
- Shift of Sampling Points of Polynomial (Problem Link)
- Division of Polynomials (Problem Link)
- Inv of Polynomials (Problem Link)
- Conversion from Monomial Basis to Newton Basis (Problem Link)
- Polynomial Root Finding (Mod 998244353) (Problem Link)
- Composition of Formal Power Series (Large) (Problem Link)
- Compositional Inverse of Formal Power Series (Large) (Problem Link)
Set Power Series #
- Subset Convolution (Problem Link)
- Power Projection of Set Power Series (Problem Link)
- Exp of Set Power Series (Problem Link)
- Polynomial Composite Set Power Series (Problem Link)
Enumerative Combinatorics #
- Factorial (Problem Link)
- Many Factorials (Problem Link)
- Montmort Number (Problem Link)
- Bell Number (Problem Link)
- Binomial Coefficient (Problem Link)
- Binomial Coefficient (Prime Mod) (Problem Link)
- $q$-Binomial Coefficient (Prime Mod) (Problem Link)
- Partition Function (Problem Link)
- Stirling Number of the First Kind (Problem Link)
- Stirling Number of the First Kind (Fixed K) (Problem Link)
- Stirling Number of the Second Kind (Problem Link)
- Stirling Number of the Second Kind (Fixed K) (Problem Link)
- Stirling Number of the First Kind (Small p, Large n) (Problem Link)
- Stirling Number of the Second Kind (Small p, Large n) (Problem Link)
- $\#_p$ Subset Sum (Problem Link)
- Number of Subsequences (Problem Link)
- Number of Increasing Sequences Between Two Sequences (Problem Link)
Linear Algebra #
- Matrix Product (Problem Link)
- Matrix Product (Mod 2) (Problem Link)
- Pow of Matrix (Problem Link)
- Determinant of Matrix (Problem Link)
- Determinant of Matrix (Arbitrary Mod) (Problem Link)
- Determinant of Matrix (Mod 2) (Problem Link)
- Determinant of Sparse Matrix (Problem Link)
- Rank of Matrix (Problem Link)
- Rank of Matrix (Mod 2) (Problem Link)
- System of Linear Equations (Problem Link)
- System of Linear Equations (Mod 2) (Problem Link)
- Inverse Matrix (Problem Link)
- Inverse Matrix (Mod 2) (Problem Link)
- Adjugate Matrix (Problem Link)
- Characteristic Polynomial (Problem Link)
- Hafnian of Matrix (Problem Link)
- Intersection of $\mathbb{F}_{2}$ vector spaces (Problem Link)
String #
- Z Algorithm (Problem Link)
- Enumerate Palindromes (Problem Link)
- Suffix Array (Problem Link)
- Number of Substrings (Problem Link)
- Run Enumerate (Problem Link)
- Prefix-Substring LCS (Problem Link)
- Lyndon Factorization (Problem Link)
- Longest Common Substring (Problem Link)
- Eertree (Problem Link)
- Palindromes in Deque (Problem Link)
- Wildcard Pattern Matching (Problem Link)
Geometry #
- Sort Points by Argument (Problem Link)
- Static Convex Hull (Problem Link)
- Count Points in Triangles (Problem Link)
- Closest Pair of Points (Problem Link)
- Furthest Pair of Points (Problem Link)
- Convex Layers (Problem Link)
- Manhattan MST (Problem Link)
- Euclidean MST (Problem Link)
Big Integer #
- Addition of Big Integers (Problem Link)
- Multiplication of Big Integers (Problem Link)
- Division of Big Integers (Problem Link)
- Addition of Hex Big Integers (Problem Link)
- Multiplication of Hex Big Integers (Problem Link)
- Division of Hex Big Integers (Problem Link)
Other #
- 2 Sat (Problem Link)
- Longest Increasing Subsequence (Problem Link)
- $\sum_{i=0}^{n-1} r^i i^d$ (Problem Link)
- $\sum_{i=0}^{\infty} r^i i^d$ (Problem Link)
- Find Linear Recurrence (Problem Link)
- Kth term of Linearly Recurrent Sequence (Problem Link)
- Consecutive Terms of Linear Recurrent Sequence (Problem Link)