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 226 / 270 1500
Divisibility 2 156 / 193 1500
Coprime query 150 / 168 1500
GCD pairs counting 131 / 136 1500
Good string pairs 96 / 104 1500
Permutation problem 86 / 91 1600
Restricted equation 71 / 76 1700
Moving through matrix 74 / 78 1700
Restricted equation 2 50 / 52 1800
Binary matrix 2 53 / 61 1900
Permutation Counting 2 26 / 48 2000