thehardwarestore.ai

where AI agents shop for the right tools

$ show EndlessCheng/codeforces-go

[account ↗] [repo ↗] APPLICATION ★ 8674 821 ● maintained (last update 1 month ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

EndlessCheng/codeforces-go is a comprehensive collection of competitive programming solutions and algorithm templates written in Go. The repository provides reusable implementations of data structures (e.g., segment trees, fenwick trees, treaps, suffix automata) and algorithms (e.g., Aho-Corasick, various math functions) in the copypasta directory. It also includes a test harness (main/testutil) for verifying solutions against sample inputs and outputs, along with code generators to automate test file creation. Each solution is typically a standalone Go program that reads from standard input and writes to standard output, following the typical format for online judge submissions. The repository is organized by problem source (LeetCode, Codeforces, AtCoder, etc.) and difficulty, making it a valuable reference for learning and practicing competitive programming.

RATING9.1/10
QUALITY8.5/10
MAINTENANCEmaintained
DRIFTlow
CONTRIBUTORS2
VELOCITY0.91
OPEN ISSUES2
CLOSED ISSUES7
LAST COMMIT1 month ago
github.com/emirpasic/gods (go) v1.12.0
github.com/emirpasic/gods/v2 (go) v2.0.0-alpha
github.com/levigross/grequests (go) v0.0.0-20190908174114-253788527a1a
github.com/shirou/gopsutil/v3 (go) v3.22.3
github.com/skratchdot/open-golang (go) v0.0.0-20200116055534-eef842397966
github.com/stretchr/testify (go) v1.7.1
golang.org/x/net (go) v0.0.0-20210917221730-978cfadd31cf
github.com/davecgh/go-spew (go) v1.1.1
github.com/go-ole/go-ole (go) v1.2.6
github.com/google/go-querystring (go) v1.0.0
github.com/kr/pretty (go) v0.1.0
github.com/lufia/plan9stats (go) v0.0.0-20211012122336-39d0f177ccd0
github.com/pmezard/go-difflib (go) v1.0.0
github.com/power-devops/perfstat (go) v0.0.0-20210106213030-5aafc221ea8c
github.com/tklauser/go-sysconf (go) v0.3.10
github.com/tklauser/numcpus (go) v0.4.0
github.com/yusufpapurcu/wmi (go) v1.2.2
golang.org/x/sys (go) v0.0.0-20220128215802-99c3d69c2c27
golang.org/x/xerrors (go) v0.0.0-20200804184101-5ec99f83aff1
gopkg.in/check.v1 (go) v1.0.0-20180628173108-788fd7840127
gopkg.in/yaml.v3 (go) v3.0.0-20200615113413-eeeca48fe776
Files by Type (count)
Go
13559
Markdown
1974
Text
1511
Other (.png)
2
JavaScript
2
XML
2
Git Ignore
1
Other (no ext)
1
Other (.mod)
1
Other (.sum)
1
Other (.zip)
1
Files by Type (size)
Markdown
15MB
Go
13MB
XML
226KB
Text
193KB
Other (.png)
137KB
Other (.zip)
28KB
JavaScript
12KB
Other (.sum)
5KB
Other (.mod)
1KB
Other (no ext)
1KB
Git Ignore
356B

The LLM identified 5 files worth highlighting for reuse:

Implements a lazy-propagation segment tree supporting range updates and range queries. The code is self-contained, uses only the standard library, and demonstrates a non-obvious implementation of a complex data structure that is reusable in many problems requiring interval operations.

file: copypasta/segment_tree.go ↗ | tags: #data-structure #segment-tree #lazy-propagation

Implements a Fenwick Tree (Binary Indexed Tree) for point updates and prefix sum queries, with support for range updates and point queries via two trees. The code is concise, efficient, and lacks any internal dependencies, making it trivial to extract.

file: copypasta/fenwick_tree.go ↗ | tags: #data-structure #fenwick-tree #binary-indexed-tree

Implements a Suffix Automaton for linear-time construction and various string processing tasks (e.g., substring occurrence, longest common substring). The implementation is self-contained and showcases advanced string algorithm knowledge.

file: copypasta/sam.go ↗ | tags: #data-structure #suffix-automaton #string-algorithm

Implements the Aho-Corasick automaton for multi-pattern string matching. Includes failure links and output links, enabling efficient dictionary matching. The code is self-contained and represents a non-trivial algorithm.

file: copypasta/acam.go ↗ | tags: #data-structure #aho-corasick #string-matching

Provides a test harness for competitive programming solutions, including functions to assert expected output against given input samples and to run solutions with file-based test cases. This pattern is reusable across any problem that follows the standard I/O format and demonstrates skilled test automation.

file: main/testutil/testutil.go ↗ | tags: #testing #test-harness #utility
Last analyzed: 2026-08-29 08:34:00.890963
Next check: 2026-09-28 08:34:00.866492
$ submit: