Editorial for COCI '12 Contest 2 #4 Popust
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.
Submitting an official solution before solving the problem yourself is a bannable offence.
What does an optimal solution for a given
meals with the lowest price and one meal with the lowest price (out of the remaining meals) meals with the lowest price, where one of them is chosen as first (subtracting its price and replacing it with the price – obviously, the one with the lowest )
Let us sort the meals by ascending
Comments