标签: 费用提前计算

1 篇文章

「NOIP Record」#19 费用提前计算
未完待续 CF1107E Vasya and Binary String 设 $f(i,j,t)$ 为删去区间 $[i,j]$,其中区间右边还有 $t$ 个与 $S[j]$ 相同的字符的最大收益。 $$f(i,j,t) = \max \begin{cases}f(i,j-1,0) + a_{t+1}\\max _{k=i}^{j-1} \Big\{…