Shortest paths for teams of vehicles