Module Inclusion-exclusion principle

Inclusion-exclusion principle

**Frequency: 5/10** A commonly used technique in solving combinatorics problem.

Resources

- [CP Algorithms: The Inclusion-Exclusion Principle](https://cp-algorithms.com/combinatorics/inclusion-exclusion.html)

Problems

Divisibility 110 / 147 1500
Divisibility 2 79 / 105 1500
Coprime query 79 / 87 1500
GCD pairs counting 70 / 76 1500
Good string pairs 38 / 44 1500
Permutation problem 40 / 43 1600
Restricted equation 31 / 35 1700
Moving through matrix 30 / 32 1700
Restricted equation 2 16 / 16 1800
Binary matrix 2 26 / 30 1900
Permutation Counting 2 13 / 25 2000