Editorial for WC '18 Finals J1 - Conditional Contracts
Submitting an official solution before solving the problem yourself is a bannable offence.
Let's ignore the requirement that the two film widths must be distinct (as using the same film width twice cannot result in employing more actors anyway). Then, each chosen film width might as well be equal to at least one actor's required film width (as it cannot be better to choose a film width required by no actors). This gives us at most
The time complexity of the above approach is
Comments