Minimum Cost for Cutting Cake I
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.
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.