My own competitive programming library designed to be used in both presential contests, like ICPC, or online platforms such as Codeforces, AtCoder, etc...
Some notes about the implementations:
-
Each implementation should be self-contained, so once you typed or copied there is no need to look for other files, the only "template" you need is :
#include<bits/stdc++.h> using namespace std;
-
Should be as short as possible, as you may have to type it in a presential contest
You can find a little explanation about each algorithm at the PDF Notebook
-
Segtree Dynamic
-
Segtree Point Update (Bottom Up)
-
Segtree Point Update (Top Down)
-
Segtree Range Update (Bottom Up)
-
Segtree Range Update (Top Down)
-
Digits
- binary to gray
- closest value greater than
- get permutation cycles
- hanoi tower
- meet in the middle
- mos algorithm
- ternary search recursive
- to any base
- check point inside triangle
- convex hull
- determinant
- equals
- line
- point struct and utils (2d)
- polygon lattice points
- segment intersection
- segment
- template line
- template point
- template segment
-
Flow Problems
- GCD
- LCM
- arithmetic progression sum
- binomial mod
- binomial
- chinese remainder theorem
- derangement
- euler phi (in range)
- euler phi
- factorial factorization
- factorization (Pollard)
- factorization
- fast pow
- fft convolution
- find multiplicative inverse
- find solution diophantine equation
- gauss elimination
- integer mod
- integer partition
- linear recurrence
- list n elements choose k
- matrix exponentiation
- ntt int convolution and exp
- ntt int convolution two mods
- power sum
- sieve list primes