Problem 3219 · Hard

Minimum Cost for Cutting Cake II

Make the most expensive cuts first; each cut is paid once for every piece it crosses, so the piece counts on the other axis multiply it.

Open the interactive visualisation