Codeforces-go is a competitive programming algorithm library written in Go, providing a collection of reusable code templates for solving algorithmic problems. It covers core areas including data structures, graph algorithms, dynamic programming, and mathematical computation, with pre-built implementations for segment trees, Fenwick trees, shortest paths, minimum spanning trees, knapsack DP, interval DP, and number theory routines.
The library organizes its templates by algorithmic pattern, grouping them into categories such as DP, graph, and math to match common contest question structures. It is designed for template-based code reuse, offering parameterized code blocks that users adapt by filling in problem-specific logic rather than rewriting from scratch. The project is a zero-dependency Go module that leverages only the standard library.
A test-case generation framework is included, which generates random inputs and compares solution output against a brute-force reference for correctness verification. The entire library is written in Go, utilizing its standard library and concurrency primitives for efficient algorithm execution.