1921. Eliminate Maximum Number of Monsters
On This Page
class Solution:
def eliminateMaximum(self, dist: List[int], speed: List[int]) -> int:
times = sorted((d - 1) // s for d, s in zip(dist, speed))
for i, t in enumerate(times):
if t < i:
return i
return len(times)