Skip to content
Navigation
Algorithms for Competitive Programming
Segment Tree
Search
Search
cp-algorithms/cp-algorithms
Algorithms for Competitive Programming
cp-algorithms/cp-algorithms
Home
Home
Main Page
Navigation
Tag index
How to Contribute
Code of conduct
Preview
Algebra
Algebra
Fundamentals
Fundamentals
Binary Exponentiation
Euclidean algorithm for computing the greatest common divisor
Extended Euclidean Algorithm
Linear Diophantine Equations
Fibonacci Numbers
Prime numbers
Prime numbers
Sieve of Eratosthenes
Linear Sieve
Primality tests
Integer factorization
Number-theoretic functions
Number-theoretic functions
Euler's totient function
Number of divisors / sum of divisors
Modular arithmetic
Modular arithmetic
Modular Inverse
Linear Congruence Equation
Chinese Remainder Theorem
Garner's Algorithm
Factorial modulo p
Discrete Log