In the Green Heart of Holland the villages are small and the roads narrow. Some roads are only one car wide, so if two cars travelling in the opposite direction meet on such a road, they have a problem. In the Green Heart of Holland there usually is a canal at each side of the road, which makes it is impossible for a car to leave the road to let another car pass. To solve this problem,the roads here and there are made a bit wider, so one car can get aside, and one or more cars from the other side may pass. This works ne, as long as the trafic density is low. If, within a short period of time, a lot of cars from both sides try to pass the road, the tra c will get stuck. Given the number of cars entering at both sides (and the location of the passing places) there must be an optimal schedule, to have them all pass the road as soon as possible. Finding such a schedule may be quite hard, so we will not ask you to do so. We ask you to solve a more simple problem.
Given is a road (running East-West), with its passing points, a number of eastbound cars and a number of westbound cars. (An eastbound car enters the road at the West side). Furthermore a schedule is given, that is, for every pair (e,w), where e is an eastbound car and w is a westbound car, the place where they pass each other is given. If the cars enter the road with long delays, such a schedule may take an arbitrary long time. We assume, however, that all cars are ready to enter the road, and eager to leave the road as soon as possible. We measure the time between the moment the rst car enters the road, and the moment the last car leaves the road, and we want that interval to be as short as possible. All cars either stand still, or are driving with a constant speed of 45 km/h. Starting and stopping does not take any time. Two cars driving in the same direction always keep a distance of at least 25 meter. The distance between two different passing places is at least 30 meter. The length of the cars may be ignored.