1class Solution:2 def minRefuelStops(self, t, F, S):3 S.append([t, 0])4 heap, ans = [], 05 for p, f in S:6 while heap and p > F:7 F -= heapq.heappop(heap)8 ans += 19 if p > F:10 return -111 heapq.heappush(heap, -f)12 return ans
WPM •0 •0
ACC •0 •0
TIME •0