Editorial for COCI '22 Contest 3 #1 Estimathon
Submitting an official solution before solving the problem yourself is a bannable offence.
First, if NE
. Why? Because for each table we need to use chairs of the same colour.
Therefore, we can use
If we have less than NE
. Why? Let us look at these two cases:
We do not use that colour (Domagoj is sad), we pair these chairs with chairs of some other colour (Paula is
sad), and we want to make them both happy :).
Third and final check: can we fill all the tables with chairs? For some colour NE
; otherwise,
the answer is DA
.
Comments