Problem 2391 · Medium

Minimum Amount of Time to Collect Garbage

Each truck pays the travel up to its last house and every piece of its garbage, so prefix sums of travel times give the total.

Open the interactive visualisation