Difficulty: Medium
Acceptance: 69.00%
Points: 30.00
You are given an array dist where dist[i] represents the distance of the ith train ride, and a floating-point number hour representing the total time available. Each train can only depart at an integer hour. This means after finishing a train ride, you may need to wait until the next integer hour before starting the next train, except for the last train which does not require waiting. Return the minimum integer speed required to travel all distances within the given hour. If it is not possible to arrive on time, return -1.
N/A
