### PROBLEM LINKS

### DIFFICULTY

EASY

### EXPLANATION

Nothing really special here. Let t _ i be the earliest time we can arrive at station i with the base case t _ 0 = 0. Then given t _ i we can easily compute t _ {i+1} by waiting from time t _ i until the next train departs from station i, and then adding the travel time to this departure time to get t _ {i+1}.

### SETTER’S SOLUTION

Can be found here.

### TESTER’S SOLUTION

Can be found here.