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.
Split the boxes into consecutive trips; each trip costs two plus one per port change, and dp over prefixes finds the cheapest split.