Home - YessineJallouli/Competitive-Programming GitHub Wiki
Welcome to the Competitive-Programming wiki!
Tools for contest :
Stress Test
Squelette
CodeJam HackerCup
Testing Tool For GCJ
Number Theory :
Sieve of Eratosthenes
Euler totient function (phi)
Möbius Function
Pollard's rho Factorization
Carmichael Totient
General Sieve (RAMI)
Chinese Remainder Theorem
Extended Euclidean Algorithm
Combinatorics :
Binomial coefficient O(N) && O(N^2)
Lucas's theorem
Mathematics :
Matrices
FFT
FFT with modulo
NTT
Xor Algebra (Matrix mod 2)
Linear Algebra
Interpolation
Graph Theory :
Shortest path : Dijkstra
Shortest path : Bellman Ford
Shortest path : Floyd Warshall
Topological Sort
Strongly Connected Components (SCC) : Kosaraju's algorithm
Krushkal's MST (Minimum Spanning Tree)
Prim's MST (Minimum Spanning Tree)
Rerooting
LCA (Lowest Common Ancestor)
Union Find
Bipartite matching : Hungarian algorithm
Bipartite matching : Kuhn's algorithm
Data Structures
Ordered Statistic Tree (__gnu_pbds)
Segment Tree
2D Segment Tree
Segment Tree Lazy propagation
Ordered Segment Tree
Dynamic Segment Tree
Persistent Dynamic Segment Tree
Fenwick Tree (BIT)
Sparse Table (RMQ)
Trie
0-1 Trie
Li-Chao
Algorithms :
Mo's Algorithm
Mo's on tree (Query on Subtree)
Mo's on tree (Query on Path)
Mo's & Update
Heavy Light Decomposition
HLD : Non Commutative Merge
Centroid Decomposition
Strings :
Prefix function. KMP algorithm
Z-function
Suffix array
Techniques :
Xor Basis
Sliding Window Maximum
2-SAT
Convex Hull Trick (CHT)
And Convolution
Xor Convolution
Gcd Convolution
Lcm Convolution
Tree Isomorphism