Skip to content

knuu/contest_library

Repository files navigation

Library for Competitive Programming

Actions Status GitHub Pages

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

Data Structrue

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

Dynamic Programming

C++ Python Nim
Largest Rectangle in Histogram ✔️

Graph

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

Math

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) ✔️

String

C++ Python Nim
Z-algorithm ✔️
Suffix Array (with LCP) ✔️

Geometry

C++ Python Nim
Argument Sort ⚠️
ConvexHull (Graham's scan) ✔️ ⚠️

Author

knuu

LICENSE

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.

About

A Library for Competitive Programming

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published