Saturday, August 14, 2010

UVa 617 Nonstop Travel

Problem: given the positions and cycle-lengths of a set of traffic signals, find integer speeds between 30 and 60 that pass through all signals without stopping.

Solution: iterately checking that if a given speed s make the car pass through all signals.

No comments: