Last Time Balls Leave the Table
Last Time Balls Leave the Table
A 1D table spans [0, L]. There are n balls; ball i starts at position p_i (0 <= p_i <= L) with velocity v_i (positive = right, negative = left, moving `...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
