版本比较
斜率优化dp(大概内容)
正文
增加 1 行删除 1 行
14 行未改动151617181919202122238 行未改动14 行未改动## 例题1
https://www.luogu.com.cn/problem/P2365
设 $f_i$ 表示前 $i$ 个任务的最小花费,转移是 设 $f_i$ 表示前 $i$ 个任务的最小花费,转移是
$$f_i=\min (f_j+\operatorname{sumt}_i \times (\operatorname{sumc}_i-\operatorname{sumc}_j)+s\times (\operatorname{sumc}_n-\operatorname{sumc}_j))$$8 行未改动