Two City Scheduling - Leetcode 1029 - Python