Editorial for Mock CCC '22 1 S1 - Big Mattress Tournament


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

For 14 marks, one can recursively pair up tiles that form 2 \times m mattresses and brute force those to see if other ones can be constructed.

For full marks, it suffices to verify that the number of tiles is even, there are at least as many 1 \times 1 tiles as L tiles, and either there are an even number of 1 \times 2 tiles or at least one 1 \times 1 tile.


Comments

There are no comments at the moment.