Library for Competitive Programming for C++, Python, Nim-lang
- Status
- ✔️: implemented and verified by verification-helper
⚠️ : implemented but not verified by verification-helper (but most of them are verified by at least one problem)- empty: not implemented yet
C++ | Python | Nim | |
---|---|---|---|
Fenwick Tree (Point Add Range Sum) | ✔️ | ||
Matrix | ✔️ | ||
k-D Tree | |||
Range Tree | |||
Segment Tree (Point Update Range Query) | ✔️ | ||
Union-Find | ✔️ | ||
Weighted Union-Find | ✔️ |
- Notes
- Range Tree of Python: only 2-dimensional
C++ | Python | Nim | |
---|---|---|---|
Largest Rectangle in Histogram | ✔️ |
C++ | Python | Nim | |
---|---|---|---|
Shortest Path (Bellman-Ford) | |||
Shortest Path (Dijkstra) | |||
All Pairs Shortest Path (Floyd-Warshall) | |||
Maximum Flow (Ford-Fulkerson) | |||
Maximum Flow (Dinic) | ✔️ | ||
Minimum Cost Flow (Primal-Dual) | ✔️ | ||
Bipartite Matching | |||
Minimum Spanning Tree (Prim) | |||
Minimum Spanning Tree (Kruskal) | |||
Minimum Ratio Spanning Tree | |||
Strongly Connected Componets | ✔️ | ✔️ | |
Lowest Common Anscestor | ✔️ | ✔️ | |
Heavy Light Decomposition (Centroid Path Decomposition) |
✔️ | ||
Maximum Independet Set | ✔️ | ||
Tree Diameter | ✔️ | ||
2 Sat | ✔️ | ✔️ |
- Notes
- Bipartite Matching of C++: using Dinic
- Lowest Common Anscestor
- C++: using Doubling / Heavy Light Decomposition
- Python: using Doubling
C++ | Python | Nim | |
---|---|---|---|
Discrete Logarithm (Baby-Step Giant-Step) | ✔️ | ||
Prime Factorization | |||
Sieve of Eratosthenes | |||
Euler's Totient Function | ✔️ | ||
Extended Euclid Algorithm | ✔️ | ||
Linear Equation Solver | |||
Linear Recursion Solver | |||
K-th Root (Simple) | ✔️ |
C++ | Python | Nim | |
---|---|---|---|
Z-algorithm | ✔️ | ||
Suffix Array (with LCP) | ✔️ |
C++ | Python | Nim | |
---|---|---|---|
Argument Sort | |||
ConvexHull (Graham's scan) | ✔️ |
knuu
This library is released under the MIT License. However, when you use a part of this library for submitting to a judge server or the like for competition programming, you can omit the copyright notice and the permission notice.