Editorial for DMOPC '14 Contest 3 P3 - Not Enough Personnel!
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.
Author:
Store all the veterans into a list, then for every single new employee with skill level and adaptability factor , find all veterans whose skill level, , such that . Then, take the min of the list based on skill level. You might need to use a stable sort if your language's min
function doesn't return the first element with minimum value.
Comments