Dynamic Programming21 sections · 916 units
Open in Course

Codeforces 674C Levels and Regions - Problem Statement

Codeforces 674C

You have nn game levels to split into kk regions of consecutive levels. Each region has an expected completion time based on level difficulties. find the smallest total expected time.

The exact formula involves replay probabilities, but the structure is: you're partitioning an array into exactly kk segments, reducing a cost function that's convex in kk. This is the classic setup for Aliens Trick: partition into exactly kk parts with convex cost.