class Solution: def twoCitySchedCost(self, costs: List[List[int]]) -> int: costs.sort(key=lambda x: x[0]-x[1]) return sum([i[0] for i in costs[:len(costs)//2]]+[i[1] for i in costs[len(costs)//2:]])