This repository contains templates, algorithms and data structures implemented and collected for programming contests. Most of them are at least used once to check correctness, still it is strongly recommended to test for yourself.
- Convex Hull Line Container.cpp
- Convex Hull Trick.cpp
- Digit DP Sample 2.cpp
- Digit DP Sample.cpp
- Divide and Conquer DP.cpp
- Dynamic Convex Hull Trick.cpp
- Edit Distance Recursive.cpp
- IOI Aliens by koosaga.cpp
- In-out DP.cpp
- Knuth Optimization.cpp
- LCS.cpp
- LIS nlogk.cpp
- Matrix Expo Class.cpp
- Palindrome in a String.cpp
- 2D BIT.cpp
- 2D Segment Tree.cpp
- A DSU Problem.cpp
- BIT Range Update Range Query.cpp
- Best Partial Sum in a Range.cpp
- Binary Indexed Tree.cpp
- Centroid Decomposition Sample.cpp
- Centroid Decomposition.cpp
- Counting Inversions with BIT.cpp
- DSU on Tree Sample.cpp
- Dynamic Segment Tree with Lazy Prop.cpp
- Dynamic Segment Tree.cpp
- Fenwick Tree 3D.cpp
- GP Hash Table.cpp
- HLD Sample Problem.cpp
- HashMap.cpp
- Heavy Light Decomposition.cpp
- How Many Values Less than a Given Value.cpp
- Li Chao Tree Lines.cpp
- Li Chao Tree Parabolic Sample.cpp
- Mo Algorithm Example.cpp
- Mo on Tree Path.cpp
- Order Statistics Tree.cpp
- Ordered Multiset.cpp
- Persistent Segment Tree 1.cpp
- Persistent Segment Tree 2.cpp
- Persistent Trie.cpp
- RMQ Sparse Table.cpp
- Range Sum Query by Lazy Propagation.cpp
- Rope.cpp
- Segment Tree with Lazy Prop.cpp
- Splay Tree.cpp
- Venice Technique.cpp
- Convex Hull.cpp
- Counting Closest Pair of Points.cpp
- Maximum Points to Enclose in a Circle of Given Radius with Angular Sweep.cpp
- Point in Polygon Binary Search.cpp
- Rectangle Union.cpp
- 0-1 BFS.cpp
- 2-SAT 2.cpp
- 2-SAT.cpp
- Articulation Points and Bridges.cpp
- BCC.cpp
- Bellman Ford.cpp
- Cycle in a Directed Graph.cpp
- Dijkstra!.cpp
- Dominator Tree.cpp
- Edge Coloring.cpp
- Edmonds Matching.cpp
- Faster Weighted Matching.cpp
- Global Minimum Cut.cpp
- Hopcroft Karp.cpp
- Hungarian Weighted Matching.cpp
- Johnson's Algorithm.cpp
- Kruskal.cpp
- LCA 2.cpp
- LCA.cpp
- Manhattan MST.cpp
- Max Flow Dinic 2.cpp
- Max Flow Dinic.cpp
- Max Flow Edmond Karp.cpp
- Max Flow Ford Fulkerson.cpp
- Max Flow Goldberg Tarjan.cpp
- Maximum Bipartite Matching and Min Vertex Cover.cpp
- Maximum Matching in General Graphs (Randomized Algorithm).cpp
- Min Cost Arborescence.cpp
- Min Cost Max Flow 1.cpp
- Min Cost Max Flow 2.cpp
- Min Cost Max Flow 3.cpp
- Min Cost Max Flow with Bellman Ford.cpp
- Minimum Path Cover in DAG.cpp
- Prim MST.cpp
- Push Relabel 2.cpp
- Push Relabel.cpp
- SCC Kosaraju.cpp
- SCC Tarjan.cpp
- SPFA.cpp
- Tree Construction with Specific Vertices.cpp
- kth Shortest Path Length.cpp
- CRT Diophantine.cpp
- Euler Phi.cpp
- FFT 1.cpp
- FFT 2.cpp
- FFT Extended.cpp
- FFT Modulo.cpp
- FFT by XraY.cpp
- Fast Integer Cube and Square Root.cpp
- Fast Walsh-Hadamard Transform.cpp
- Faulhaber's Formula (Custom Algorithm).cpp
- Faulhaber's Formula.cpp
- Gauss Elimination Equations Mod Number Solutions.cpp
- Gauss Jordan Elimination.cpp
- Gauss Xor.cpp
- Gaussian 1.cpp
- Gaussian 2.cpp
- Karatsuba.cpp
- Linear Diophantine.cpp
- Matrix Expo.cpp
- Number Theoretic Transform.cpp
- Segmented Sieve.cpp
- Sieve (Bitmask).cpp
- Sieve.cpp
- Simplex.cpp
- Sum of Kth Power.cpp
- Divide and Conquer on Queries.cpp
- Gilbert Curve for Mo.cpp
- HakmemItem175.cpp
- Header.cpp
- Integral Determinant.cpp
- Inverse Modulo 1 to N (Linear).cpp
- Josephus Problem.cpp
- MSB Position in O(1).cpp
- Nearest Smaller Values on Left-Right.cpp
- Next Small.cpp
- Random Number Generation.cpp
- Russian Peasant Multiplication.cpp
- Stable Marriage Problem.cpp
- Thomas Algorithm.cpp
- U128.cpp
- Useful Templates.cpp
- int128.cpp
- Advanced Modular Arithmetic.pdf
- Counting Divisors in O(cubicroot(n)).pdf
- Flow with Demand.pdf
- General_Ideas.pdf
- Graph_Concepts_that_I_Forget.pdf
- Hall Theorem.pdf
- Let_s_Pull_Some_Strings.pdf
- Minimum_vertex_disjoint_path_on_a_DAG.pdf
- Notes_on_FFT_Problems.pdf
- Notes_on_FFT_Problems_2.pdf
- Posets.pdf
- Sum_of_Subsets_DP_with_Bitmasks.pdf
- System of Difference Constraints.pdf
- Team Note (koosaga-hyea-alex).pdf
- XOR_Maximization_with_Gaussian_Elimination.pdf
- dp_optimizations.pdf
- A KMP Application.cpp
- Aho Corasick 2.cpp
- Aho Corasick Occurrence Relation.cpp
- Aho Corasick.cpp
- Double Hash.cpp
- Dynamic Aho Corasick Sample.cpp
- Dynamic Aho Corasick.cpp
- KMP 2.cpp
- KMP 3.cpp
- Manacher-s Algorithm.cpp
- Minimum Lexicographic Rotation.cpp
- Palindrome Factorization.cpp
- Palindromic Tree.cpp
- String Split by Delimiter.cpp
- Suffix Array 2.cpp
- Suffix Array.cpp
- Suffix Automata 2.cpp
- Suffix Automata.cpp
- Trie 1.cpp
- Trie 2.cpp
- Z Algorithm.cpp