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 235 / 281 1500
Divisibility 2 161 / 201 1500
Coprime query 158 / 179 1500
GCD pairs counting 137 / 142 1500
Good string pairs 99 / 107 1500
Permutation problem 90 / 95 1600
Restricted equation 74 / 79 1700
Moving through matrix 75 / 80 1700
Restricted equation 2 52 / 54 1800
Binary matrix 2 55 / 63 1900
Permutation Counting 2 26 / 48 2000