Problem K. Transport Construction

HDU - 6329