Problem #PRU-111643

Problems Discrete Mathematics Algorithm Theory Theory of algorithms (other)

Problem

In 10 boxes there are pencils (there are no empty boxes). It is known that in different boxes there is a different number of pencils, and in each box, all pencils are of different colors. Prove that from each box you can choose a pencil so that they will all be of different colors.