There are n cities connected by roads with toll prices; find the road whose toll can be increased so that the average price increase across all routes from city 0 to city n-1 is maximized.
Asked in the DSA round stage. Treat roads as directed edges in a DAG. Increasing one road's toll by 1 increases a route's price by 1 exactly when that route uses the road. Return the zero-based road index, breaking ties by smaller index.
Input: n and roads, where each road is [from, to, toll]. Output: an integer road index.
def max_average_increase(n, roads):