5098

qoj#5098

兔队线段树题。 记 $\{a_i\}$ 的前缀和为 $\{S_i\}$,记距离 $i$ 位置最近的颜色相同位置为 $pre_i$,那当钦定某个点 $i$ 为右端点时,左端点最小可以为 $\max\limits_{1\le j\le i}\{pre_j\} + 1$。 考虑对于线段树上每个结点 $p$ ......
5098 qoj

5098: Sweet Butter spfa

描述 Farmer John has discovered the secret to making the sweetest butter in all of Wisconsin: sugar. By placing a sugar cube out in the pastures, he kno ......
Butter Sweet 5098 spfa
共2篇  :1/1页 首页上一页1下一页尾页