Problem 1687 · Hard

Delivering Boxes from Storage to Ports

Split the boxes into consecutive trips; each trip costs two plus one per port change, and dp over prefixes finds the cheapest split.

Open the interactive visualisation