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 168 / 212 1500
Divisibility 2 123 / 156 1500
Coprime query 115 / 129 1500
GCD pairs counting 103 / 108 1500
Good string pairs 71 / 80 1500
Permutation problem 61 / 65 1600
Restricted equation 50 / 55 1700
Moving through matrix 55 / 59 1700
Restricted equation 2 38 / 39 1800
Binary matrix 2 42 / 49 1900
Permutation Counting 2 21 / 42 2000