Algorithms_with_Shayan's blog

By Algorithms_with_Shayan, history, 12 months ago, In English

Hey Codeforces,

I've prepared an animation explaining the pigeonhole principle. This video can help kids and newcomers become familiar with fundamental math and computer science. I also explain it in text in this Codeforces blog.

Pigeonhole Principle

The pigeonhole principle states that if n pigeons are in m holes and n > m, then at least one hole has more than one pigeon.

How's that Useful?

The pigeonhole principle is a way of thinking to solve problems. It's an approach to problems by modeling some objects as pigeons and some objects as pigeonholes. Then, by applying the pigeonhole principle, we can solve the problem.

I have solved two exemplary problems using the pigeonhole principle in the video.

Also, this problem from Codeforces can be solved by applying the pigeonhole principle:

Kuroni and Impossible Calculation

I'd love to hear your feedback about how I can be more helpful and make better videos.

Here is the link to the video: https://www.youtube.com/watch?v=J3VrsRGKZO4

Thank you,

Shayan