👤

8. Metro Land Festival Metro Land is a country located on a 2D plane. They are having a summer festival for everyone in the country and would like to minimize the overall cost of travel for their citizens. Costs of travel are calculated as follows: • A city is located at coordinates (x, y). The festival is located at coordinates (a, b). • Cost of travel from a city to the festival = |x-a+ y-b per person. . The festival can be held at any location in Metro Land. Find the optimal location for the festival, defined as the location with the minimal total travel cost assuming all people attend. Determine the total cost of travel for all citizens to go to the festival at that location. Example numPeople = [1, 2] x = [1, 3] y = [1, 3] There is 1 person in City O located at (x[O], y[O]) = (1, 1) and there are 2 people in City 1 at (x[1], y[1]) = (3, 3). If the location for the festival is at (2, 2):