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 145 / 186 1500
Divisibility 2 109 / 139 1500
Coprime query 100 / 113 1500
GCD pairs counting 91 / 96 1500
Good string pairs 59 / 68 1500
Permutation problem 54 / 58 1600
Restricted equation 46 / 51 1700
Moving through matrix 50 / 54 1700
Restricted equation 2 34 / 35 1800
Binary matrix 2 40 / 47 1900
Permutation Counting 2 20 / 39 2000