Pixel · Easy CodeFree
No Brakes Allowed
A wind-up toy train has no brakes: once released, it races through every clockwork gate. Each gate opens and shuts to its own rhythm. When is the earliest moment you can let go?
Find the earliest departure that gets through every gate.
The number must be exactly right.
N T, the number of gates and the latest departure to try.N lines: p a d for each gate, in the order the train meets them.-1.N ≤ 20, 0 ≤ T ≤ 1 000a ≤ p ≤ 20; 1 ≤ d ≤ 200, growing from gate to gate3 10 4 2 1 5 2 3 3 2 5
7
Sign in to play. It is free.
Sign in