roz-difference

P3519 [POI2011]ROZ-Difference

考虑枚举最大的字母所处的位置 $i$ 作为端点和最小的字母 $j$。 然后就有记录一下前缀出现次数 $cnt$,枚举一个区间。 $$cnt_{i, ch_i} - cnt_{i, j} - (cnt_{i',ch_i} -cnt_{i', j})$$ 求这个式子最大值。显然这两个式子相似,记录一下关 ......
ROZ-Difference Difference P3519 3519 2011
共1篇  :1/1页 首页上一页1下一页尾页