Editorial for ICPC NEERC 2010 E - Evacuation Plan
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.
- Sort the team's and shelter's locations
- The optimal assignment will assign consecutive ranges of teams to a shelter (after sorting)
- Find the answer using two-parameter dynamic programming considering this sub-problem:
- – the total fuel required to match the first teams to the first shelters
Comments