Introduction - If you have any usage issues, please Google them yourself
An oil company plans to construct a east to west from the main pipeline. The pipeline to pass through an oil field n wells. Wells from each must have a pipeline along the shortest path (or South or North) connected with the competent Road. If given the location of oil wells in n, that is, their x coordinates (east-west) and y coordinates (north-south), should be how to determine the optimal position in charge of Road, even if the wells to the pipeline in charge of Road between the sum of the smallest length location? proved to be linear time to determine the optimal position in charge of Road. 芦Programming mission: to set the location of oil wells n, programmed to calculate the well-to-charge of Road between the length of the sum of the smallest oil pipeline.