A collection of algorithms for use in programming competitions / online judges.
- Easy to copy & paste (or type out in the contest environment with a printed team note)
- Unit tests as documentation
- (Planned) Auto-generate a team note
The compiler should be GCC to be able to use bits/stdc++.h
.
We use CMake for building this project.
Use CMake Tools for VS Code.
Run CMake: Configure
every time you add a new source file.
CXX=/usr/local/bin/g++-9 cmake -S . -B build
cd build
make
Change CXX=...
part to set the compiler in your local environment.
- Dynamic segtree
- Union-find tree
- Sparse table
- Sqaure root decomposition + Mo's Algorithm
- LCA
- BCC
- HLD
- Euler tour
- Floor sum
- Trie
- Rabin-Karp hashing
- Suffix array